• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Welcome files in web.xml

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

1.What if we have all the files in the <welcome-file-list> in web.xml? Which will be displayed on the start of the application? Is there any rule for it?

2. If we want to have an action as the welcome page, the methods which i found were

i. Include some code in index.jsp for redirecting to the action.
ii. Directly refer the action name as the welcome file in web.xml.
Is there any other ways too? And which is the best practice?
 
Sheriff
Posts: 67266
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Vijaya Ragavan wrote:1.What if we have all the files in the <welcome-file-list> in web.xml? Which will be displayed on the start of the application? Is there any rule for it?


What happened when you tried it?

2. If we want to have an action as the welcome page, the methods which i found were ...


Why would you not directly invoke the action?
 
Vijaya Ragavan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its not following a particular order of files it seemed to me when i tried. Sometimes index.html is called and on restarting, index.jsp is called. Is there any server-cache related things do this? because i noticed that even on restart of the server, the file which was invoked before is invoked again.

So, you say the best practise will be to invoke the action directly. How to do it?
 
Bear Bibeault
Sheriff
Posts: 67266
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply use the URL of the servlet/action.
 
Vijaya Ragavan
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you bear...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!