Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to set welcome file to .do?

 
David Yutzy
tumbleweed and gunslinger
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
maybe try changing it to "welcome.moose" -- that should work.
 
Nathaniel Stoddard
Ranch Hand
Posts: 1258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"/>.
 
Lasse Koskela
author
Sheriff
Posts: 11962
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David Yutzy
tumbleweed and gunslinger
Ranch Hand
Posts: 192
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Got it to work using the <jsp:forward> to my action.
Thanks!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic