- Html redirection from C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT\index.html to
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\MYAPPLICATION\index.html
Modify index.html in C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT as follws:-
<html>
<head>
<title>Redirecting to /MYAPPLICATION</title>
</head>
<body onLoad="javascript:window.location='MYAPPLICATION';">
</body>
</html>
Or
<html>
<head>
<title>Redirecting to /MYAPPLICATION</title>
<meta http-equiv="refresh" content="0;url=MYAPPLICATION" />
</head>
<body>
</body>
</html>
NB: MYAPPLICATION is in webapps folder - Add/change context in C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\server.xml inside
<Host> tag as follows:-
<Context path="" docBase="{relative path of MYAPPLICATION folder (relative to webapps folder)} OR {absolute path of MYAPPLICATION folder with backslash or frontslash}" debug="0" >
</Context>
NB: Can keep MYAPPLICATION folder anywhere in the computer
NB: Can leave ROOT folder as it is - Create ROOT.xml in C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost as follows:-
<Context path="" docBase="{relative path of MYAPPLICATION folder (relative to webapps folder)} OR {absolute path of MYAPPLICATION folder with backslash or frontslash}" debug="0" >
</Context>
NB: Should keep MYAPPLICATION folder outside webapps folder anywhere in the computer
NB: ROOT.xml (should be UPPERCASE)
NB: Can leave ROOT folder as it is - Delete ROOT folder under C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps and rename MYAPPLICATION to ROOT
Saturday, October 3, 2009
Change default ROOT folder in TOMCAT
When you type http://localhost:8080/ you load the default index.html which is present in
C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\ROOT. To change this
behavior you need to change the redirection to ROOT folder. In order to do that you can implement
either of the four options:-
Subscribe to:
Post Comments (Atom)
Dear admin your post really helped me a lot ,thanks for the wonderful information
ReplyDeleteThank you very much ,very help me
ReplyDeleteThanks again easy to understand Save my life T^T
ReplyDeleteThanks friend,
ReplyDeleteThis helped me a lot!!!!!