Wesley Wannemacher wrote:
Hello,

I have a small problem and was wondering if anyone else has come across
it.

In Tomcat 5.5 (and possibly other versions), tomcat will check for the
existence of a file and if it doesn't exist send out a 404 before it can
be handled by struts when it comes to welcome-files...

For instance, if I have the following in my web.xml:

    <welcome-file-list>
        <welcome-file>index.action</welcome-file>
    </welcome-file-list>

And someone visits a page by hitting the directory (i.e.
http://localhost/context-name/) and a valid mapping exists (maybe taking
them to index.jsp), tomcat will deliver a 404 error. However, if I make
a blank file called 'index.action,' Tomcat will appropriately handle the
request by passing it to struts.
Has anyone else encountered this? Is there a better solution than making
a blank file called index.action?
I tried making an index.html file, but I am also learning sitemesh and I
am having a heckuva time figuring out how to get sitemesh not to
decorate the index.html file.

Creating an empty index.action file is the right way to do this on Tomcat. Different containers have different interpretations of the Servlet spec with respect to this area, but Tomcat's interpretation is that it should check for a physical file-system resource, even if the request URL will be served by a servlet/JSP/whatever.

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to