Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. I am unable to compile my JSP!
  2. I can't get servlets to work under /servlet/*!
  3. Why is the invoker evil?
  4. How to I get Tomcat's version number?
  5. Tomcat eats 100% of the CPU!
  6. How do I get a customized error page?
  7. Should I use the LE version?
  8. How do I configure Tomcat to NOT to store the sessions during shutdown?
  9. Is there a DTD for server.xml?
  10. How do I change the welcome file? ( I want to show index.jsp instead of index.html)
  11. How do I enable/disable directory listings?
  12. How do I use symbolic links with jars?
  13. How do I change the name of the file in the download Save-As dialog from a servlet? (or jsp)
  14. Is tag pooling broken? It doesn't call release!
  15. How do I disable tag pooling?
  16. Why do I get java.lang.IllegalStateException ?
  17. How do I make a scheduled event on Tomcat?
  18. What is Element "web-app" does not allow "servlet" here?
  19. How do I open a file for reading in my webapp?
  20. Can I run tomcat with the JRE, or do I need the full JDK?
  21. Is tomcat an EJB server? Can I use EJBs with tomcat?
  22. Can I access Tomcat's JNDI provider from outside tomcat?
  23. Who uses tomcat in production?
  24. I'm getting java.lang.ThreadDeath exceptions when reloading my webapp.
  25. Help! Even though I run shutdown.sh (or shutdown.bat), Tomcat does not stop!
  26. How do I debug JSP errors in the Admin web application?
  27. What order do webapps start (or How can I change startup order)?
  28. What's the different between a Valve and Filter?
  29. How do I set system properties at startup?

Answers

Anchor
Q1
Q1
I am unable to compile my JSP!

...

In 1.4.1 JVMs there is a memory leak which could hampering the garbage collector. More information Otherwise - get a memory profiler and/or tweak your memory settings.

Anchor
Q6
Q6
How do I set system properties at startup? Set JAVA_OPTS to be something BEFORE calling startup.bat or before calling catalina.bat. (or you can edit those files, but it isn't advised)

Example (windows): SET JAVA_OPTS='-DpropName=propValue'

Example (UNIX): export JAVA_OPTS='-DpropName=propValue'

Windows service users - use this

...

get a customized error page?

In web.xml ...

No Format

        <error-page>
            <error-code>404</error-code>

In web.xml ...

No Format
        <error-page>
    <location>/error/404.html</location>
        <error-code>404<</error-code>
            <location>/error/404.html</location>
        </error-page>
page>

You may also catch error 500's as well as other specific exceptions or exceptions which extend Throwable. For more information, see the Servlet Specification for all the gory details of how you can play with this.

...

If you can achieve the desired functionality with a Filter, it is the preferred way to go.

Anchor
Q29
Q29
How do I set system properties at startup?

Set JAVA_OPTS to be something BEFORE calling startup.bat or before calling catalina.bat. (or you can edit those files, but it isn't advised)

Example (windows): SET JAVA_OPTS='-DpropName=propValue'

Example (UNIX): export JAVA_OPTS='-DpropName=propValue'

Windows service users - use this

...

CategoryFAQ