This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Welcome file list not working Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Welcome file list not working" Watch "Welcome file list not working" New topic
Author

Welcome file list not working

prerit datta
Greenhorn

Joined: Jun 26, 2013
Posts: 16

I was trying to use my file "welcome.jsp" instead of the usual "index.jsp" in TOMCAT 7.0. But it is not working please help.Here are the files:

welcome.jsp


next.html



Here is the web.xml


index.jsp

Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

Why are you having a servlet mapping for a JSP? Are you trying to implement the Front-controller pattern?


SCJP, SCWCD.
|Asking Good Questions|
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60804
    
  65

Firstly:
really? You want your servlet to be called for all request? Even images and stylesheets?

Secondly, your entry in the welcome list is not a url, it's a servlet name. Do you think that's valid?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
prerit datta
Greenhorn

Joined: Jun 26, 2013
Posts: 16

Bear Bibeault wrote:Firstly:
really? You want your servlet to be called for all request? Even images and stylesheets?

Secondly, your entry in the welcome list is not a url, it's a servlet name. Do you think that's valid?


I was just trying the concept of welcome file list. I just want to know how can I display "welcome.jsp" page as my welcome page instead of the usual index.jsp. Can you tell how will I write web.xml for this?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9956
    
163

Like you have listed the index.jsp, list the welcome.jsp in the welcome file listing instead of the servlet name.

[My Blog] [JavaRanch Journal]
prerit datta
Greenhorn

Joined: Jun 26, 2013
Posts: 16

Jaikiran Pai wrote:Like you have listed the index.jsp, list the welcome.jsp in the welcome file listing instead of the servlet name.


Sorry I didn't get you....
 
Consider Paul's rocket mass heater.
 
subject: Welcome file list not working
 
Similar Threads
retreiving data through jsp
Hi 'm strugling lot to run a simple hello world prgm
error for first web application : The requested resource (/Beer-v1/SelectBeer.do) is not available.
Unable to get EL to work
Login authentication using tomcat7