Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

web.xml <welcome-file> tag

Status
Not open for further replies.

wolfmah

Programmer
Oct 24, 2001
17
CA
How does this tag work on run-time? Does it automaticaly redirect to the file specified if you only type the domain name? I'm asking cause for me it seem to do nothing. Also, can I put a servlet name in there instead of a JSP or HTML file?

 
Code:
    <welcome-file-list>
        <welcome-file>aPage.jsp</welcome-file>
    </welcome-file-list>


If these tags are in your web.xml file in your context's WEB-INF folder, and your webapp context is called &quot;mysite&quot;

then when you hit this URL :

Code:
[URL unfurl="true"]http://server:8080/mysite[/URL]

It looks for the specified welcome-file(s) to display, so it is basically a redirect from :

Code:
[URL unfurl="true"]http://server:8080/mysite[/URL]

to :
Code:
[URL unfurl="true"]http://server:8080/mysite/aPage.jsp[/URL]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top