tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From funk...@apache.org
Subject cvs commit: jakarta-tomcat-site/xdocs-faq misc.xml
Date Sat, 25 Oct 2003 20:31:39 GMT
funkman     2003/10/25 13:31:39

  Modified:    docs/faq misc.html
               docs/faq/printer misc.html
               xdocs-faq misc.xml
  Log:
  Link to 4.1.27 bug for webapp reloading and needed hotfix.
  
  Revision  Changes    Path
  1.11      +633 -626  jakarta-tomcat-site/docs/faq/misc.html
  
  Index: misc.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-site/docs/faq/misc.html,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- misc.html	16 Oct 2003 07:46:16 -0000	1.10
  +++ misc.html	25 Oct 2003 20:31:39 -0000	1.11
  @@ -1,627 +1,634 @@
  -<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Tomcat FAQ - Miscellaneous Questions</title><meta value="Tim Funk" name="author"><meta value="funkman@apache.org" name="email"><style>
  -      dt { font-size : larger;  font-weight : bold }
  -      dd {padding-bottom : 10px;}
  -    </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%" border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project" align="left" src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
  -      Tomcat FAQ
  -    " align="right" src="../images/tomcat.gif"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--LEFT SIDE NAVIGATION--><td nowrap="true" valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="..">Tomcat Home</a></li><li><a href="index.html">FAQ Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="bugs.html">Bugs</a></li><li><a href="classnotfound.html">Class Not Found</a></li><li><a href="connectors.html">Connectors</a></li><li><a href="database.html">Database</a></li><li><a href="http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Howto">How do I</a></li><li><a href="unix.html">Linux / Unix</a></li><li><a href="memory.html">Memory</a></li><li><a href="meta.html">Meta</a></li><li><a href="misc.html">Miscellaneous</a></li><li><a href="performance.html">Monitoring / Performance</a></li><li><a href="http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links">Other Resources</a></li><li><a href="security.html">Security</a></li><li><a href="version.html">Which Version</a></li><li><a href="tomcatuser.html">Tomcat User List</a></li><li><a href="windows.html">Windows</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td nowrap="true" valign="top" align="left"><h1>Tomcat FAQ</h1><h2>Miscellaneous Questions</h2></td><td nowrap="true" valign="top" align="right"><small><a href="printer/misc.html"><img alt="Printer Friendly Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version
  -                    </a></small></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
  -<p>
  -Questions that were not categorized.
  -</p>
  -</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
  -<p>
  -  <ul>
  -    <li>
  -      <a href="#compile">
  -        I am unable to compile my JSP!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#invoker">
  -        I can't get servlets to work under <code>/servlet/*</code>!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#evil">
  -        Why is the invoker evil?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#version">
  -        How to I get Tomcat's version number?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#cpu">
  -        Tomcat eats 100% of the CPU!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#properties">
  -        How do I set system properties at startup?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#error">
  -        How do I get a customized error page?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#le">
  -        Should I use the LE version?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#persist">
  -        How do I configure Tomcat to NOT to store the sessions during shutdown?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#tagpool">
  -        How do I disable tag pooling?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#dtd">
  -        Is there a DTD for server.xml?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#welcome">
  -        How do I change the welcome file?
  -            (I want to show index.jsp instead of index.html)
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#listing">
  -        How do I enable/disable directory listings?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#ip">
  -        How do I make Tomcat listen on a specific IP
  -            address instead of all available addresses?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#symlink">
  -        How do I use symbolic links with jars?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#utf8">
  -        How do I get UTF-8?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#saveas">
  -        How do I change the name of the file in the download Save-As dialog
  -        from a servlet? (or jsp)
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#tagbroken">
  -        Is tag pooling broken? It doesn't call release!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#illegalstate">
  -        Why do I get <code>java.lang.IllegalStateException</code>?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#schedule">
  -        How do I make a scheduled event on Tomcat?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#baddtd">
  -        What is <code>Element "web-app" does not allow "servlet" here</code>?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#catalina.out">
  -        Where does System.out go? <br>
  -        How do I rotate catalina.out?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#getResourceAsStream">
  -        How do open a file for reading in my webapp?
  -      </a>
  -    </li>
  -  </ul>
  -</p>
  -
  -</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
  -
  -  <b style="font-size: larger">
  -    <a name="compile">I am unable to compile my JSP!</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Are you seeing this?
  -    <pre>
  -      org.apache.jasper.JasperException: Unable to compile
  -      class for JSP
  -
  -      An error occurred at line: -1 in the jsp file: null
  -
  -      Generated servlet error:
  -          [javac] Since fork is true, ignoring compiler
  -      setting.
  -          [javac] Compiling 1 source file
  -         [javac] Since fork is true, ignoring compiler
  -      setting.
  -
  -    </pre>
  -
  -    If so, here is some solutions:
  -    <ul>
  -      <li>
  -        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104949554010352&w=2">
  -          Environment variable issue
  -        </a>
  -      </li>
  -      <li>
  -        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16688">
  -            Environment issue
  -        </a>
  -        or
  -        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20527">
  -            Ant issue
  -        </a>
  -      </li>
  -      <li>
  -        Others have had success by added JAVA_HOME/bin to their PATH.
  -        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105525594928279&w=2">
  -            1
  -        </a>
  -
  -        ...
  -
  -        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105526353505541&w=2">
  -            2
  -        </a>
  -        and make sure you are using the full JDK and not the JRE.
  -      </li>
  -     </ul>
  -
  -    In the case of the Environment issues, it is typical that on Windows, the
  -    startup scripts work fine and the service does not. The service uses
  -    registry values to look for java and other "stuff". To save yourself some
  -    trouble, see if the
  -    <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  -                NT Service Config Utility
  -    </a> is helpful.
  -    </div><br>
  -
  -
  -    <b style="font-size: larger">
  -      <a name="invoker">
  -        I can't get servlets to work under <code>/servlet/*</code>!
  -      </a>
  -    </b>
  -    <div style="padding-left : 20px;">
  -        Using <code>/servlet/</code> to map servlets is evil, absolutely evil.
  -        Even more evil than
  -        <a href="http://www.eviloverlord.com/lists/overlord.html">
  -          this
  -        </a>.
  -
  -        That being said, here are some threads that may answer this:
  -        <ul>
  -          <li>
  -            <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=103417249925541&w=2">
  -              [SECURITY] Apache Tomcat 4.x JSP source disclosure vulnerability
  -            </a>
  -          </li>
  -          <li>
  -            <a href="http://marc.theaimsgroup.com/?t=103945337100003&r=1&w=2">
  -              Cannot Run Servlets, only JSP's, Part II
  -            </a>
  -          </li>
  -          <li>
  -            <a href="http://marc.theaimsgroup.com/?t=104326854100001&r=1&w=2">
  -              Tomcat configuration problem: JSPs work, servlets don
  -            </a>
  -          </li>
  -        </ul>
  -    </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="evil">Why is the invoker evil?</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <i>This is opinions of the writer (YMMV)</i> <br>
  -    <em>Quickie about the invoker:</em> The invoker is a dynamic servlet which
  -    allows run-time
  -    loading of other servlets based on class name. This servlet is the one
  -    that allows
  -    <code>http://localhost/servlet/com.foo.MyClass?more=cowbell</code>, where
  -    <code>com.foo.MyClass</code> is some class which can be loaded as
  -    a servlet but was never explicitly declared in a config file.
  -
  -    <br><br>
  -
  -    Evil because:
  -    <ul>
  -      <li>Security risk ... see links above</li>
  -      <li>
  -        Configuration hiding - There is NO way to determine which servlets are
  -        used vs which are not used. In web.xml, every servlet is declared
  -        and mapped.
  -        In that one file you instantly have a road map to how the webapp works.
  -      </li>
  -      <li>
  -        Back doors. Servlets which <b>are</b> mapped can be alternately
  -        called via the
  -        invoker by class name. Since the URL is different, all security
  -        constraints might be ignored since the URL pattern is VERY different.
  -      </li>
  -      <li>
  -        Back doors. Bad programmers make it easier to do bad things.
  -      </li>
  -      <li>
  -        Back doors. It may be common to use common 3rd party jars in a
  -        shared area. If that shared jar has servlets in them and that servlet
  -        has a hole in it, bad things happen.
  -      </li>
  -      <li>
  -        Configuration hiding - it's important enough to say twice. Explicit
  -        declaration while a PITA, will be more helpful in the maintenance
  -        scheme of your webapp.
  -      </li>
  -    </ul>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="version">How to I get Tomcat's version number?</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <code>javax.servlet.ServletContext.getServerInfo();</code>
  -  </div><br>
  -
  -  <b style="font-size: larger">
  -    <a name="cpu">Tomcat eats 100% of the CPU!</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Odds are, it might be the garbage collector going wacky. <br> <br>
  -
  -    In 1.4.1 JVMs there is a memory leak which could hampering the
  -    garbage collector.
  -    <a href="http://developer.java.sun.com/developer/bugParade/bugs/4724129.html">
  -       More information
  -    </a>
  -
  -    Otherwise - get a memory profiler and/or tweak your memory settings.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -    <a name="properties">
  -        How do I set system properties at startup?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Set <code>JAVA_OPTS</code> to be something BEFORE calling startup.bat
  -    or before calling catalina.bat. (or you can edit those files, but it
  -    isn't advised)
  -
  -    <br><br>
  -
  -    <em>Example (windows): </em>
  -    <code>SET JAVA_OPTS='-DpropName=propValue'</code>
  -    <br><br>
  -
  -    <em>Example (UNIX): </em>
  -    <code>export JAVA_OPTS='-DpropName=propValue'</code>
  -
  -    <br><br>
  -
  -    Windows service users -
  -            <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  -             use this</a>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="error">
  -      How do I get a customized error page?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    In web.xml ...
  -    <pre>
  -        &lt;error-page&gt;
  -            &lt;error-code&gt;404&lt;/error-code&gt;
  -            &lt;location&gt;/error/404.html&lt;/location&gt;
  -        &lt;/error-page&gt;
  -    </pre>
  -
  -    You may also catch error 500's as well as other specific exceptions or
  -    exceptions which extend <tt>Throwable</tt>.
  -    <br>
  -    For more information, see the Servlet Specification for all the gory
  -    details of how you can play with this.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="le">Should I use the LE version?</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    No. It was an experiment, it failed. (YMMV) The original purpose
  -    of LE was because jdk1.4 provides a LOT of standard functionality
  -    that Tomcat uses that was not in jdk1.3. So to save some space
  -    two distributions were made to save some bandwidth. Since then,
  -    it has been an exercise in confusion. (Flame me if you disagree)
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&=105341005928071&w=2">
  -        More info
  -    </a>
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -    <a name="persist">
  -      How do I configure Tomcat to NOT to store the sessions during shutdown?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html">
  -        Look at the Session manager component and tweak accordingly.
  -    </a>
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -    <a name="tagpool">
  -      How do I disable tag pooling?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    To disable tag pooling:
  -    See $TOMCAT_HOME/conf/web.xml --&gt; enablePooling=false for the jsp servlet
  -    declaration.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="dtd">
  -        Is there a DTD for server.xml?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    No! Nor can one accurately exist.
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104205666221372&w=2">
  -       Here's why
  -    </a>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="welcome">
  -        How do I change the welcome file? (
  -                I want to show index.jsp instead of index.html)
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    This is done in web.xml by changing <code>welcome-files-list</code>.
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104566785828794&w=2">
  -      More detail.
  -    </a>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="listing">
  -        How do I enable/disable directory listings?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    This is done in TOMCAT_HOME/conf/web.xml by changing the <code>listings</code>
  -    property for the <code>default</code> servlet.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="ip">
  -        How do I make Tomcat listen on a specific IP
  -            address instead of all available addresses?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -     RTFM! [Add the property <code>address='127.0.0.1'</code>
  -     to your Connector config.]
  -     For more detail:
  -     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk.html">
  -        JK</a>,
  -     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/http11.html">
  -        http</a> (legacy),
  -     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html">
  -        http</a> (coyote).
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="symlink">
  -        How do I use symbolic links with jars?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    You'll need to tweak with server.xml and
  -     <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105159411609623&w=2">
  -         do this.
  -     </a> (Don't worry - its really easy!)
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="utf8">
  -        How do I get UTF-8?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    This
  -     <a href="http://marc.theaimsgroup.com/?t=105524444400002&r=1&w=2">
  -         thread
  -     </a>
  -     should answer that.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="saveas">
  -        How do I change the name of the file in the download Save-As dialog
  -        from a servlet? (or jsp)
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Use the
  -     <a href="http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html">
  -         Content-Disposition
  -     </a>
  -     header.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="tagbroken">
  -        Is tag pooling broken? It doesn't call release!
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    It is not broken, your tag probably is. Many bug reports
  -    have been filed about this.
  -     <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001">
  -        Here
  -     </a>
  -    is the bug report with all the gory details.
  -  </div><br>
  -
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="illegalstate">
  -        Why do I get <code>java.lang.IllegalStateException</code>?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    These are the most common reasons how you can get an
  -    <code>java.lang.IllegalStateException</code>:
  -
  -    <ul>
  -      <li>Calling <code>setBufferSize</code> and content has been written.</li>
  -
  -      <li> The response has been committed and you do any of the following:
  -       <ul>
  -        <li>Calling <code>ServletResponse.reset()</code> or
  -            <code>ServletResponse.resetBuffer()</code>
  -        </li>
  -
  -        <li>Calling either <code>HttpServletResponse.sendError()</code>
  -            or <code>HttpServletResponse.sendRedirect()</code>.
  -        </li>
  -
  -        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  -            a <code>jsp:forward</code>
  -        </li>
  -
  -        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  -            a <code>jsp:forward</code>
  -        </li>
  -       </ul>
  -      </li>
  -    </ul>
  -
  -    Remember that if you call <code>forward()</code> or
  -    <code>sendRedirect()</code>, any following lines of code will still execute.
  -    For example:
  -    <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
  -{
  -  ...
  -  response.sendRedirect("foo.jsp");
  -  // At this point, you should probably have a return statement otherwise
  -  // the following code will run
  -  System.out.println("After redirect! By the way ...");
  -  System.out.println("Use commons-logging or log4j, not System.out");
  -  System.out.println("System.out is a bad practice!");
  -
  -  response.sendRedirect("bar.jsp"); /* This will throw an error! */
  -
  -}
  -    </pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr></table></div>
  -
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="schedule">
  -        How do I make a scheduled event on Tomcat?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Tomcat does not support this directly. Its not part of the Servlet or
  -    JSP Specification. <br>
  -    If you do need this functionality see
  -    <a href="http://marc.theaimsgroup.com/?t=106192918700004&r=1&w=2">
  -        this thread
  -    </a> or
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106157051231075&w=2">
  -    this link</a>.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="baddtd">
  -        What is <code>Element "web-app" does not allow "servlet" here</code>?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Your web.xml is not well formed or it is not conforming to the DTD as
  -    defined by the servlet spec. Use an XML validator to ensure
  -    your web.xml file is ok.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="catalina.out">
  -        Where does System.out go? <br>
  -        How do I rotate catalina.out?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <code>System.out</code> and <code>System.err</code> both print to
  -    catalina.out. But you can suppress this via the swallowOutput property and
  -    sent to different log files.
  -    <br>
  -    catalina.out does not rotate. But it should not be an issue because
  -    nothing should be printing to standard output since you are using a logging
  -    package, right?
  -  <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106623436423859&w=2"> A log4j example</a>  and
  -  <a href="http://marc.theaimsgroup.com/?t=105544472600001&r=1&w=2">a thread about rotation of catalina.out</a>
  -
  -  </div><br>
  -
  -  <b style="font-size: larger">
  -      <a name="getResourceAsStream">
  -       How do open a file for reading in my webapp?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Use <tt>ServletContext.getResourceAsStream()</tt>.
  -  </div><br>
  -
  -</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
  -        Copyright &copy; 1999-2003, Apache Software Foundation
  +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Tomcat FAQ - Miscellaneous Questions</title><meta value="Tim Funk" name="author"><meta value="funkman@apache.org" name="email"><style>
  +      dt { font-size : larger;  font-weight : bold }
  +      dd {padding-bottom : 10px;}
  +    </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%" border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project" align="left" src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
  +      Tomcat FAQ
  +    " align="right" src="../images/tomcat.gif"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--LEFT SIDE NAVIGATION--><td nowrap="true" valign="top" width="20%"><p><strong>Links</strong></p><ul><li><a href="..">Tomcat Home</a></li><li><a href="index.html">FAQ Home</a></li></ul><p><strong>Contents</strong></p><ul><li><a href="bugs.html">Bugs</a></li><li><a href="classnotfound.html">Class Not Found</a></li><li><a href="connectors.html">Connectors</a></li><li><a href="database.html">Database</a></li><li><a href="http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Howto">How do I</a></li><li><a href="unix.html">Linux / Unix</a></li><li><a href="memory.html">Memory</a></li><li><a href="meta.html">Meta</a></li><li><a href="misc.html">Miscellaneous</a></li><li><a href="performance.html">Monitoring / Performance</a></li><li><a href="http://nagoya.apache.org/wiki/apachewiki.cgi?Tomcat/Links">Other Resources</a></li><li><a href="security.html">Security</a></li><li><a href="version.html">Which Version</a></li><li><a href="tomcatuser.html">Tomcat User List</a></li><li><a href="windows.html">Windows</a></li></ul></td><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td nowrap="true" valign="top" align="left"><h1>Tomcat FAQ</h1><h2>Miscellaneous Questions</h2></td><td nowrap="true" valign="top" align="right"><small><a href="printer/misc.html"><img alt="Printer Friendly Version" border="0" src="../images/printer.gif"><br>print-friendly<br>version
  +                    </a></small></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
  +<p>
  +Questions that were not categorized.
  +</p>
  +<p>
  +  <em>Tomcat 4.1.27 has a bug with respect to webapp reloading which requires a hotfix.
  +    <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22096">
  +      Here are more details.
  +    </a>
  +  </em>
  +</p>
  +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
  +<p>
  +  <ul>
  +    <li>
  +      <a href="#compile">
  +        I am unable to compile my JSP!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#invoker">
  +        I can't get servlets to work under <code>/servlet/*</code>!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#evil">
  +        Why is the invoker evil?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#version">
  +        How to I get Tomcat's version number?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#cpu">
  +        Tomcat eats 100% of the CPU!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#properties">
  +        How do I set system properties at startup?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#error">
  +        How do I get a customized error page?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#le">
  +        Should I use the LE version?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#persist">
  +        How do I configure Tomcat to NOT to store the sessions during shutdown?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#tagpool">
  +        How do I disable tag pooling?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#dtd">
  +        Is there a DTD for server.xml?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#welcome">
  +        How do I change the welcome file?
  +            (I want to show index.jsp instead of index.html)
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#listing">
  +        How do I enable/disable directory listings?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#ip">
  +        How do I make Tomcat listen on a specific IP
  +            address instead of all available addresses?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#symlink">
  +        How do I use symbolic links with jars?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#utf8">
  +        How do I get UTF-8?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#saveas">
  +        How do I change the name of the file in the download Save-As dialog
  +        from a servlet? (or jsp)
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#tagbroken">
  +        Is tag pooling broken? It doesn't call release!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#illegalstate">
  +        Why do I get <code>java.lang.IllegalStateException</code>?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#schedule">
  +        How do I make a scheduled event on Tomcat?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#baddtd">
  +        What is <code>Element "web-app" does not allow "servlet" here</code>?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#catalina.out">
  +        Where does System.out go? <br>
  +        How do I rotate catalina.out?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#getResourceAsStream">
  +        How do open a file for reading in my webapp?
  +      </a>
  +    </li>
  +  </ul>
  +</p>
  +
  +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
  +
  +  <b style="font-size: larger">
  +    <a name="compile">I am unable to compile my JSP!</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Are you seeing this?
  +    <pre>
  +      org.apache.jasper.JasperException: Unable to compile
  +      class for JSP
  +
  +      An error occurred at line: -1 in the jsp file: null
  +
  +      Generated servlet error:
  +          [javac] Since fork is true, ignoring compiler
  +      setting.
  +          [javac] Compiling 1 source file
  +         [javac] Since fork is true, ignoring compiler
  +      setting.
  +
  +    </pre>
  +
  +    If so, here is some solutions:
  +    <ul>
  +      <li>
  +        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104949554010352&w=2">
  +          Environment variable issue
  +        </a>
  +      </li>
  +      <li>
  +        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16688">
  +            Environment issue
  +        </a>
  +        or
  +        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20527">
  +            Ant issue
  +        </a>
  +      </li>
  +      <li>
  +        Others have had success by added JAVA_HOME/bin to their PATH.
  +        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105525594928279&w=2">
  +            1
  +        </a>
  +
  +        ...
  +
  +        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105526353505541&w=2">
  +            2
  +        </a>
  +        and make sure you are using the full JDK and not the JRE.
  +      </li>
  +     </ul>
  +
  +    In the case of the Environment issues, it is typical that on Windows, the
  +    startup scripts work fine and the service does not. The service uses
  +    registry values to look for java and other "stuff". To save yourself some
  +    trouble, see if the
  +    <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  +                NT Service Config Utility
  +    </a> is helpful.
  +    </div><br>
  +
  +
  +    <b style="font-size: larger">
  +      <a name="invoker">
  +        I can't get servlets to work under <code>/servlet/*</code>!
  +      </a>
  +    </b>
  +    <div style="padding-left : 20px;">
  +        Using <code>/servlet/</code> to map servlets is evil, absolutely evil.
  +        Even more evil than
  +        <a href="http://www.eviloverlord.com/lists/overlord.html">
  +          this
  +        </a>.
  +
  +        That being said, here are some threads that may answer this:
  +        <ul>
  +          <li>
  +            <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=103417249925541&w=2">
  +              [SECURITY] Apache Tomcat 4.x JSP source disclosure vulnerability
  +            </a>
  +          </li>
  +          <li>
  +            <a href="http://marc.theaimsgroup.com/?t=103945337100003&r=1&w=2">
  +              Cannot Run Servlets, only JSP's, Part II
  +            </a>
  +          </li>
  +          <li>
  +            <a href="http://marc.theaimsgroup.com/?t=104326854100001&r=1&w=2">
  +              Tomcat configuration problem: JSPs work, servlets don
  +            </a>
  +          </li>
  +        </ul>
  +    </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="evil">Why is the invoker evil?</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <i>This is opinions of the writer (YMMV)</i> <br>
  +    <em>Quickie about the invoker:</em> The invoker is a dynamic servlet which
  +    allows run-time
  +    loading of other servlets based on class name. This servlet is the one
  +    that allows
  +    <code>http://localhost/servlet/com.foo.MyClass?more=cowbell</code>, where
  +    <code>com.foo.MyClass</code> is some class which can be loaded as
  +    a servlet but was never explicitly declared in a config file.
  +
  +    <br><br>
  +
  +    Evil because:
  +    <ul>
  +      <li>Security risk ... see links above</li>
  +      <li>
  +        Configuration hiding - There is NO way to determine which servlets are
  +        used vs which are not used. In web.xml, every servlet is declared
  +        and mapped.
  +        In that one file you instantly have a road map to how the webapp works.
  +      </li>
  +      <li>
  +        Back doors. Servlets which <b>are</b> mapped can be alternately
  +        called via the
  +        invoker by class name. Since the URL is different, all security
  +        constraints might be ignored since the URL pattern is VERY different.
  +      </li>
  +      <li>
  +        Back doors. Bad programmers make it easier to do bad things.
  +      </li>
  +      <li>
  +        Back doors. It may be common to use common 3rd party jars in a
  +        shared area. If that shared jar has servlets in them and that servlet
  +        has a hole in it, bad things happen.
  +      </li>
  +      <li>
  +        Configuration hiding - it's important enough to say twice. Explicit
  +        declaration while a PITA, will be more helpful in the maintenance
  +        scheme of your webapp.
  +      </li>
  +    </ul>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="version">How to I get Tomcat's version number?</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <code>javax.servlet.ServletContext.getServerInfo();</code>
  +  </div><br>
  +
  +  <b style="font-size: larger">
  +    <a name="cpu">Tomcat eats 100% of the CPU!</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Odds are, it might be the garbage collector going wacky. <br> <br>
  +
  +    In 1.4.1 JVMs there is a memory leak which could hampering the
  +    garbage collector.
  +    <a href="http://developer.java.sun.com/developer/bugParade/bugs/4724129.html">
  +       More information
  +    </a>
  +
  +    Otherwise - get a memory profiler and/or tweak your memory settings.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +    <a name="properties">
  +        How do I set system properties at startup?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Set <code>JAVA_OPTS</code> to be something BEFORE calling startup.bat
  +    or before calling catalina.bat. (or you can edit those files, but it
  +    isn't advised)
  +
  +    <br><br>
  +
  +    <em>Example (windows): </em>
  +    <code>SET JAVA_OPTS='-DpropName=propValue'</code>
  +    <br><br>
  +
  +    <em>Example (UNIX): </em>
  +    <code>export JAVA_OPTS='-DpropName=propValue'</code>
  +
  +    <br><br>
  +
  +    Windows service users -
  +            <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  +             use this</a>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="error">
  +      How do I get a customized error page?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    In web.xml ...
  +    <pre>
  +        &lt;error-page&gt;
  +            &lt;error-code&gt;404&lt;/error-code&gt;
  +            &lt;location&gt;/error/404.html&lt;/location&gt;
  +        &lt;/error-page&gt;
  +    </pre>
  +
  +    You may also catch error 500's as well as other specific exceptions or
  +    exceptions which extend <tt>Throwable</tt>.
  +    <br>
  +    For more information, see the Servlet Specification for all the gory
  +    details of how you can play with this.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="le">Should I use the LE version?</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    No. It was an experiment, it failed. (YMMV) The original purpose
  +    of LE was because jdk1.4 provides a LOT of standard functionality
  +    that Tomcat uses that was not in jdk1.3. So to save some space
  +    two distributions were made to save some bandwidth. Since then,
  +    it has been an exercise in confusion. (Flame me if you disagree)
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&=105341005928071&w=2">
  +        More info
  +    </a>
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +    <a name="persist">
  +      How do I configure Tomcat to NOT to store the sessions during shutdown?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html">
  +        Look at the Session manager component and tweak accordingly.
  +    </a>
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +    <a name="tagpool">
  +      How do I disable tag pooling?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    To disable tag pooling:
  +    See $TOMCAT_HOME/conf/web.xml --&gt; enablePooling=false for the jsp servlet
  +    declaration.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="dtd">
  +        Is there a DTD for server.xml?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    No! Nor can one accurately exist.
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104205666221372&w=2">
  +       Here's why
  +    </a>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="welcome">
  +        How do I change the welcome file? (
  +                I want to show index.jsp instead of index.html)
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    This is done in web.xml by changing <code>welcome-files-list</code>.
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104566785828794&w=2">
  +      More detail.
  +    </a>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="listing">
  +        How do I enable/disable directory listings?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    This is done in TOMCAT_HOME/conf/web.xml by changing the <code>listings</code>
  +    property for the <code>default</code> servlet.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="ip">
  +        How do I make Tomcat listen on a specific IP
  +            address instead of all available addresses?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +     RTFM! [Add the property <code>address='127.0.0.1'</code>
  +     to your Connector config.]
  +     For more detail:
  +     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk.html">
  +        JK</a>,
  +     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/http11.html">
  +        http</a> (legacy),
  +     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html">
  +        http</a> (coyote).
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="symlink">
  +        How do I use symbolic links with jars?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    You'll need to tweak with server.xml and
  +     <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105159411609623&w=2">
  +         do this.
  +     </a> (Don't worry - its really easy!)
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="utf8">
  +        How do I get UTF-8?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    This
  +     <a href="http://marc.theaimsgroup.com/?t=105524444400002&r=1&w=2">
  +         thread
  +     </a>
  +     should answer that.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="saveas">
  +        How do I change the name of the file in the download Save-As dialog
  +        from a servlet? (or jsp)
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Use the
  +     <a href="http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html">
  +         Content-Disposition
  +     </a>
  +     header.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="tagbroken">
  +        Is tag pooling broken? It doesn't call release!
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    It is not broken, your tag probably is. Many bug reports
  +    have been filed about this.
  +     <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001">
  +        Here
  +     </a>
  +    is the bug report with all the gory details.
  +  </div><br>
  +
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="illegalstate">
  +        Why do I get <code>java.lang.IllegalStateException</code>?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    These are the most common reasons how you can get an
  +    <code>java.lang.IllegalStateException</code>:
  +
  +    <ul>
  +      <li>Calling <code>setBufferSize</code> and content has been written.</li>
  +
  +      <li> The response has been committed and you do any of the following:
  +       <ul>
  +        <li>Calling <code>ServletResponse.reset()</code> or
  +            <code>ServletResponse.resetBuffer()</code>
  +        </li>
  +
  +        <li>Calling either <code>HttpServletResponse.sendError()</code>
  +            or <code>HttpServletResponse.sendRedirect()</code>.
  +        </li>
  +
  +        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  +            a <code>jsp:forward</code>
  +        </li>
  +
  +        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  +            a <code>jsp:forward</code>
  +        </li>
  +       </ul>
  +      </li>
  +    </ul>
  +
  +    Remember that if you call <code>forward()</code> or
  +    <code>sendRedirect()</code>, any following lines of code will still execute.
  +    For example:
  +    <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
  +{
  +  ...
  +  response.sendRedirect("foo.jsp");
  +  // At this point, you should probably have a return statement otherwise
  +  // the following code will run
  +  System.out.println("After redirect! By the way ...");
  +  System.out.println("Use commons-logging or log4j, not System.out");
  +  System.out.println("System.out is a bad practice!");
  +
  +  response.sendRedirect("bar.jsp"); /* This will throw an error! */
  +
  +}
  +    </pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../images/void.gif"></td></tr></table></div>
  +
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="schedule">
  +        How do I make a scheduled event on Tomcat?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Tomcat does not support this directly. Its not part of the Servlet or
  +    JSP Specification. <br>
  +    If you do need this functionality see
  +    <a href="http://marc.theaimsgroup.com/?t=106192918700004&r=1&w=2">
  +        this thread
  +    </a> or
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106157051231075&w=2">
  +    this link</a>.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="baddtd">
  +        What is <code>Element "web-app" does not allow "servlet" here</code>?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Your web.xml is not well formed or it is not conforming to the DTD as
  +    defined by the servlet spec. Use an XML validator to ensure
  +    your web.xml file is ok.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="catalina.out">
  +        Where does System.out go? <br>
  +        How do I rotate catalina.out?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <code>System.out</code> and <code>System.err</code> both print to
  +    catalina.out. But you can suppress this via the swallowOutput property and
  +    sent to different log files.
  +    <br>
  +    catalina.out does not rotate. But it should not be an issue because
  +    nothing should be printing to standard output since you are using a logging
  +    package, right?
  +  <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106623436423859&w=2"> A log4j example</a>  and
  +  <a href="http://marc.theaimsgroup.com/?t=105544472600001&r=1&w=2">a thread about rotation of catalina.out</a>
  +
  +  </div><br>
  +
  +  <b style="font-size: larger">
  +      <a name="getResourceAsStream">
  +       How do open a file for reading in my webapp?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Use <tt>ServletContext.getResourceAsStream()</tt>.
  +  </div><br>
  +
  +</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
  +        Copyright &copy; 1999-2003, Apache Software Foundation
           </em></font></div></td></tr></table></body></html>
  
  
  
  1.8       +632 -625  jakarta-tomcat-site/docs/faq/printer/misc.html
  
  Index: misc.html
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-site/docs/faq/printer/misc.html,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- misc.html	16 Oct 2003 07:46:16 -0000	1.7
  +++ misc.html	25 Oct 2003 20:31:39 -0000	1.8
  @@ -1,626 +1,633 @@
  -<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Tomcat FAQ - Miscellaneous Questions</title><meta value="Tim Funk" name="author"><meta value="funkman@apache.org" name="email"><style>
  -      dt { font-size : larger;  font-weight : bold }
  -      dd {padding-bottom : 10px;}
  -    </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%" border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project" align="left" src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
  -      Tomcat FAQ
  -    " align="right" src="../../images/tomcat.gif"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td nowrap="true" valign="top" align="left"><h1>Tomcat FAQ</h1><h2>Miscellaneous Questions</h2></td><td nowrap="true" valign="top" align="right"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
  -<p>
  -Questions that were not categorized.
  -</p>
  -</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
  -<p>
  -  <ul>
  -    <li>
  -      <a href="#compile">
  -        I am unable to compile my JSP!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#invoker">
  -        I can't get servlets to work under <code>/servlet/*</code>!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#evil">
  -        Why is the invoker evil?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#version">
  -        How to I get Tomcat's version number?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#cpu">
  -        Tomcat eats 100% of the CPU!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#properties">
  -        How do I set system properties at startup?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#error">
  -        How do I get a customized error page?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#le">
  -        Should I use the LE version?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#persist">
  -        How do I configure Tomcat to NOT to store the sessions during shutdown?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#tagpool">
  -        How do I disable tag pooling?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#dtd">
  -        Is there a DTD for server.xml?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#welcome">
  -        How do I change the welcome file?
  -            (I want to show index.jsp instead of index.html)
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#listing">
  -        How do I enable/disable directory listings?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#ip">
  -        How do I make Tomcat listen on a specific IP
  -            address instead of all available addresses?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#symlink">
  -        How do I use symbolic links with jars?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#utf8">
  -        How do I get UTF-8?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#saveas">
  -        How do I change the name of the file in the download Save-As dialog
  -        from a servlet? (or jsp)
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#tagbroken">
  -        Is tag pooling broken? It doesn't call release!
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#illegalstate">
  -        Why do I get <code>java.lang.IllegalStateException</code>?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#schedule">
  -        How do I make a scheduled event on Tomcat?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#baddtd">
  -        What is <code>Element "web-app" does not allow "servlet" here</code>?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#catalina.out">
  -        Where does System.out go? <br>
  -        How do I rotate catalina.out?
  -      </a>
  -    </li>
  -    <li>
  -      <a href="#getResourceAsStream">
  -        How do open a file for reading in my webapp?
  -      </a>
  -    </li>
  -  </ul>
  -</p>
  -
  -</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
  -
  -  <b style="font-size: larger">
  -    <a name="compile">I am unable to compile my JSP!</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Are you seeing this?
  -    <pre>
  -      org.apache.jasper.JasperException: Unable to compile
  -      class for JSP
  -
  -      An error occurred at line: -1 in the jsp file: null
  -
  -      Generated servlet error:
  -          [javac] Since fork is true, ignoring compiler
  -      setting.
  -          [javac] Compiling 1 source file
  -         [javac] Since fork is true, ignoring compiler
  -      setting.
  -
  -    </pre>
  -
  -    If so, here is some solutions:
  -    <ul>
  -      <li>
  -        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104949554010352&w=2">
  -          Environment variable issue
  -        </a>
  -      </li>
  -      <li>
  -        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16688">
  -            Environment issue
  -        </a>
  -        or
  -        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20527">
  -            Ant issue
  -        </a>
  -      </li>
  -      <li>
  -        Others have had success by added JAVA_HOME/bin to their PATH.
  -        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105525594928279&w=2">
  -            1
  -        </a>
  -
  -        ...
  -
  -        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105526353505541&w=2">
  -            2
  -        </a>
  -        and make sure you are using the full JDK and not the JRE.
  -      </li>
  -     </ul>
  -
  -    In the case of the Environment issues, it is typical that on Windows, the
  -    startup scripts work fine and the service does not. The service uses
  -    registry values to look for java and other "stuff". To save yourself some
  -    trouble, see if the
  -    <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  -                NT Service Config Utility
  -    </a> is helpful.
  -    </div><br>
  -
  -
  -    <b style="font-size: larger">
  -      <a name="invoker">
  -        I can't get servlets to work under <code>/servlet/*</code>!
  -      </a>
  -    </b>
  -    <div style="padding-left : 20px;">
  -        Using <code>/servlet/</code> to map servlets is evil, absolutely evil.
  -        Even more evil than
  -        <a href="http://www.eviloverlord.com/lists/overlord.html">
  -          this
  -        </a>.
  -
  -        That being said, here are some threads that may answer this:
  -        <ul>
  -          <li>
  -            <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=103417249925541&w=2">
  -              [SECURITY] Apache Tomcat 4.x JSP source disclosure vulnerability
  -            </a>
  -          </li>
  -          <li>
  -            <a href="http://marc.theaimsgroup.com/?t=103945337100003&r=1&w=2">
  -              Cannot Run Servlets, only JSP's, Part II
  -            </a>
  -          </li>
  -          <li>
  -            <a href="http://marc.theaimsgroup.com/?t=104326854100001&r=1&w=2">
  -              Tomcat configuration problem: JSPs work, servlets don
  -            </a>
  -          </li>
  -        </ul>
  -    </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="evil">Why is the invoker evil?</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <i>This is opinions of the writer (YMMV)</i> <br>
  -    <em>Quickie about the invoker:</em> The invoker is a dynamic servlet which
  -    allows run-time
  -    loading of other servlets based on class name. This servlet is the one
  -    that allows
  -    <code>http://localhost/servlet/com.foo.MyClass?more=cowbell</code>, where
  -    <code>com.foo.MyClass</code> is some class which can be loaded as
  -    a servlet but was never explicitly declared in a config file.
  -
  -    <br><br>
  -
  -    Evil because:
  -    <ul>
  -      <li>Security risk ... see links above</li>
  -      <li>
  -        Configuration hiding - There is NO way to determine which servlets are
  -        used vs which are not used. In web.xml, every servlet is declared
  -        and mapped.
  -        In that one file you instantly have a road map to how the webapp works.
  -      </li>
  -      <li>
  -        Back doors. Servlets which <b>are</b> mapped can be alternately
  -        called via the
  -        invoker by class name. Since the URL is different, all security
  -        constraints might be ignored since the URL pattern is VERY different.
  -      </li>
  -      <li>
  -        Back doors. Bad programmers make it easier to do bad things.
  -      </li>
  -      <li>
  -        Back doors. It may be common to use common 3rd party jars in a
  -        shared area. If that shared jar has servlets in them and that servlet
  -        has a hole in it, bad things happen.
  -      </li>
  -      <li>
  -        Configuration hiding - it's important enough to say twice. Explicit
  -        declaration while a PITA, will be more helpful in the maintenance
  -        scheme of your webapp.
  -      </li>
  -    </ul>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="version">How to I get Tomcat's version number?</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <code>javax.servlet.ServletContext.getServerInfo();</code>
  -  </div><br>
  -
  -  <b style="font-size: larger">
  -    <a name="cpu">Tomcat eats 100% of the CPU!</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Odds are, it might be the garbage collector going wacky. <br> <br>
  -
  -    In 1.4.1 JVMs there is a memory leak which could hampering the
  -    garbage collector.
  -    <a href="http://developer.java.sun.com/developer/bugParade/bugs/4724129.html">
  -       More information
  -    </a>
  -
  -    Otherwise - get a memory profiler and/or tweak your memory settings.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -    <a name="properties">
  -        How do I set system properties at startup?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Set <code>JAVA_OPTS</code> to be something BEFORE calling startup.bat
  -    or before calling catalina.bat. (or you can edit those files, but it
  -    isn't advised)
  -
  -    <br><br>
  -
  -    <em>Example (windows): </em>
  -    <code>SET JAVA_OPTS='-DpropName=propValue'</code>
  -    <br><br>
  -
  -    <em>Example (UNIX): </em>
  -    <code>export JAVA_OPTS='-DpropName=propValue'</code>
  -
  -    <br><br>
  -
  -    Windows service users -
  -            <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  -             use this</a>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="error">
  -      How do I get a customized error page?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    In web.xml ...
  -    <pre>
  -        &lt;error-page&gt;
  -            &lt;error-code&gt;404&lt;/error-code&gt;
  -            &lt;location&gt;/error/404.html&lt;/location&gt;
  -        &lt;/error-page&gt;
  -    </pre>
  -
  -    You may also catch error 500's as well as other specific exceptions or
  -    exceptions which extend <tt>Throwable</tt>.
  -    <br>
  -    For more information, see the Servlet Specification for all the gory
  -    details of how you can play with this.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -    <a name="le">Should I use the LE version?</a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    No. It was an experiment, it failed. (YMMV) The original purpose
  -    of LE was because jdk1.4 provides a LOT of standard functionality
  -    that Tomcat uses that was not in jdk1.3. So to save some space
  -    two distributions were made to save some bandwidth. Since then,
  -    it has been an exercise in confusion. (Flame me if you disagree)
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&=105341005928071&w=2">
  -        More info
  -    </a>
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -    <a name="persist">
  -      How do I configure Tomcat to NOT to store the sessions during shutdown?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html">
  -        Look at the Session manager component and tweak accordingly.
  -    </a>
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -    <a name="tagpool">
  -      How do I disable tag pooling?
  -    </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    To disable tag pooling:
  -    See $TOMCAT_HOME/conf/web.xml --&gt; enablePooling=false for the jsp servlet
  -    declaration.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="dtd">
  -        Is there a DTD for server.xml?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    No! Nor can one accurately exist.
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104205666221372&w=2">
  -       Here's why
  -    </a>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="welcome">
  -        How do I change the welcome file? (
  -                I want to show index.jsp instead of index.html)
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    This is done in web.xml by changing <code>welcome-files-list</code>.
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104566785828794&w=2">
  -      More detail.
  -    </a>
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="listing">
  -        How do I enable/disable directory listings?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    This is done in TOMCAT_HOME/conf/web.xml by changing the <code>listings</code>
  -    property for the <code>default</code> servlet.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="ip">
  -        How do I make Tomcat listen on a specific IP
  -            address instead of all available addresses?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -     RTFM! [Add the property <code>address='127.0.0.1'</code>
  -     to your Connector config.]
  -     For more detail:
  -     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk.html">
  -        JK</a>,
  -     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/http11.html">
  -        http</a> (legacy),
  -     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html">
  -        http</a> (coyote).
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="symlink">
  -        How do I use symbolic links with jars?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    You'll need to tweak with server.xml and
  -     <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105159411609623&w=2">
  -         do this.
  -     </a> (Don't worry - its really easy!)
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="utf8">
  -        How do I get UTF-8?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    This
  -     <a href="http://marc.theaimsgroup.com/?t=105524444400002&r=1&w=2">
  -         thread
  -     </a>
  -     should answer that.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="saveas">
  -        How do I change the name of the file in the download Save-As dialog
  -        from a servlet? (or jsp)
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Use the
  -     <a href="http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html">
  -         Content-Disposition
  -     </a>
  -     header.
  -  </div><br>
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="tagbroken">
  -        Is tag pooling broken? It doesn't call release!
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    It is not broken, your tag probably is. Many bug reports
  -    have been filed about this.
  -     <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001">
  -        Here
  -     </a>
  -    is the bug report with all the gory details.
  -  </div><br>
  -
  -
  -
  -
  -  <b style="font-size: larger">
  -      <a name="illegalstate">
  -        Why do I get <code>java.lang.IllegalStateException</code>?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    These are the most common reasons how you can get an
  -    <code>java.lang.IllegalStateException</code>:
  -
  -    <ul>
  -      <li>Calling <code>setBufferSize</code> and content has been written.</li>
  -
  -      <li> The response has been committed and you do any of the following:
  -       <ul>
  -        <li>Calling <code>ServletResponse.reset()</code> or
  -            <code>ServletResponse.resetBuffer()</code>
  -        </li>
  -
  -        <li>Calling either <code>HttpServletResponse.sendError()</code>
  -            or <code>HttpServletResponse.sendRedirect()</code>.
  -        </li>
  -
  -        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  -            a <code>jsp:forward</code>
  -        </li>
  -
  -        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  -            a <code>jsp:forward</code>
  -        </li>
  -       </ul>
  -      </li>
  -    </ul>
  -
  -    Remember that if you call <code>forward()</code> or
  -    <code>sendRedirect()</code>, any following lines of code will still execute.
  -    For example:
  -    <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
  -{
  -  ...
  -  response.sendRedirect("foo.jsp");
  -  // At this point, you should probably have a return statement otherwise
  -  // the following code will run
  -  System.out.println("After redirect! By the way ...");
  -  System.out.println("Use commons-logging or log4j, not System.out");
  -  System.out.println("System.out is a bad practice!");
  -
  -  response.sendRedirect("bar.jsp"); /* This will throw an error! */
  -
  -}
  -    </pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr></table></div>
  -
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="schedule">
  -        How do I make a scheduled event on Tomcat?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Tomcat does not support this directly. Its not part of the Servlet or
  -    JSP Specification. <br>
  -    If you do need this functionality see
  -    <a href="http://marc.theaimsgroup.com/?t=106192918700004&r=1&w=2">
  -        this thread
  -    </a> or
  -    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106157051231075&w=2">
  -    this link</a>.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="baddtd">
  -        What is <code>Element "web-app" does not allow "servlet" here</code>?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Your web.xml is not well formed or it is not conforming to the DTD as
  -    defined by the servlet spec. Use an XML validator to ensure
  -    your web.xml file is ok.
  -  </div><br>
  -
  -
  -  <b style="font-size: larger">
  -      <a name="catalina.out">
  -        Where does System.out go? <br>
  -        How do I rotate catalina.out?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    <code>System.out</code> and <code>System.err</code> both print to
  -    catalina.out. But you can suppress this via the swallowOutput property and
  -    sent to different log files.
  -    <br>
  -    catalina.out does not rotate. But it should not be an issue because
  -    nothing should be printing to standard output since you are using a logging
  -    package, right?
  -  <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106623436423859&w=2"> A log4j example</a>  and
  -  <a href="http://marc.theaimsgroup.com/?t=105544472600001&r=1&w=2">a thread about rotation of catalina.out</a>
  -
  -  </div><br>
  -
  -  <b style="font-size: larger">
  -      <a name="getResourceAsStream">
  -       How do open a file for reading in my webapp?
  -      </a>
  -  </b>
  -  <div style="padding-left : 20px;">
  -    Use <tt>ServletContext.getResourceAsStream()</tt>.
  -  </div><br>
  -
  -</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
  -        Copyright &copy; 1999-2003, Apache Software Foundation
  +<html><head><META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Tomcat FAQ - Miscellaneous Questions</title><meta value="Tim Funk" name="author"><meta value="funkman@apache.org" name="email"><style>
  +      dt { font-size : larger;  font-weight : bold }
  +      dd {padding-bottom : 10px;}
  +    </style></head><body vlink="#525D76" alink="#525D76" link="#525D76" text="#000000" bgcolor="#ffffff"><table cellspacing="4" width="100%" border="0"><!--PAGE HEADER--><tr><td colspan="2"><!--JAKARTA LOGO--><a href="http://jakarta.apache.org/"><img border="0" alt="The Jakarta Project" align="left" src="http://jakarta.apache.org//images/jakarta-logo.gif"></a><!--PROJECT LOGO--><a href="http://jakarta.apache.org/tomcat/"><img border="0" alt="
  +      Tomcat FAQ
  +    " align="right" src="../../images/tomcat.gif"></a></td></tr><!--HEADER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><tr><!--RIGHT SIDE MAIN BODY--><td align="left" valign="top" width="80%"><table cellspacing="4" width="100%" border="0"><tr><td nowrap="true" valign="top" align="left"><h1>Tomcat FAQ</h1><h2>Miscellaneous Questions</h2></td><td nowrap="true" valign="top" align="right"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Preface"><strong>Preface</strong></a></font></td></tr><tr><td><blockquote>
  +<p>
  +Questions that were not categorized.
  +</p>
  +<p>
  +  <em>Tomcat 4.1.27 has a bug with respect to webapp reloading which requires a hotfix.
  +    <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22096">
  +      Here are more details.
  +    </a>
  +  </em>
  +</p>
  +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Questions"><strong>Questions</strong></a></font></td></tr><tr><td><blockquote>
  +<p>
  +  <ul>
  +    <li>
  +      <a href="#compile">
  +        I am unable to compile my JSP!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#invoker">
  +        I can't get servlets to work under <code>/servlet/*</code>!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#evil">
  +        Why is the invoker evil?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#version">
  +        How to I get Tomcat's version number?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#cpu">
  +        Tomcat eats 100% of the CPU!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#properties">
  +        How do I set system properties at startup?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#error">
  +        How do I get a customized error page?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#le">
  +        Should I use the LE version?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#persist">
  +        How do I configure Tomcat to NOT to store the sessions during shutdown?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#tagpool">
  +        How do I disable tag pooling?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#dtd">
  +        Is there a DTD for server.xml?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#welcome">
  +        How do I change the welcome file?
  +            (I want to show index.jsp instead of index.html)
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#listing">
  +        How do I enable/disable directory listings?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#ip">
  +        How do I make Tomcat listen on a specific IP
  +            address instead of all available addresses?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#symlink">
  +        How do I use symbolic links with jars?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#utf8">
  +        How do I get UTF-8?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#saveas">
  +        How do I change the name of the file in the download Save-As dialog
  +        from a servlet? (or jsp)
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#tagbroken">
  +        Is tag pooling broken? It doesn't call release!
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#illegalstate">
  +        Why do I get <code>java.lang.IllegalStateException</code>?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#schedule">
  +        How do I make a scheduled event on Tomcat?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#baddtd">
  +        What is <code>Element "web-app" does not allow "servlet" here</code>?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#catalina.out">
  +        Where does System.out go? <br>
  +        How do I rotate catalina.out?
  +      </a>
  +    </li>
  +    <li>
  +      <a href="#getResourceAsStream">
  +        How do open a file for reading in my webapp?
  +      </a>
  +    </li>
  +  </ul>
  +</p>
  +
  +</blockquote></td></tr></table><table cellpadding="2" cellspacing="0" border="0"><tr><td bgcolor="#525D76"><font face="arial,helvetica.sanserif" color="#ffffff"><a name="Answers"><strong>Answers</strong></a></font></td></tr><tr><td><blockquote>
  +
  +  <b style="font-size: larger">
  +    <a name="compile">I am unable to compile my JSP!</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Are you seeing this?
  +    <pre>
  +      org.apache.jasper.JasperException: Unable to compile
  +      class for JSP
  +
  +      An error occurred at line: -1 in the jsp file: null
  +
  +      Generated servlet error:
  +          [javac] Since fork is true, ignoring compiler
  +      setting.
  +          [javac] Compiling 1 source file
  +         [javac] Since fork is true, ignoring compiler
  +      setting.
  +
  +    </pre>
  +
  +    If so, here is some solutions:
  +    <ul>
  +      <li>
  +        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104949554010352&w=2">
  +          Environment variable issue
  +        </a>
  +      </li>
  +      <li>
  +        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16688">
  +            Environment issue
  +        </a>
  +        or
  +        <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20527">
  +            Ant issue
  +        </a>
  +      </li>
  +      <li>
  +        Others have had success by added JAVA_HOME/bin to their PATH.
  +        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105525594928279&w=2">
  +            1
  +        </a>
  +
  +        ...
  +
  +        <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105526353505541&w=2">
  +            2
  +        </a>
  +        and make sure you are using the full JDK and not the JRE.
  +      </li>
  +     </ul>
  +
  +    In the case of the Environment issues, it is typical that on Windows, the
  +    startup scripts work fine and the service does not. The service uses
  +    registry values to look for java and other "stuff". To save yourself some
  +    trouble, see if the
  +    <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  +                NT Service Config Utility
  +    </a> is helpful.
  +    </div><br>
  +
  +
  +    <b style="font-size: larger">
  +      <a name="invoker">
  +        I can't get servlets to work under <code>/servlet/*</code>!
  +      </a>
  +    </b>
  +    <div style="padding-left : 20px;">
  +        Using <code>/servlet/</code> to map servlets is evil, absolutely evil.
  +        Even more evil than
  +        <a href="http://www.eviloverlord.com/lists/overlord.html">
  +          this
  +        </a>.
  +
  +        That being said, here are some threads that may answer this:
  +        <ul>
  +          <li>
  +            <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=103417249925541&w=2">
  +              [SECURITY] Apache Tomcat 4.x JSP source disclosure vulnerability
  +            </a>
  +          </li>
  +          <li>
  +            <a href="http://marc.theaimsgroup.com/?t=103945337100003&r=1&w=2">
  +              Cannot Run Servlets, only JSP's, Part II
  +            </a>
  +          </li>
  +          <li>
  +            <a href="http://marc.theaimsgroup.com/?t=104326854100001&r=1&w=2">
  +              Tomcat configuration problem: JSPs work, servlets don
  +            </a>
  +          </li>
  +        </ul>
  +    </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="evil">Why is the invoker evil?</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <i>This is opinions of the writer (YMMV)</i> <br>
  +    <em>Quickie about the invoker:</em> The invoker is a dynamic servlet which
  +    allows run-time
  +    loading of other servlets based on class name. This servlet is the one
  +    that allows
  +    <code>http://localhost/servlet/com.foo.MyClass?more=cowbell</code>, where
  +    <code>com.foo.MyClass</code> is some class which can be loaded as
  +    a servlet but was never explicitly declared in a config file.
  +
  +    <br><br>
  +
  +    Evil because:
  +    <ul>
  +      <li>Security risk ... see links above</li>
  +      <li>
  +        Configuration hiding - There is NO way to determine which servlets are
  +        used vs which are not used. In web.xml, every servlet is declared
  +        and mapped.
  +        In that one file you instantly have a road map to how the webapp works.
  +      </li>
  +      <li>
  +        Back doors. Servlets which <b>are</b> mapped can be alternately
  +        called via the
  +        invoker by class name. Since the URL is different, all security
  +        constraints might be ignored since the URL pattern is VERY different.
  +      </li>
  +      <li>
  +        Back doors. Bad programmers make it easier to do bad things.
  +      </li>
  +      <li>
  +        Back doors. It may be common to use common 3rd party jars in a
  +        shared area. If that shared jar has servlets in them and that servlet
  +        has a hole in it, bad things happen.
  +      </li>
  +      <li>
  +        Configuration hiding - it's important enough to say twice. Explicit
  +        declaration while a PITA, will be more helpful in the maintenance
  +        scheme of your webapp.
  +      </li>
  +    </ul>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="version">How to I get Tomcat's version number?</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <code>javax.servlet.ServletContext.getServerInfo();</code>
  +  </div><br>
  +
  +  <b style="font-size: larger">
  +    <a name="cpu">Tomcat eats 100% of the CPU!</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Odds are, it might be the garbage collector going wacky. <br> <br>
  +
  +    In 1.4.1 JVMs there is a memory leak which could hampering the
  +    garbage collector.
  +    <a href="http://developer.java.sun.com/developer/bugParade/bugs/4724129.html">
  +       More information
  +    </a>
  +
  +    Otherwise - get a memory profiler and/or tweak your memory settings.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +    <a name="properties">
  +        How do I set system properties at startup?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Set <code>JAVA_OPTS</code> to be something BEFORE calling startup.bat
  +    or before calling catalina.bat. (or you can edit those files, but it
  +    isn't advised)
  +
  +    <br><br>
  +
  +    <em>Example (windows): </em>
  +    <code>SET JAVA_OPTS='-DpropName=propValue'</code>
  +    <br><br>
  +
  +    <em>Example (UNIX): </em>
  +    <code>export JAVA_OPTS='-DpropName=propValue'</code>
  +
  +    <br><br>
  +
  +    Windows service users -
  +            <a href="http://web.bvu.edu/staff/david/tcservcfg/">
  +             use this</a>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="error">
  +      How do I get a customized error page?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    In web.xml ...
  +    <pre>
  +        &lt;error-page&gt;
  +            &lt;error-code&gt;404&lt;/error-code&gt;
  +            &lt;location&gt;/error/404.html&lt;/location&gt;
  +        &lt;/error-page&gt;
  +    </pre>
  +
  +    You may also catch error 500's as well as other specific exceptions or
  +    exceptions which extend <tt>Throwable</tt>.
  +    <br>
  +    For more information, see the Servlet Specification for all the gory
  +    details of how you can play with this.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +    <a name="le">Should I use the LE version?</a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    No. It was an experiment, it failed. (YMMV) The original purpose
  +    of LE was because jdk1.4 provides a LOT of standard functionality
  +    that Tomcat uses that was not in jdk1.3. So to save some space
  +    two distributions were made to save some bandwidth. Since then,
  +    it has been an exercise in confusion. (Flame me if you disagree)
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&=105341005928071&w=2">
  +        More info
  +    </a>
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +    <a name="persist">
  +      How do I configure Tomcat to NOT to store the sessions during shutdown?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/manager.html">
  +        Look at the Session manager component and tweak accordingly.
  +    </a>
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +    <a name="tagpool">
  +      How do I disable tag pooling?
  +    </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    To disable tag pooling:
  +    See $TOMCAT_HOME/conf/web.xml --&gt; enablePooling=false for the jsp servlet
  +    declaration.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="dtd">
  +        Is there a DTD for server.xml?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    No! Nor can one accurately exist.
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104205666221372&w=2">
  +       Here's why
  +    </a>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="welcome">
  +        How do I change the welcome file? (
  +                I want to show index.jsp instead of index.html)
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    This is done in web.xml by changing <code>welcome-files-list</code>.
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=104566785828794&w=2">
  +      More detail.
  +    </a>
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="listing">
  +        How do I enable/disable directory listings?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    This is done in TOMCAT_HOME/conf/web.xml by changing the <code>listings</code>
  +    property for the <code>default</code> servlet.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="ip">
  +        How do I make Tomcat listen on a specific IP
  +            address instead of all available addresses?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +     RTFM! [Add the property <code>address='127.0.0.1'</code>
  +     to your Connector config.]
  +     For more detail:
  +     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/jk.html">
  +        JK</a>,
  +     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/http11.html">
  +        http</a> (legacy),
  +     <a href="http://jakarta.apache.org/tomcat/tomcat-4.1-doc/config/coyote.html">
  +        http</a> (coyote).
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="symlink">
  +        How do I use symbolic links with jars?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    You'll need to tweak with server.xml and
  +     <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=105159411609623&w=2">
  +         do this.
  +     </a> (Don't worry - its really easy!)
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="utf8">
  +        How do I get UTF-8?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    This
  +     <a href="http://marc.theaimsgroup.com/?t=105524444400002&r=1&w=2">
  +         thread
  +     </a>
  +     should answer that.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="saveas">
  +        How do I change the name of the file in the download Save-As dialog
  +        from a servlet? (or jsp)
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Use the
  +     <a href="http://www.onjava.com/pub/a/onjava/excerpt/jebp_3/index3.html">
  +         Content-Disposition
  +     </a>
  +     header.
  +  </div><br>
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="tagbroken">
  +        Is tag pooling broken? It doesn't call release!
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    It is not broken, your tag probably is. Many bug reports
  +    have been filed about this.
  +     <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=16001">
  +        Here
  +     </a>
  +    is the bug report with all the gory details.
  +  </div><br>
  +
  +
  +
  +
  +  <b style="font-size: larger">
  +      <a name="illegalstate">
  +        Why do I get <code>java.lang.IllegalStateException</code>?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    These are the most common reasons how you can get an
  +    <code>java.lang.IllegalStateException</code>:
  +
  +    <ul>
  +      <li>Calling <code>setBufferSize</code> and content has been written.</li>
  +
  +      <li> The response has been committed and you do any of the following:
  +       <ul>
  +        <li>Calling <code>ServletResponse.reset()</code> or
  +            <code>ServletResponse.resetBuffer()</code>
  +        </li>
  +
  +        <li>Calling either <code>HttpServletResponse.sendError()</code>
  +            or <code>HttpServletResponse.sendRedirect()</code>.
  +        </li>
  +
  +        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  +            a <code>jsp:forward</code>
  +        </li>
  +
  +        <li>Calling <code>RequestDispatcher.forward()</code> which includes performing
  +            a <code>jsp:forward</code>
  +        </li>
  +       </ul>
  +      </li>
  +    </ul>
  +
  +    Remember that if you call <code>forward()</code> or
  +    <code>sendRedirect()</code>, any following lines of code will still execute.
  +    For example:
  +    <div align="left"><table border="0" cellpadding="0" cellspacing="4"><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr><tr><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" bgcolor="#ffffff"><pre>
  +{
  +  ...
  +  response.sendRedirect("foo.jsp");
  +  // At this point, you should probably have a return statement otherwise
  +  // the following code will run
  +  System.out.println("After redirect! By the way ...");
  +  System.out.println("Use commons-logging or log4j, not System.out");
  +  System.out.println("System.out is a bad practice!");
  +
  +  response.sendRedirect("bar.jsp"); /* This will throw an error! */
  +
  +}
  +    </pre></td><td width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr><tr><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td><td height="1" width="1" bgcolor="#023264"><img border="0" hspace="0" vspace="0" height="1" width="1" src="../../images/void.gif"></td></tr></table></div>
  +
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="schedule">
  +        How do I make a scheduled event on Tomcat?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Tomcat does not support this directly. Its not part of the Servlet or
  +    JSP Specification. <br>
  +    If you do need this functionality see
  +    <a href="http://marc.theaimsgroup.com/?t=106192918700004&r=1&w=2">
  +        this thread
  +    </a> or
  +    <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106157051231075&w=2">
  +    this link</a>.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="baddtd">
  +        What is <code>Element "web-app" does not allow "servlet" here</code>?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Your web.xml is not well formed or it is not conforming to the DTD as
  +    defined by the servlet spec. Use an XML validator to ensure
  +    your web.xml file is ok.
  +  </div><br>
  +
  +
  +  <b style="font-size: larger">
  +      <a name="catalina.out">
  +        Where does System.out go? <br>
  +        How do I rotate catalina.out?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    <code>System.out</code> and <code>System.err</code> both print to
  +    catalina.out. But you can suppress this via the swallowOutput property and
  +    sent to different log files.
  +    <br>
  +    catalina.out does not rotate. But it should not be an issue because
  +    nothing should be printing to standard output since you are using a logging
  +    package, right?
  +  <a href="http://marc.theaimsgroup.com/?l=tomcat-user&m=106623436423859&w=2"> A log4j example</a>  and
  +  <a href="http://marc.theaimsgroup.com/?t=105544472600001&r=1&w=2">a thread about rotation of catalina.out</a>
  +
  +  </div><br>
  +
  +  <b style="font-size: larger">
  +      <a name="getResourceAsStream">
  +       How do open a file for reading in my webapp?
  +      </a>
  +  </b>
  +  <div style="padding-left : 20px;">
  +    Use <tt>ServletContext.getResourceAsStream()</tt>.
  +  </div><br>
  +
  +</blockquote></td></tr></table></td></tr><!--FOOTER SEPARATOR--><tr><td colspan="2"><hr size="1" noshade=""></td></tr><!--PAGE FOOTER--><tr><td colspan="2"><div align="center"><font size="-1" color="#525D76"><em>
  +        Copyright &copy; 1999-2003, Apache Software Foundation
           </em></font></div></td></tr></table></body></html>
  
  
  
  1.7       +7 -0      jakarta-tomcat-site/xdocs-faq/misc.xml
  
  Index: misc.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-site/xdocs-faq/misc.xml,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- misc.xml	16 Oct 2003 01:42:04 -0000	1.6
  +++ misc.xml	25 Oct 2003 20:31:39 -0000	1.7
  @@ -18,6 +18,13 @@
   <p>
   Questions that were not categorized.
   </p>
  +<p>
  +  <em>Tomcat 4.1.27 has a bug with respect to webapp reloading which requires a hotfix.
  +    <a href="http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22096">
  +      Here are more details.
  +    </a>
  +  </em>
  +</p>
   </section>
   
   <section name="Questions">
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message