Thanks for your excellent introduction to setting up Tomcat. I've thought of an addition you might want to include, namely, how to replace tomcat's index.jsp with one's own. I'm doing a very limited web site and wish to expose it to the internet but I don't want the default tomcat startup page. Unfortunately, I've found this to be a non-trivial task that I've spent all day on and still haven't solved. Below follows an email I'm sending to [email protected]:
I have recently installed tomcat 5.5.4. I wish to use my own index.jsp in place of the out-of-the-box one. However, when I make changes to it they don't register. I.e. I'm making changes to $CATALINA_HOME/webapps/ROOT/index.jsp I have searched this list for "index.jsp" and come up with some information but I haven't had success yet. More on that presently. This is some of what I've seen so far: --- http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=1735120 When using Tomcat 5.0.25 it seems that any change I make to ROOT/index.jsp does not show up in the browser (in Tomcat 4.xx this was easy to do). I am sure this is some sort of caching problem so I've been looking for the compiled JSP in the work directory to delete it. Very strange, but it doesn't seem like this JSP is compiled anywhere. Does Tomcat 5.0 have some sort of memory resident or log caching that persists even after the server is restarted? --- http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgNo=150033 Check the webapp's WEB-INF/web.xml -- is said JSP precompiled? If so, changing the file will (understandably) have no effect: the container checks its servlet mappings first, files (say, JSPs) second. --- http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=1735455 Good suggestion. If the JSP is precompiled shouldn't I be able to go to the work directory and see index_jsp.class somewhere under a ROOT directory (like there is for other webapps)? I guess one of my basic questions is that why don't I see a ROOT directory in the work directory? --- http://mail-archives.apache.org/eyebrowse/[EMAIL PROTECTED]&msgId=1735458 You tell me -- how did you precompile? If you're placing classes directly in the "/work" dir, then, yes; if you're building class files and updating web.xml, then, no. The former method of precompilation is Tomcat-specific and accounts for a JSP being updated. The latter is for production deployments, in which case the JSPs should not change throughout the release lifetime. The root context may be under "/work/_" in TC5, but don't quote me on that. --- There were some other conversations on this topic but the above seemed the best. It seems that the last message above may be pertinent but I don't understand it. I found two instances of index_jsp.class in my tomcat tree. I deleted both and nothing happened. --- My setup: I'm running Tomcat 5.5.4 standalone (no apache). $CATALINA_HOME/webapps/ROOT/WEB-INF/web.xml contains the following: <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> $CATALINA_HOME/conf/web.xml contains the following (all standard, except I'm allowing the invoker servlet): <servlet> <servlet-name>default</servlet-name> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>false</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>invoker</servlet-name> <servlet-class> org.apache.catalina.servlets.InvokerServlet </servlet-class> <init-param> <param-name>debug</param-name> <param-value>0</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> -- Kai Utility [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
