Thanks Craig.

Maybe it's the lack of caffeine, but I can't make this work. I've got
a <welcome-file-list> element in web.xml, and I've added welcome.do as
a file in that list, but Tomcat (5.0.27) isn't attempting to load that
URL, as far as I can tell.

I did add an "index.jsp" element to the welcome-file-list, and dropped
an index.jsp file into the directory, and that works, so I at least
have a workaround hack that I can use. But I'd like to get a pure
mapping solution to this, so that I don't have to keep an index.jsp in
each module that I build.

I thought that maybe Tomcat was getting confused between trying to
find file named welcome.do vs. just having a mapping, so I also tested
by remapping my signin module to a different URL. Here's what I did:

1) Duplicate the signup module's <init-param> element in the Struts
ActionServlet config, mapping it to config/test.
2) Redeploy the webapp and hit localhost/webapp/test, and got a 404 from Tomcat.
3) Hit localhost/webapp/test/welcome.do, and got the first screen of
my signup module.

Under this setup, there's no directory on the server that matches the
/webapp/test URL, so it's all a soft mapping. And it behaves exactly
the same as when I have it pointed at my /signup module, which does
have a matching directory. FWIW, I also tried this with directory
listings enabled and disabled, with no change in outcome. Also FWIW, 
this is Tomcat 5.0.27 with a 2.4 DTD for web.xml.

Can you see anything blatently wrong that I'm doing?

Thanks,
Kev

On Thu, 14 Oct 2004 14:51:05 -0700, Craig McClanahan <[EMAIL PROTECTED]> wrote:
> All you need to do is add a "welcome file" element in web.xml that
> points the user at your login action:
> 
>   <welcome-file>
>     <welcome-file>welcome.do</welcome-file>
>   </welcome-file>
> 
> This won't work in Tomcat 4, but does work in Tomcat 5.  (NOTE:  if
> you're using Servlet 2.3 or earlier format for your web.xml file, the
> order of the elements is defined in the DTD; for Servlet 2.4 or later
> you can have them in any order).
> 
> Craig
> 
> 
> 

<original post snipped>

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

Reply via email to