Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Welcome file list not working

 
prerit datta
Greenhorn
Posts: 17
Chrome Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2854
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why are you having a servlet mapping for a JSP? Are you trying to implement the Front-controller pattern?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64685
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
prerit datta
Greenhorn
Posts: 17
Chrome Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Like you have listed the index.jsp, list the welcome.jsp in the welcome file listing instead of the servlet name.
 
prerit datta
Greenhorn
Posts: 17
Chrome Linux Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic