tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Tomcat Wiki] Update of "FAQ/Miscellaneous" by GianlucaVarisco
Date Wed, 28 Nov 2007 21:07:26 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The following page has been changed by GianlucaVarisco:
http://wiki.apache.org/tomcat/FAQ/Miscellaneous

The comment on the change is:
added code tags where needed

------------------------------------------------------------------------------
  
  '''How to I get Tomcat's version number?'''
  
- javax.servlet.ServletContext.getServerInfo();
+ {{{javax.servlet.ServletContext.getServerInfo();}}}
  
  Starting with tomcat 5.0.28 - there is now a version.sh (or version.bat) program in the
bin directory. It will print the version number of tomcat to Standard output.
  
@@ -76, +76 @@

  How do I set system properties at startup?
  Set JAVA_OPTS to be something BEFORE calling startup.bat or before calling catalina.bat.
(or you can edit those files, but it isn't advised)
  
- Example (windows): SET JAVA_OPTS='-DpropName=propValue'
+ Example (windows): {{{SET JAVA_OPTS='-DpropName=propValue' }}}
  
- Example (UNIX): export JAVA_OPTS='-DpropName=propValue'
+ Example (UNIX): {{{export JAVA_OPTS='-DpropName=propValue' }}}
  
  Windows service users - use [http://web.bvu.edu/staff/david/tcservcfg/ this]
  
@@ -139, +139 @@

  
  It is not broken, your tag probably is. Many bug reports have been filed about this. Here
is the bug report with all the gory details.
  
- '''Why do I get java.lang.IllegalStateException?'''
+ '''Why do I get {{{java.lang.IllegalStateException}}} ?'''
  
- These are the most common reasons how you can get an java.lang.IllegalStateException:
+ These are the most common reasons how you can get an {{{java.lang.IllegalStateException}}}:
  
-  * Calling setBufferSize and content has been written.
+  * Calling {{{setBufferSize}}} and content has been written.
   * The response has been committed and you do any of the following:
-    * Calling ServletResponse.reset() or ServletResponse.resetBuffer()
+    * Calling {{{ServletResponse.reset()}}} or {{{ServletResponse.resetBuffer()}}}
-    * Calling either HttpServletResponse.sendError() or HttpServletResponse.sendRedirect().
+    * Calling either {{{HttpServletResponse.sendError()}}} or {{{HttpServletResponse.sendRedirect()}}}.
-    * Calling RequestDispatcher.forward() which includes performing a jsp:forward
+    * Calling {{{RequestDispatcher.forward()}}} which includes performing a jsp:forward
-    * Calling RequestDispatcher.forward() which includes performing a jsp:forward
+    * Calling {{{RequestDispatcher.forward()}}} which includes performing a jsp:forward
  
- Remember that if you call forward() or sendRedirect(), any following lines of code will
still execute. For example:
+ Remember that if you call {{{forward()}}} or {{{sendRedirect()}}}, any following lines of
code will still execute. For example:
  {{{		
  {
    ...
@@ -181, +181 @@

  
  ''' How do open a file for reading in my webapp?'''
  
- Use ServletContext.getResourceAsStream().
+ Use {{{ServletContext.getResourceAsStream()}}}
  
  '''Can I run tomcat with the JRE, or do I need the full JDK?'''
  
@@ -203, +203 @@

  
  See the [http://wiki.apache.org/tomcat/FAQ/Logging Logging] section of the FAQ.
  
- '''I'm getting java.lang.ThreadDeath exceptions when reloading my webapp.'''
+ '''I'm getting {{{java.lang.ThreadDeath}}} exceptions when reloading my webapp.'''
  
  See [http://issues.apache.org/bugzilla/show_bug.cgi?id=26372 Bugzilla discussion] of this.
  
@@ -217, +217 @@

  
   1. Download Tomcat's base and admin webapp distributions (binaries), unzip to a directory
of your choice. We'll use c:\temp in this example.
   2. Edit c:\temp\server\webapps\admin\WEB-INF\web.xml to remove the JSPC-generated servlet
mappings. These are marked in the web.xml file with comments indicating the beginning and
end of the JSPC section. You can simply comment out all these servlet-mappping elements. Be
careful not to comment out other servlet mappings such as the Struts dispatcher servlet.
-  3. Open c:\temp\server\webapps\admin\WEB-INF\lib\catalina-admin.jar with a zip file program
like WinZip. Remove the files named *_jsp.class, as these are the compiled JSPs. Do not remove
the other class files, the ones under the org/apache/ paths.
+  3. Open c:\temp\server\webapps\admin\WEB-INF\lib\catalina-admin.jar with a zip file program
like {{{WinZip}}}. Remove the files named *_jsp.class, as these are the compiled JSPs. Do
not remove the other class files, the ones under the org/apache/ paths.
   4. Download a Tomcat source distribution and unzip it to a directory of your choice, but
not the same directory that you used above. We'll use c:\src in this example.
   5. Copy everything '''except''' the WEB-INF/lib directory from c:\src\container\webapps\admin
to c:\temp\server\webapps\admin. Now you will have the uncompiled admin webapp JSPs.
   6. If you haven't already, define an admin user in %CATALINA_HOME%\conf\tomcat-users.xml.

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


Mime
View raw message