File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Make Servlet as the welcome page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Make Servlet as the welcome page" Watch "Make Servlet as the welcome page" New topic

Make Servlet as the welcome page

Harsha Nadiger

Joined: Jun 06, 2010
Posts: 6

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 , 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.

sudhir nim
Ranch Hand

Joined: Aug 29, 2007
Posts: 212

You can use the servlet url pattern in welcome file list

[Servlet tutorial] [Servlet 3.0 Cook Book]
Michael Cropper
Ranch Hand

Joined: Sep 30, 2009
Posts: 140
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 :-)

I agree. Here's the link:
subject: Make Servlet as the welcome page
It's not a secret anymore!