dev@glassfish.java.net

Re: Does the Servlet spec require this behavior?

From: Vince Kraemer <Vince.Kraemer_at_Sun.COM>
Date: Fri, 05 Jun 2009 11:45:20 -0700

Glad to see that part will be easy to fix.

Can we get some kind of message in the server log that helps explain why
the 404 got sent to the user?

Something like, "No welcome files found in DIRECTORY to server the
request URL", would be pretty helpful.

vbk

Sathyan Catari wrote:
> In the absence of application descriptor, you can use the
> default-web.xml and turn on the
> listing to "true" for <param-name>listings</param-name>.
> By default it is set to "false" so you don't see the listings when
> welcome/index file is absent.
>
> HTH
> Sathyan
>
>
> Vince Kraemer wrote:
>> Hi,
>>
>> I created a web app that has a no descriptor files and a single JSP.
>>
>> If the jsp is named index.jsp, I see the content when I access
>> http://localhost:8080/WarName/... this is a good thing
>>
>> If the jsp is named foobar.jsp, I see a 404 error when I access the
>> same URL... Is the spec forcing us to be so useless?
>>
>> I would think that the server could present a directory listing for
>> the web app... so the user would have a chance to click on foobar.jsp
>> and see its content. That would be friendlier for developers. It
>> probably should not work that way in production, though.
>>
>> One other thing I noticed... There is no error in the server log that
>> would alert the developer to the root cause of the problem.
>>
>> I did this test with v3 promoted build 49.
>>
>> Thanks,
>> vbk