wood burning stoves 2.0*
The moose likes Struts and the fly likes How to set welcome file to .do? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to set welcome file to .do?" Watch "How to set welcome file to .do?" New topic
Author

How to set welcome file to .do?

David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
Tried to set welcome file in web.xml to "welcome.do" that forwards to a JSP file and it doesn't appear this is supported.
Anyone have an idea?
The Moose
Bartender

Joined: Apr 01, 2003
Posts: 73
maybe try changing it to "welcome.moose" -- that should work.


Finally! Animal rights in action!
Nathaniel Stoddard
Ranch Hand

Joined: May 29, 2003
Posts: 1258
For some reason (I forget) you need to use a JSP to forward to your action. So, create some welcome.jsp (which is your index file in your web.xml), which simply does a <jsp:forward page="/welcome.do"/>.


Nathaniel Stodard<br />SCJP, SCJD, SCWCD, SCBCD, SCDJWS, ICAD, ICSD, ICED
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Nathaniel Stoddard:
For some reason (I forget) you need to use a JSP to forward to your action.
I believe that reason is that the specification talks about welcome files which are to be used when a request comes in for a "directory" URL that has no servlet mapping set.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
David Yutzy
tumbleweed and gunslinger
Ranch Hand

Joined: Jun 29, 2001
Posts: 192
Got it to work using the <jsp:forward> to my action.
Thanks!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set welcome file to .do?