On Thu, Jul 30, 2020 at 12:30 PM Igal Sapir <i...@lucee.org> wrote:

> On Thu, Jul 30, 2020 at 12:25 PM Igal Sapir <i...@lucee.org> wrote:
>
>> Mark,
>>
>> On Thu, Jul 30, 2020 at 12:21 PM Igal Sapir <i...@lucee.org> wrote:
>>
>>> Mark,
>>>
>>> On Thu, Jul 30, 2020 at 12:14 PM Mark Thomas <ma...@apache.org> wrote:
>>>
>>>> On July 30, 2020 5:49:41 PM UTC, Igal Sapir <i...@lucee.org> wrote:
>>>> >Hello,
>>>> >
>>>> >I have the following in web.xml:
>>>> >
>>>> >  - A servlet named Lucee, mapped to by URI pattern "*.cfm"
>>>> >  - A default servlet from Tomcat, with init-param listings=true
>>>> >  - A welcome-file of "index.cfm"
>>>> >
>>>> >My expectation is that for a request to a given directory, if a file
>>>> >named
>>>> >index.cfm exists then it would be passed to the Lucee servlet, and if
>>>> >not,
>>>> >the Directory Listings will be displayed.
>>>> >
>>>> >Instead, requests to a given directory are forwarded to Lucee, which
>>>> >return
>>>> >a 404.
>>>> >
>>>> >Is it possible to configure Tomcat so that it would check if the file
>>>> >exists before matching the URI pattern of the welcome file?  This (as
>>>> >all
>>>> >Directory Listings, I would hope) is for a Development setup so it's OK
>>>> >if
>>>> >the check adds a few more microseconds to the request.
>>>> >
>>>> >Thanks,
>>>> >
>>>> >Igal
>>>>
>>>> Look at the resourceOnlyServlets attribute on Context.
>>>>
>>>
>>> Calling context.getResourceOnlyServlets() returns "jsp".
>>>
>>> Should I set it explicitly to something else?
>>>
>>
>> I see the JavaDoc comment.  I will add the CFMLServlet and try it out.
>>
>
> Calling context.getResourceOnlyServlets("CFMLServlet") solves the issue.
>

I meant setResourceOnlyServlets("CFMLServlet") obviously ;)

Igal


>
> Brilliant!  Thanks Mark and Chris,
>
> Igal
>
>

Reply via email to