Showing posts with label Tomcat. Show all posts
Showing posts with label Tomcat. Show all posts

Tuesday, July 31, 2007

Change Default Page of Tomcat

In Tomcat 5.5 you have to add the following line INSIDE your HOST element in ther server.xml

<Context path="" docBase="myApp" debug="0"/>

This is better than copying your application in the ROOT directory.
When googling around for this problem I also found the following solution (which works, but is real stupid):
The default Application, which is situated in the ROOT directory is precompiled so they recommended to uncomment the following in .../ROOT/WEB-INF/web.xml:

<!--
<servlet>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<servlet-class>org.apache.jsp.index_jsp</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>org.apache.jsp.index_jsp</servlet-name>
<url-pattern>/index.jsp</url-pattern>
</servlet-mapping>
-->


to remove the precompilation. When you now edit the index.jsp it takes effect. So you only have to add a redirect in the index.jsp and voila :-)