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 "HowTo" by mohamed omar sheriff
Date Mon, 11 Jan 2010 04:01:16 GMT
Dear Wiki user,

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

The "HowTo" page has been changed by mohamed omar sheriff.
http://wiki.apache.org/tomcat/HowTo?action=diff&rev1=82&rev2=83

--------------------------------------------------

  
   * Use a `ResourceBundle`. See the Java docs for the specifics of how the `ResourceBundle`
class works. Using this method, the properties file must go into the `WEB-INF/classes` directory
or in a jar file contained in the `WEB-INF/lib` directory.
  
-  * Another way is to use the method `getResourceAsStream()` from the `ServletContext` class.
This allows you update the file without having to reload the webapp as required by the first
method. Here is an example code snippet, without any error trapping:
+  * Another way is to use the method `getResourceAsStream()` from the `ServletContext` class.
This allows you update the file without having to reload the webapp as required by the first
method. Here is an example code snippet, without any error trapping: {{{ // Assuming you are
in a Servlet extending HttpServlet
-  {{{ // Assuming you are in a Servlet extending HttpServlet
    . // This will look for a file called "/more/cowbell.properties" relative // to your servlet
Root Context
    InputStream is = getServletContext().getResourceAsStream("/more/cowbell.properties");
Properties p = new Properties(); p.load(is); is.close(); }}}
  
@@ -861, +860 @@

  Edit your service to add the "//MS//" option to the command line. This enabled the "Monitor
Service" which puts an icon in the system tray while Tomcat is running. Right-clicking the
Tomcat monitor in the system tray allows you to produce a thread dump in stdout.
  
  === If you have Tomcat running in a console ===
- *NIX: Press CRTL-\ Microsoft Windows: press CRTL-BREAK
+                                                         *NIX: Press CRTL-\ Microsoft Windows:
press CRTL-BREAK
  
- This will produce a thread dump on standard output, but may not be possible to capture to
a file.
+                                                          This will produce a thread dump
on standard output, but may not be possible to capture to a file.
  
-                                                          '''HOW to load the jars in order'''
+  . '''                                                How to load my jars in order'''
- 
+  .
-                                                         '''How to load my jars with tomcat
classpath without adding in tomcat classpath.sh '''
+  . '''                                               How to load my jars with tomcat classpath
without adding in tomcat classpath.sh '''
  
- 

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


Mime
View raw message