Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

<welcome-file-list>

 
MaheshS Kumbhar
Ranch Hand
Posts: 188
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before going for <welecome-file-list> element in DD to display a welcome page, does container try all three url matching strategies like exact match then directory match and last is extension match. If all of these fail then container goes for welcome file. Is my understanding true?
 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can try this and find out...
 
Frits Walraven
Creator of Enthuware JWS+ V6
Saloon Keeper
Pie
Posts: 2536
113
Android Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
or try to find this in the Servlet2.4 specs:
SRV.9.10 Welcome Files
Web Application developers can define an ordered list of partial URIs called welcome files in the Web application deployment descriptor. The deployment descriptor syntax for the list is described in the Web application deployment descriptor schema.
The purpose of this mechanism is to allow the deployer to specify an ordered list of partial URIs for the container to use for appending to URIs when there is a request for a URI that corresponds to a directory entry in the WAR not mapped to a Web component.


Example:
if you have an welcome-file-list entry like:

and you have defined a servlet like:

and you access your web-app with an URL like: http://localhost:8080/YourWebAppRoot/jsp it will go to the Web component (IndexServlet) and not to your welcome-file in the jsp directory of your war.

Regards,
Frits
 
Marlo Magpantay
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will try to map the request to a servlet mapping first then welcome files.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic