Tomcat - Help
Hi all,
I am using Tomcat 5.0.28 web server for my Application
i need to modify ( add a Line ) the Page displaying while Accessing
http://<ServerName>:<portNum> ( ie the Tomcat index Page ).
For that i changed the $CATALINA_HOME/webapps/ROOT/index.jsp file.
then i restarted Tomcat.
But the Change didnot happen to the page.
then i removed all the Content of the same file and restarted the Tomcat, getting same page i viewed before.
is the file is auto generated at run time?
How can i add some lines to this (index.jsp) page ?
Pls help.
Thanks.
Ganesh
Define a welcome-file in your web.xml
Here's how you do it
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
It should be the last element in your web.xml
Also, is your war file deployed as ROOT.war?
cheers,
ram.
Sir,
I have the application, say mis( mis.war ). this have a Index file and entry in web.xml as u mentioned. But for accessing this i have to type
http://hostname:port/mis
: and working fine .
While accessing http://hostname:port
we can view the Default page of tomcat. What i want is to add some Lines to this file( you can see the File path Mentioned in the Page itself , index.jsp ). i added some lines and not reflecting in result.
ROOT dir of tomcat/ webapps is a default dir with Tomcat.
Now i found that the Code of index.jsp is autogenerated from catalina-root.jar situated at
webapps\ROOT\WEB-INF\lib
how can i modify the Jar file.?
i unzipped the jar file, modified code, again zipped and tried. not working...
Thanks,
Ganesh
Hmmm...that should work. Did you delete the exploded directory called ROOT from webapps when you restarted with your changes ?
If you just require the default index.html of root page, you can create your own web application, have the default index page with your changes as the index page for the war and put it as ROOT.war :)
ram.