This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Make Servlet as the welcome page

 
Harsha Nadiger
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have servlet MyServlet and I need to invoke that as the welcome page, like the index.jsp.
I mean when I go the link http://mysite.com , the servlet MyServlet should be invloked.

I know this can be done by calling the servlet from the welcome page index.jsp, which I cannot do due to some constraints.

Is there any way to make a servlet as the welcome page? Please help.

Thanks,
Harsha
 
sudhir nim
Ranch Hand
Posts: 212
Eclipse IDE Spring Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use the servlet url pattern in welcome file list

 
Michael Cropper
Ranch Hand
Posts: 140
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or there is the URL Rewrite Filter available here, http://code.google.com/p/urlrewritefilter/

I haven't got my head around this myself yet, but I have been recommended the above for the same problem you are asking about :-)

Michael
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic