Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Welcome files in web.xml

 
Vijaya Ragavan
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?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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
Author and ninkuma
Marshal
Posts: 65545
110
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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...
 
I found a beautiful pie. And a tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!