Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: startup order

...

  1. Wiki Markup
    \[#Q1 I am unable to compile my JSP!\]
  2. Wiki Markup
    \[#Q2 I can't get servlets to work under /servlet/\*!\]
  3. Wiki Markup
    \[#Q3 Why is the invoker evil?\]
  4. Wiki Markup
    \[#Q4 How to I get Tomcat's version number?\]
  5. Wiki Markup
    \[#Q5 Tomcat eats 100% of the CPU!\]
  6. Wiki Markup
    \[#Q6 How do I get a customized error page?\]
  7. Wiki Markup
    \[#Q7 Should I use the LE version?\]
  8. Wiki Markup
    \[#Q8 How do I configure Tomcat to NOT to store the sessions during shutdown?\]
  9. Wiki Markup
    \[#Q9 How do I disable tag pooling?\]
  10. Wiki Markup
    \[#Q10 Is there a DTD for server.xml?\]
  11. Wiki Markup
    \[#Q11 How do I change the welcome file? ( I want to show index.jsp instead of index.html)\]
  12. Wiki Markup
    \[#Q12 How do I enable/disable directory listings?\]
  13. Wiki Markup
    \[#Q13 How do I use symbolic links with jars?\]
  14. Wiki Markup
    \[#Q14 How do I change the name of the file in the download Save-As dialog from a servlet? (or jsp)\]
  15. Wiki Markup
    \[#Q15 Is tag pooling broken? It doesn't call release!\]
  16. Wiki Markup
    \[#Q16 Why do I get java.lang.IllegalStateException ?\]
  17. Wiki Markup
    \[#Q17 How do I make a scheduled event on Tomcat?\]
  18. Wiki Markup
    \[#Q18 What is Element "web-app" does not allow "servlet" here?\]
  19. Wiki Markup
    \[#Q19 How do open a file for reading in my webapp?\]
  20. Wiki Markup
    \[#Q20 Can I run tomcat with the JRE, or do I need the full JDK?\]
  21. Wiki Markup
    \[#Q21 Is tomcat an EJB server? Can I use EJBs with tomcat?\]
  22. Wiki Markup
    \[#Q22 Can I access Tomcat's JNDI provider from outside tomcat?\]
  23. Wiki Markup
    \[#Q23 Who uses tomcat in production?\]
  24. Wiki Markup
    \[#Q24 I'm getting java.lang.ThreadDeath exceptions when reloading my webapp.\]
  25. Wiki Markup
    \[#Q25 Help! Even though I run shutdown.sh (or shutdown.bat), Tomcat does not stop!\]
  26. Wiki Markup
    \[#Q26 How do I debug JSP errors in the Admin web application?\]
  27. Wiki Markup
    \[#Q27 What order do webapps start (or How can I change startup order)?\]
    \\

Answers

I am unable to compile my JSP!

...

  1. Download Tomcat's base and admin webapp distributions (binaries), unzip to a directory of your choice. We'll use c:\temp in this example. 2. Edit c:\temp\server\webapps\admin\WEB-INF\web.xml to remove the JSPC-generated servlet mappings. These are marked in the web.xml file with comments indicating the beginning and end of the JSPC section. You can simply comment out all these servlet-mappping elements. Be careful not to comment out other servlet mappings such as the Struts dispatcher servlet. 3. Open c:\temp\server\webapps\admin\WEB-INF\lib\catalina-admin.jar with a zip file program like WinZip. Remove the files named *_jsp.class, as these are the compiled JSPs. Do not remove the other class files, the ones under the org/apache/ paths. 4. Download a Tomcat source distribution and unzip it to a directory of your choice, but not the same directory that you used above. We'll use c:\src in this example. 5. Copy everything except the WEB-INF/lib directory from c:\src\container\webapps\admin to c:\temp\server\webapps\admin. Now you will have the uncompiled admin webapp JSPs. 6. If you haven't already, define an admin user in %CATALINA_HOME%\conf\tomcat-users.xml. 7. Start Tomcat, navigate to http://localhost:8080 (or your actual server:port if you have modified the default values), and access the admin web application. It will run slower because Tomcat is now compiling the JSPs on-demand the first time you access them, but should otherwise appear normal.

What order do webapps start (or How can I change startup order)?

There is no expected startup order. Neither the Servlet spec nor Tomcat define one. You can't rely on the apps starting in any particular order.