A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Elasticsearch in Action
this week in the
Make Servlet as the welcome page
Joined: Jun 06, 2010
Mar 14, 2011 23:13:15
MyServlet and I need to invoke that as the welcome page, like the index.jsp.
I mean when I go the link
, 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.
Joined: Aug 29, 2007
Mar 15, 2011 00:08:07
You can use the servlet url
in welcome file list
<welcome-file-list> <welcome-file> /url-mapping-of-servlet </welcome-file> </welcome-file-list>
[Servlet 3.0 Cook Book]
Joined: Sep 30, 2009
Mar 15, 2011 14:48:39
Or there is the URL Rewrite Filter available here,
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 :-)
subject: Make Servlet as the welcome page
Welcome file & resource constrained.
Is MyServlet Thread Safe
Virtual host, Alias and ROOT dir
Filter Mapping Doubt
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015