Kishore, thanks a lot for your help.
Interestingly, the problem was only that I had "/foo/index.html" instead of "foo/index.html" as my welcome file entry. After I removed the beginning forward slash as you suggested, it worked (without the need for the dummy file -- I did not encounter the 404). This is with Tomcat 5.0.27.
Thanks again, Erik
Kishore Senji wrote:
On Thu, 27 Jan 2005 18:54:26 -0500, Erik Weber <[EMAIL PROTECTED]> wrote:
I am restricting *.jsp in web.xml. ActionServlet is mapped to /foo/*.
I would like to use a welcome file so that a URL of http://host:port/app will resolve to the index page. However, the index page is a JSP, so it's not accessible directly. So basically what I need is a "welcome file" that actually resolves to an unprotected Action mapping. Something like this:
<welcome-file-list> <welcome-file>/foo/index.html</welcome-file> </welcome-file-list>
. . .
<action-mappings> <action path="/index.html" forward="/index.jsp"/> </action-mappings>
How can I accomplish this (assuming no Apache Web Server in front)?
What you have setup should work except that if the welcome-file is not an actual file, then the server will issue a 404. The work around is to have a dummy index.html file inside "foo" folder (for your setup, it's foo/index.html) so that the server is happy and it tries to serve foo/index.html but the request is instead served by the ActionServlet (/foo/*) and your /index.jsp will be shown.
Note that the welcome-file should not start or end with a "/". Making your welcome-file to foo/index.html and have a dummy index.html inside foo folder should work
Thanks, Erik
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]