Re: DBCP ClassCastException

2005-05-09 Thread Lutz Zetzsche
Hi Dhiren,

Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
 Hi all,

 I'm getting a the following ClassCastException running Tomcat 5.5.9
 with MySQL

 java.lang.ClassCastException:
 org.apache.tomcat.dbcp.dbcp.BasicDataSource

 Here's the relevant code:
  *Java code:*
 org.apache.commons.dbcp.BasicDataSource datasource;

 datasource =
 (BasicDataSource)ctx.lookup(java:comp/env/jdbc/myserver);

 *web.xml*
 resource-ref
 descriptionDB Connection/description
 res-ref-namejdbc/myserver/res-ref-name
 res-typejavax.sql.DataSource/res-type
 res-authContainer/res-auth
 /resource-ref
  *server.xml*
 **
  ResourceParams name=jdbc/myserver
 parameter
 namefactory/name
 valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
 /parameter
 *...*


 This same code works in Tomcat 5.0.30.

 Has anything changed? Am I missing something?

Yes. The syntax for the Resource tag in the server.xml has changed. The 
resource parameters are no longer defined in tags nested into the 
Resource tag, but in attributes of the tag. This is an example from the 
Tomcat 5.5 documentation:

Resource   name=jdbc/TestDB auth=Container 
type=javax.sql.DataSource maxActive=100 maxIdle=30
maxWait=1 username=javauser password=javadude
driverClassName=com.mysql.jdbc.Driver

url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/

http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html


Best wishes,

Lutz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



security manager unpackWAR=false

2005-05-09 Thread Pfingstl Gernot
Switching on security manger I can add permissions to my webapp calsses e.g. 
with
grant codeBase 
file:${catalina.base}/webapps/examples/WEB-INF/classes/-

If I choose to use 'unpackWAR=false', I don't have anything in my 
${catalina.base}/webapps directory and my 'docBase' (my example.war) is 
somewhere else in my filesystem. Using codeBase as described above doesn't work.

How do I grant permissions to my apps when using unpackWAR=false ('codeBase 
jar:file:/xxx/example.war!/-' or 'codeBase file:/xxx/example.war' doesn't 
work)?

I'm using tomcat 5.5

Gernot


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



TC 5.0.28 TCP Cluster mcastBindAddr parameter ignored

2005-05-09 Thread Francois JEANMOUGIN
I have two machines with two ethernet inetrfaces. On the first machine, the
multicat annouces are made on eth0 (private network) and on the other one on
eth2 (publmic network). Setting mcastBindAddr does not correct this
behaviour. I can't see what can force tomcat to use the private interface on
both systems. I can't figure out what causes tomcat to choose one interface
or the other.

Any help appreciated,

François.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



tomcat 5.5.9 removes mycontext.xml

2005-05-09 Thread Pfingstl Gernot
I'm using tomcat 5.5.9, my server.xml contains
Host name=localhost
deployXML=false
appBase=webapps
unpackWARs=false
autoDeploy=true
deployOnStartup=true 
I tried it also with 'unpackWARs=true' - with the same result.

{catalina.base}/conf/context.xml is the default one:
Context
!-- Default set of monitored resources --
WatchedResourceWEB-INF/web.xml/WatchedResource
!-- Uncomment this to disable session persistence across Tomcat restarts -
!--
Manager pathname= /
--
/Context

I have mycontext.xml in {catalina.base}/conf/Catalina/localhost:
Context docBase=/somewhere/somewhat.war /

Every time I update my somewhat.war (I tried 'jar uf ', 'cp', 'mv'), 
mycontext.xml (at {catalina.base}/conf/Catalina/localhost) will be deleted by 
tomcat!
Why?
Is this a bug?
...or feature?

The tomcat docs 
(tomcat-docs/config/host.html#Automatic%20Application%20Deployment) says:
An update to a WAR which has been expanded will trigger an undeploy (with a 
removal of the expanded webapp), followed by a deployment

How should a deployment succeed if the mycontext.xml is removed?

Gernot


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Directory Creation in Servlet Question

2005-05-09 Thread Anto Paul
On 5/6/05, Joe Hertz [EMAIL PROTECTED] wrote:
 In Windows that's what it means too, but this isn't Windows or Linux...it's
 a JVM.
 
 Since it wasn't obvious from the code (MessageResources used in pathnames),
 let me put it another way.
 
 The code tries to create a directory /images/userid.
 
 The Servlet is apparently limited in the filepath it gets to work with. I'd
 expect that.
 
 In Windows, Tomcat executes it and it goes to C:\tomcat4\images\userid
 
 In my Suze install, Tomcat the analogous directory
 /opt/tomcat4/webapps/images
 
 I didn't check to see if it's *different* because in the code it won't be.
 It's the same identifier working off of root. Windows Tomcat puts it under
 it's webapps tree. I'm expecting Suze to do the same.
 
 I have a hard time imagining that Tomcat gets a different view of its root
 file system depending on which OS I runs on. It really ruins the concept of
 platform independence for this sort of thing.
 
 -Joe
 
  you tried to debug it. You can check what is the path before
  the directory is created. In Linux / means the root directory
  and since the path name begins with File.separator(/), the
  file is created with reference to /. For eg. if filePath is
  /anto. Then if Tomcat have write permission to root directory
  the directory will be created.
 
  --
  rgds
  Anto Paul
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

You should read the API spec of java.io.File.
http://java.sun.com/j2se/1.4.2/docs/api/java/io/File.html

If you want to get the absolute path of the application directory
use ServletContext.getRealPath(/); and pass this to the file
creating code.

-- 
rgds
Anto Paul

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Tomcat service terminated unexpectedly

2005-05-09 Thread Roberto Rios
Hi,

We have a tomcat running in a W2K Box (tomcat 4.1.30, java 1.4.1_01, W2K
SP4, Pentium Xeon 2,8Ghz, 2,5Gb ram).

Tomcat is running as a service (default installation) and time to time
(random) it crashes with the following message:

The Apache Tomcat 4.1 service terminated unexpectedly. It has done this
1 time(s). The following corrective action will be taken in 6
milliseconds: Restart the service.

The source of this message is Service Control Manager and the event id
is 7031.

After the restart, I receive more or less 120 warning messages telling
me that:

The compressed file C:\winnt\temp\jar_cacheX.tmp contains files
number that is larger than 100. The file was skipped by Real-Time scan.

Does someone experienced something like this? Any suggestion? Is there
any know issue with tomcat service?

Maybe doing an upgrade on java/tomcat?

TIA,

Bob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Tomcat service terminated unexpectedly

2005-05-09 Thread Tony
Do you perchance have the Norton virus known as anti?

-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED]
Sent: Monday, May 09, 2005 7:43 AM
To: 'Tomcat Users List'
Subject: Tomcat service terminated unexpectedly
Importance: High


Hi,

We have a tomcat running in a W2K Box (tomcat 4.1.30, java 1.4.1_01, W2K
SP4, Pentium Xeon 2,8Ghz, 2,5Gb ram).

Tomcat is running as a service (default installation) and time to time
(random) it crashes with the following message:

The Apache Tomcat 4.1 service terminated unexpectedly. It has done this
1 time(s). The following corrective action will be taken in 6
milliseconds: Restart the service.

The source of this message is Service Control Manager and the event id
is 7031.

After the restart, I receive more or less 120 warning messages telling
me that:

The compressed file C:\winnt\temp\jar_cacheX.tmp contains files
number that is larger than 100. The file was skipped by Real-Time scan.

Does someone experienced something like this? Any suggestion? Is there
any know issue with tomcat service?

Maybe doing an upgrade on java/tomcat?

TIA,

Bob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[SOLUTION] RE: TC 5.0.28 TCP Cluster mcastBindAddr parameter ignored

2005-05-09 Thread Francois JEANMOUGIN


Francois JEANMOUGIN :
 I have two machines with two ethernet inetrfaces. On the first machine,
 the
 multicat annouces are made on eth0 (private network) and on the other one
 on
 eth2 (publmic network). Setting mcastBindAddr does not correct this
 behaviour. I can't see what can force tomcat to use the private interface
 on
 both systems. I can't figure out what causes tomcat to choose one
 interface
 or the other.
 
 Any help appreciated,

There is probably something wired in the way the multicast packets are
routed. Anyway, mcastAddrBind is NEVER used. The packets are going out via
the interface of the default gateway.

I have no idea how to manage it, I just made routes corrections to solve my
problem.

François.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



logging 8443 ssl

2005-05-09 Thread Ben Kim

Tomcat 5.0.28, Fedora Core 1

Can I have a few recommendations about adding logs to port 8443, ssl? I
have a problem with SSL not responding. (http works but https does not
respond after some time.)


Regards,

Ben Kim
Developer
College of Education 
Texas AM University


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RES: Tomcat service terminated unexpectedly

2005-05-09 Thread Roberto Rios
Hi,

Thanks, and yes, we have an antivirus installed, but it's not Norton.
It's Trend's SProtect.

Bob

-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Enviada em: segunda-feira, 9 de maio de 2005 09:59
Para: Tomcat Users List; [EMAIL PROTECTED]
Assunto: RE: Tomcat service terminated unexpectedly

Do you perchance have the Norton virus known as anti?

-Original Message-
From: Roberto Rios [mailto:[EMAIL PROTECTED]
Sent: Monday, May 09, 2005 7:43 AM
To: 'Tomcat Users List'
Subject: Tomcat service terminated unexpectedly
Importance: High


Hi,

We have a tomcat running in a W2K Box (tomcat 4.1.30, java 1.4.1_01, W2K
SP4, Pentium Xeon 2,8Ghz, 2,5Gb ram).

Tomcat is running as a service (default installation) and time to time
(random) it crashes with the following message:

The Apache Tomcat 4.1 service terminated unexpectedly. It has done this
1 time(s). The following corrective action will be taken in 6
milliseconds: Restart the service.

The source of this message is Service Control Manager and the event id
is 7031.

After the restart, I receive more or less 120 warning messages telling
me that:

The compressed file C:\winnt\temp\jar_cacheX.tmp contains files
number that is larger than 100. The file was skipped by Real-Time scan.

Does someone experienced something like this? Any suggestion? Is there
any know issue with tomcat service?

Maybe doing an upgrade on java/tomcat?

TIA,

Bob


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DBCP ClassCastException

2005-05-09 Thread Dhiren Bhatia
Hi Lutz,
 I changed the Resource tag definition to:
  Resource name=jdbc/myserver auth=Container type=javax.sql.DataSource

maxActive=100 maxIdle=30 maxWait=1
driverClassName=com.mysql.jdbc.Driver/
 I'm setting the username/password and jdbcurl using code.
 I still get the same ClassCastException. Is Tomcat instantiating the 
correct DataSourceFactory?
I have the commons-dbcp-1.2.1.jar in my ${TOMCAT_HOME}/common/lib
 Thanks,
 Dhiren

 On 5/8/05, Lutz Zetzsche [EMAIL PROTECTED] wrote: 
 
 Hi Dhiren,
 
 Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
  Hi all,
 
  I'm getting a the following ClassCastException running Tomcat 5.5.9
  with MySQL
 
  java.lang.ClassCastException:
  org.apache.tomcat.dbcp.dbcp.BasicDataSource
 
  Here's the relevant code:
  *Java code:*
  org.apache.commons.dbcp.BasicDataSource datasource;
 
  datasource =
  (BasicDataSource)ctx.lookup(java:comp/env/jdbc/myserver);
 
  *web.xml*
  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/myserver/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref
  *server.xml*
  **
  ResourceParams name=jdbc/myserver
  parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  *...*
 
 
  This same code works in Tomcat 5.0.30.
 
  Has anything changed? Am I missing something?
 
 Yes. The syntax for the Resource tag in the server.xml has changed. The
 resource parameters are no longer defined in tags nested into the
 Resource tag, but in attributes of the tag. This is an example from the
 Tomcat 5.5 documentation:
 
 Resource name=jdbc/TestDB auth=Container
 type=javax.sql.DataSource maxActive=100 maxIdle=30
 maxWait=1 username=javauser password=javadude
 driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/
 
 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
 Best wishes,
 
 Lutz
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



Re: dynamic reference to files on server

2005-05-09 Thread Daniel Watrous
I'm sending my solution to my original post:

// Here I get the ClassLoader specific to this web application
java.lang.ClassLoader loader =
com.words2walls.customquote.QuoteFontType.class.getClassLoader();
// This is the package specific reference to the font (or resource)
String pathToFontFile = com/words2walls/fonts/ + filename;
// use the loader and the file reference to retrieve an InputStream to
the specific font
java.io.InputStream fis = loader.getResourceAsStream(pathToFontFile);
// Use the InputStream to create the Font object
this.font = Font.createFont(Font.TRUETYPE_FONT, fis);

Below is additional explanation:
The static method Font.createFont(Font.TRUETYPE_FONT, inputStream)
takes a constant Font.TRUETYPE_FONT and a java.io.InputStream.  My
trouble was
obtaining the input stream.  In my example in the first e-mail you
might notice that my initial work around was to create a File object
using the absolute path to my font file:
  File fontFile = new File (pathToWebapp+pathToPackage+filename);

This is why I had drive information hard coded in to my first example.
This was not desirable since This would change every time I deployed
this app to a new server.  I then used the File object to create a
FileInputStream to then create my Font object:
  FileInputStream fis = new FileInputStream(fontFile);
  font = Font.createFont(Font.TRUETYPE_FONT, fis);

So what I wanted was to load a file using the ClassLoader local to
this application.  Since the fonts are distributed with the
application There is no more need for generalization.  The tomcat
documentation was helpful to me
(http://localhost:8080/tomcat-docs/class-loader-howto.html) since it
showed that there are multiple ClassLoaders corresponding to different
tiers in tomcat:

 Bootstrap
 |
  System
 |
  Common
 /  \
Catalina   Shared
   /   \
   Webapp1  Webapp2 ...

This being the case I knew that if I could get the classloader
associated with the QuoteFontType class then this, being in the same
application, would enable be to load the fonts which were also
packaged in this application:
com.words2walls.customquote.QuoteFontType
com.words2walls.fonts.{all_font_files}

So you see my trouble was not in finding the classpath as much as it
was finding some mechanism, local to my application, that would permit
me to obtain an InputStream to fonts stored within the same
application.  As far as portability I'm not sure that other servlet
containers provide ClassLoaders following the same structure.
However, it is likely that they do since the functionality described
follows the Servlet Specification, version 2.4 -- in particular,
Sections 9.4 and 9.6..

Daniel

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: trouble with Font objects in Tomcat

2005-05-09 Thread Daniel Watrous
Thank you for the reply,
The class in my original post contains the following line:
   font = Font.createFont(Font.TRUETYPE_FONT, fis);

This is what causes my application to stall.  Another way the error
has come through is as the following:
java.lang.InternalError: Can't connect to X11 window server using
':0.0' as the value of the DISPLAY variable.
sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
sun.awt.X11GraphicsEnvironment.clinit(X11GraphicsEnvironment.java:134)
java.lang.Class.forName0(Native Method)
java.lang.Class.forName(Class.java:141)

java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:62)
java.awt.Font.initializeFont(Font.java:308)
java.awt.Font.init(Font.java:353)
java.awt.Font.createFont(Font.java:628)
com.words2walls.customquote.QuoteFontType.init(Unknown Source)
com.words2walls.customquote.QuoteFontType.clinit(Unknown Source)
com.words2walls.customquote.CustomQuote.getQuoteFontName(Unknown Source)
com.words2walls.webapp.filters.SessionQuoteFilter.doFilter(Unknown 
Source)

You explanation makes sense.  In the link you provided they mention a
better way to catch possible exceptions related to this.  Since I
don't have graphics support on my server I must set this option.

Thanks,

Daniel


On 5/7/05, farhad [EMAIL PROTECTED] wrote:
 Look at this link:
 http://java.sun.com/j2se/1.4.2/docs/guide/awt/AWTChanges.html#headless
 This option is being used when you are operating on a machine without
 graphics support (usually in a server configuration).  You will use the
 option for example when you want to do some AWT/Swing operation on the
 server side (image manipulation).  You want to check and see if you have
 graphics support on your server (on unix/linux run something like xcalc
 on the server).
 Based on your information, it is your class that has problem and has
 nothing to do with graphics.
 
 
 Daniel Watrous wrote:
 
 Is there at least someone that could tell me where to find more
 information about the option JAVA_OPTS=-Djava.awt.headless=true?
 What exactly is its purpose?  Thanks in advance.
 
 Daniel
 
 On 5/6/05, Daniel Watrous [EMAIL PROTECTED] wrote:
 
 
 Hello,
 
 I have a web application that uses java.awt.Font objects to render
 images.  The application will run in tomcat and that is where I have
 done development.  When I first tried to run the application on a
 Linux box with Tomcat 5.0.25 I got the following error:
 
 java.lang.NoClassDefFoundError
 at com.words2walls.customquote.CustomQuote.getQuoteFontName(Unknown 
  Source)
 at 
  com.words2walls.webapp.filters.SessionQuoteFilter.doFilter(Unknown Source)
 
 Here is the code call that throws the error:
 public String getQuoteFontName() {
 return QuoteFontType.getInstance(this.quoteFontCode).toString();
 }
 
 And the class that is being called:
 /*
   * QuoteFontType.java
  *
  * Created on April 15, 2005, 9:41 AM
  */
 
 package com.words2walls.customquote;
 
 import java.awt.Font;
 import java.awt.FontFormatException;
 import java.util.*;
 import java.io.*;
 
 import com.words2walls.customquote.exceptions.FontNotFoundException;
 
 /**
  * Type safe enumeration of available fonts
  *
   * @author Daniel Watrous
  */
 public class QuoteFontType {
 
 private static final String pathToWebapp = C:\\Program
 Files\\Apache Software Foundation\\Tomcat 5.0\\webapps\\words2walls;
 private static final String pathToPackage =
 \\WEB-INF\\classes\\com\\words2walls\\fonts\\;
 private String fontName;
 private int fontCode;
 private Font font;
 private static org.apache.log4j.Category cat =
 
  org.apache.log4j.Category.getInstance(QuoteFontType.class.getName());
 
 public static final QuoteFontType ADORABLE = new
 QuoteFontType(1,Adorable,adorable.ttf);
 private static final Map INSTANCES = new HashMap();
 
 static {
 cat.debug(Enter Static block to place fonts in INSTANCES Map);
 INSTANCES.put (ADORABLE.toInteger(), ADORABLE);
 cat.debug(Exit Static block with INSTANCES.size() =  +
 INSTANCES.size());
 }
 
 /** Creates a new instance of QuoteFontType */
 private QuoteFontType(int code, String fontName, String filename) {
 // create a font from the font file
 try {
 File fontFile = new File (pathToWebapp+pathToPackage+filename);
 FileInputStream fis = new FileInputStream(fontFile);
 font = Font.createFont(Font.TRUETYPE_FONT, fis);
 } catch (Exception e) {
 throw new FontNotFoundException(e);
 }
 // set member variables
 this.font = font;
 this.fontCode = code;
 this.fontName = fontName;
 }
 
 public String toString() {
 return fontName;
 }
 
 public Integer toInteger() {
 return new Integer(fontCode);
 }
 
 public static 

RE: Directory Creation in Servlet Question

2005-05-09 Thread Joe Hertz

 If you want to get the absolute path of the application 
 directory use ServletContext.getRealPath(/); and pass this 
 to the file creating code.

Yes, I could, but this again didn't explain the behavior which turned out to
be:

Try to create \images in a servlet running under Windows Tomcat, it
becomes C:\tomcat4\webapps\images.

Try to create /images in a servlet running under Suze and it becomes
/images.

I would expect to have to be /images in Windows too, except it didn't work
that way. Okay, so Tomcat effects a chroot somehow. But I then expected it
to continue under Suze and was dissapointed.

I strongly suspect that what you describe will not work under Windows Tomcat
even though it should



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Directory Creation in Servlet Question

2005-05-09 Thread Joe Hertz

 If you want to get the absolute path of the application 
 directory use ServletContext.getRealPath(/); and pass this 
 to the file creating code.

Yes, I could, but this again didn't explain the behavior which turned out to
be:

Try to create \images in a servlet running under Windows Tomcat, it
becomes C:\tomcat4\webapps\images.

Try to create /images in a servlet running under Suze and it becomes
/images.

I would expect to have to be /images in Windows too, except it didn't work
that way. Okay, so Tomcat effects a chroot somehow. But I then expected it
to continue under Suze and was dissapointed.

I strongly suspect that what you describe will not work under Windows Tomcat
even though it should



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: DBCP ClassCastException

2005-05-09 Thread Pfingstl Gernot
Tomcat 5.5 doesn't use commons-dbcp directly, the tomcat team took the source 
and put it in other packages.
So you should use org.apache.tomcat.dbcp.dbcp.BasicDataSource instead of 
org.apache.commons.dbcp.BasicDataSource in your source - btw why do you cast to 
BasicDataSource, you can use javax.sql.DataSource?

Gernot

-Ursprüngliche Nachricht-
Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 17:19
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException


Hi Lutz,
 I changed the Resource tag definition to:
  Resource name=jdbc/myserver auth=Container type=javax.sql.DataSource

maxActive=100 maxIdle=30 maxWait=1
driverClassName=com.mysql.jdbc.Driver/
 I'm setting the username/password and jdbcurl using code.
 I still get the same ClassCastException. Is Tomcat instantiating the 
correct DataSourceFactory?
I have the commons-dbcp-1.2.1.jar in my ${TOMCAT_HOME}/common/lib
 Thanks,
 Dhiren

 On 5/8/05, Lutz Zetzsche [EMAIL PROTECTED] wrote: 
 
 Hi Dhiren,
 
 Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
  Hi all,
 
  I'm getting a the following ClassCastException running Tomcat 5.5.9
  with MySQL
 
  java.lang.ClassCastException:
  org.apache.tomcat.dbcp.dbcp.BasicDataSource
 
  Here's the relevant code:
  *Java code:*
  org.apache.commons.dbcp.BasicDataSource datasource;
 
  datasource =
  (BasicDataSource)ctx.lookup(java:comp/env/jdbc/myserver);
 
  *web.xml*
  resource-ref
  descriptionDB Connection/description
  res-ref-namejdbc/myserver/res-ref-name
  res-typejavax.sql.DataSource/res-type
  res-authContainer/res-auth
  /resource-ref
  *server.xml*
  **
  ResourceParams name=jdbc/myserver
  parameter
  namefactory/name
  valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
  /parameter
  *...*
 
 
  This same code works in Tomcat 5.0.30.
 
  Has anything changed? Am I missing something?
 
 Yes. The syntax for the Resource tag in the server.xml has changed. The
 resource parameters are no longer defined in tags nested into the
 Resource tag, but in attributes of the tag. This is an example from the
 Tomcat 5.5 documentation:
 
 Resource name=jdbc/TestDB auth=Container
 type=javax.sql.DataSource maxActive=100 maxIdle=30
 maxWait=1 username=javauser password=javadude
 driverClassName=com.mysql.jdbc.Driver
 url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/
 
 
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
 Best wishes,
 
 Lutz
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DBCP ClassCastException

2005-05-09 Thread Dhiren Bhatia
I'm using BasicDataSource because javax.sql.DataSource does not have methods 
to set the driver class name, url, username/pwd etc. My app needs to support 
different databases and the driver is loaded based on which database is 
installed.
 If I use org.apache.tomcat.dbcp.dbcp.BasicDataSource, then my code is not 
portable to JBoss/Weblogic etc right? BTW, which jar is 
org.apache.tomcat.dbcp.dbcp.BasicDataSource in?
 Thanks for your response.
 Dhiren


 On 5/9/05, Pfingstl Gernot [EMAIL PROTECTED] wrote: 
 
 Tomcat 5.5 doesn't use commons-dbcp directly, the tomcat team took the 
 source and put it in other packages.
 So you should use org.apache.tomcat.dbcp.dbcp.BasicDataSource instead of 
 org.apache.commons.dbcp.BasicDataSource in your source - btw why do you 
 cast to BasicDataSource, you can use javax.sql.DataSource?
 
 Gernot
 
 -Ursprüngliche Nachricht-
 Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 09. Mai 2005 17:19
 An: Tomcat Users List
 Betreff: Re: DBCP ClassCastException
 
 
 Hi Lutz,
 I changed the Resource tag definition to:
 Resource name=jdbc/myserver auth=Container type=javax.sql.DataSource
 
 maxActive=100 maxIdle=30 maxWait=1
 driverClassName=com.mysql.jdbc.Driver/
 I'm setting the username/password and jdbcurl using code.
 I still get the same ClassCastException. Is Tomcat instantiating the
 correct DataSourceFactory?
 I have the commons-dbcp-1.2.1.jar in my ${TOMCAT_HOME}/common/lib
 Thanks,
 Dhiren
 
 On 5/8/05, Lutz Zetzsche [EMAIL PROTECTED] wrote:
 
  Hi Dhiren,
 
  Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
   Hi all,
  
   I'm getting a the following ClassCastException running Tomcat 5.5.9
   with MySQL
  
   java.lang.ClassCastException:
   org.apache.tomcat.dbcp.dbcp.BasicDataSource
  
   Here's the relevant code:
   *Java code:*
   org.apache.commons.dbcp.BasicDataSource datasource;
  
   datasource =
   (BasicDataSource)ctx.lookup(java:comp/env/jdbc/myserver);
  
   *web.xml*
   resource-ref
   descriptionDB Connection/description
   res-ref-namejdbc/myserver/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
   *server.xml*
   **
   ResourceParams name=jdbc/myserver
   parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   *...*
  
  
   This same code works in Tomcat 5.0.30.
  
   Has anything changed? Am I missing something?
 
  Yes. The syntax for the Resource tag in the server.xml has changed. The
  resource parameters are no longer defined in tags nested into the
  Resource tag, but in attributes of the tag. This is an example from the
  Tomcat 5.5 documentation:
 
  Resource name=jdbc/TestDB auth=Container
  type=javax.sql.DataSource maxActive=100 maxIdle=30
  maxWait=1 username=javauser password=javadude
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/
 
 
  
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
  Best wishes,
 
  Lutz
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



AW: DBCP ClassCastException

2005-05-09 Thread Pfingstl Gernot
You can find org.apache.tomcat.dbcp.dbcp.BasicDataSource in 
common/lib/naming-factory-dbcp.jar.
If you put commons-dbcp.jar, commons-pool.jar and commons-collections.jar in 
common/lib you (maybe) should be able to use 
org.apache.commons.dbcp.BasicDataSource. 
I do it in a similar way - I have my own ressource factory, which extends 
org.apache.commons.dbcp.BasicDataSourceFactory and it works in tomcat 5.5 with 
the above jars.

Gernot

-Ursprüngliche Nachricht-
Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 18:47
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException


I'm using BasicDataSource because javax.sql.DataSource does not have methods 
to set the driver class name, url, username/pwd etc. My app needs to support 
different databases and the driver is loaded based on which database is 
installed.
 If I use org.apache.tomcat.dbcp.dbcp.BasicDataSource, then my code is not
portable to JBoss/Weblogic etc right? BTW, which jar is 
org.apache.tomcat.dbcp.dbcp.BasicDataSource in?
 Thanks for your response.
 Dhiren


 On 5/9/05, Pfingstl Gernot [EMAIL PROTECTED] wrote: 
 
 Tomcat 5.5 doesn't use commons-dbcp directly, the tomcat team took the
 source and put it in other packages.
 So you should use org.apache.tomcat.dbcp.dbcp.BasicDataSource instead of
 org.apache.commons.dbcp.BasicDataSource in your source - btw why do you
 cast to BasicDataSource, you can use javax.sql.DataSource?
 
 Gernot
 
 -Ursprüngliche Nachricht-
 Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 09. Mai 2005 17:19
 An: Tomcat Users List
 Betreff: Re: DBCP ClassCastException
 
 
 Hi Lutz,
 I changed the Resource tag definition to:
 Resource name=jdbc/myserver auth=Container type=javax.sql.DataSource
 
 maxActive=100 maxIdle=30 maxWait=1
 driverClassName=com.mysql.jdbc.Driver/
 I'm setting the username/password and jdbcurl using code.
 I still get the same ClassCastException. Is Tomcat instantiating the
 correct DataSourceFactory?
 I have the commons-dbcp-1.2.1.jar in my ${TOMCAT_HOME}/common/lib
 Thanks,
 Dhiren
 
 On 5/8/05, Lutz Zetzsche [EMAIL PROTECTED] wrote:
 
  Hi Dhiren,
 
  Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
   Hi all,
  
   I'm getting a the following ClassCastException running Tomcat 5.5.9
   with MySQL
  
   java.lang.ClassCastException:
   org.apache.tomcat.dbcp.dbcp.BasicDataSource
  
   Here's the relevant code:
   *Java code:*
   org.apache.commons.dbcp.BasicDataSource datasource;
  
   datasource =
   (BasicDataSource)ctx.lookup(java:comp/env/jdbc/myserver);
  
   *web.xml*
   resource-ref
   descriptionDB Connection/description
   res-ref-namejdbc/myserver/res-ref-name
   res-typejavax.sql.DataSource/res-type
   res-authContainer/res-auth
   /resource-ref
   *server.xml*
   **
   ResourceParams name=jdbc/myserver
   parameter
   namefactory/name
   valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
   /parameter
   *...*
  
  
   This same code works in Tomcat 5.0.30.
  
   Has anything changed? Am I missing something?
 
  Yes. The syntax for the Resource tag in the server.xml has changed. The
  resource parameters are no longer defined in tags nested into the
  Resource tag, but in attributes of the tag. This is an example from the
  Tomcat 5.5 documentation:
 
  Resource name=jdbc/TestDB auth=Container
  type=javax.sql.DataSource maxActive=100 maxIdle=30
  maxWait=1 username=javauser password=javadude
  driverClassName=com.mysql.jdbc.Driver
  url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/
 
 
  
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
 
  Best wishes,
 
  Lutz
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Simple JavaBeans applications not working (newbie question)

2005-05-09 Thread Michael Strorm

--- Wendy Smoak [EMAIL PROTECTED] wrote:
 Before you continue, you might shut down Tomcat and
 delete the 'work' 
 directory associated with this webapp to make sure
 you're starting fresh. 
 (I assume such a thing exists in version 5, I'm
 still using 4.1.)

The work directory still exists in v5.5; it wasn't
necessary to delete it in this case (having figured
out from the first reply that the misnamed package was
the problem). Caching *did* occur to me as a potential
problem, however.

It's notable that for some pages, the error doesn't
always appear, or often different errors appear on
successive refreshes. I suspect that *that* is a
caching issue (and also that it is common enough to
have been explained several times elsewhere, so this
isn't a question, just an observation).

- MS 





___ 
Yahoo! Messenger - want a free and easy way to contact your friends online? 
http://uk.messenger.yahoo.com

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DBCP ClassCastException

2005-05-09 Thread Dhiren Bhatia
It works if I use org.apache.tomcat.dbcp.dbcp.BasicDataSource.
 I've tried adding all the commons jars to common/lib and it still doesn't 
work with org.apache.commons.dbcp.BasicDataSource. How do you get it to cast 
with your own resource factory? The way I see it, it should be the same 
thing if you're extending from org.apache.commons.dbcp.BasicDataSource.
 Just FYI...Here's what I have in commons/lib:
 commons-collections-3.1.jar* log4j.jar*
commons-dbcp-1.2.1.jar* mysql-connector-java-3.1.7-bin.jar*
commons-pool-1.2.jar* naming-factory-dbcp.jar*
jasper-compiler-jdt.jar* naming-factory.jar*
jasper-compiler.jar* naming-resources.jar*
jasper-runtime.jar* servlet-api.jar*
jsp-api.jar*

 On 5/9/05, Pfingstl Gernot [EMAIL PROTECTED] wrote: 
 
 You can find org.apache.tomcat.dbcp.dbcp.BasicDataSource in 
 common/lib/naming-factory-dbcp.jar.
 If you put commons-dbcp.jar, commons-pool.jar and commons-collections.jarin 
 common/lib you (maybe) should be able to use 
 org.apache.commons.dbcp.BasicDataSource.
 I do it in a similar way - I have my own ressource factory, which extends 
 org.apache.commons.dbcp.BasicDataSourceFactory and it works in tomcat 5.5with 
 the above jars.
 
 Gernot
 
 -Ursprüngliche Nachricht-
 Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 09. Mai 2005 18:47
 An: Tomcat Users List
 Betreff: Re: DBCP ClassCastException
 
 I'm using BasicDataSource because javax.sql.DataSource does not have 
 methods
 to set the driver class name, url, username/pwd etc. My app needs to 
 support
 different databases and the driver is loaded based on which database is
 installed.
 If I use org.apache.tomcat.dbcp.dbcp.BasicDataSource, then my code is not
 portable to JBoss/Weblogic etc right? BTW, which jar is
 org.apache.tomcat.dbcp.dbcp.BasicDataSource in?
 Thanks for your response.
 Dhiren
 
 On 5/9/05, Pfingstl Gernot [EMAIL PROTECTED] wrote:
 
  Tomcat 5.5 doesn't use commons-dbcp directly, the tomcat team took the
  source and put it in other packages.
  So you should use org.apache.tomcat.dbcp.dbcp.BasicDataSource instead of
  org.apache.commons.dbcp.BasicDataSource in your source - btw why do you
  cast to BasicDataSource, you can use javax.sql.DataSource?
 
  Gernot
 
  -Ursprüngliche Nachricht-
  Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 09. Mai 2005 17:19
  An: Tomcat Users List
  Betreff: Re: DBCP ClassCastException
 
 
  Hi Lutz,
  I changed the Resource tag definition to:
  Resource name=jdbc/myserver auth=Container type=
 javax.sql.DataSource
  
  maxActive=100 maxIdle=30 maxWait=1
  driverClassName=com.mysql.jdbc.Driver/
  I'm setting the username/password and jdbcurl using code.
  I still get the same ClassCastException. Is Tomcat instantiating the
  correct DataSourceFactory?
  I have the commons-dbcp-1.2.1.jar in my ${TOMCAT_HOME}/common/lib
  Thanks,
  Dhiren
 
  On 5/8/05, Lutz Zetzsche [EMAIL PROTECTED] wrote:
  
   Hi Dhiren,
  
   Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
Hi all,
   
I'm getting a the following ClassCastException running Tomcat 5.5.9
with MySQL
   
java.lang.ClassCastException:
org.apache.tomcat.dbcp.dbcp.BasicDataSource
   
Here's the relevant code:
*Java code:*
org.apache.commons.dbcp.BasicDataSource datasource;
   
datasource =
(BasicDataSource)ctx.lookup(java:comp/env/jdbc/myserver);
   
*web.xml*
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/myserver/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref
*server.xml*
**
ResourceParams name=jdbc/myserver
parameter
namefactory/name
valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
/parameter
*...*
   
   
This same code works in Tomcat 5.0.30.
   
Has anything changed? Am I missing something?
  
   Yes. The syntax for the Resource tag in the server.xml has changed. 
 The
   resource parameters are no longer defined in tags nested into the
   Resource tag, but in attributes of the tag. This is an example from 
 the
   Tomcat 5.5 documentation:
  
   Resource name=jdbc/TestDB auth=Container
   type=javax.sql.DataSource maxActive=100 maxIdle=30
   maxWait=1 username=javauser password=javadude
   driverClassName=com.mysql.jdbc.Driver
   url=jdbc:mysql://localhost:3306/javatest?autoReconnect=true/
  
  
  
  
 http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jndi-datasource-examples-howto.html
  
   Best wishes,
  
   Lutz
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: 

Off Topic: Tomcat monitoring tools

2005-05-09 Thread Guillaume Lahitette
Hi,

I am looking for feedback on (preferably free) tools to monitor the performance 
of Tomcat during stress testing.

We're running Tomcat 4.1.26 in production on Linux and Windows (as a service).

Ideally, the tool would support connecting to multiple, remote servers.

TIA.
Guillaume


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Off Topic: Tomcat monitoring tools

2005-05-09 Thread Peter Lin
there's a tool call jmeter from a group call Jakarta, you might have
heard of them.

Jmeter has the ability to monitor multiple tomcat's and show the
performance in a graph.

http://jakarta.apache.org/jmeter/

http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html

have fun


peter lin


On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote:
 Hi,
 
 I am looking for feedback on (preferably free) tools to monitor the 
 performance of Tomcat during stress testing.
 
 We're running Tomcat 4.1.26 in production on Linux and Windows (as a service).
 
 Ideally, the tool would support connecting to multiple, remote servers.
 
 TIA.
 Guillaume
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



AW: DBCP ClassCastException

2005-05-09 Thread Pfingstl Gernot
My factory:
import org.apache.commons.dbcp.BasicDataSource;
import org.apache.commons.dbcp.BasicDataSourceFactory;

public class MyDataSourceFactory extends BasicDataSourceFactory
{
public Object getObjectInstance(
Object obj,
Name name,
Context nameCtx,
Hashtable environment)
throws Exception
{
BasicDataSource basicDataSource =
(BasicDataSource) super.getObjectInstance(
obj,
name,
nameCtx,
environment);

if ((obj == null) || !(obj instanceof Reference))
{
return (null);
}
Reference ref = (Reference) obj;
if (!javax.sql.DataSource.equals(ref.getClassName()))
{
return (null);
}
// do some stuff here
// ...
return basicDataSource;
}
}

and of course you have to specify this factory in your context.xml (or web.xml)

Gernot

-Ursprüngliche Nachricht-
Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
Gesendet: Montag, 09. Mai 2005 19:27
An: Tomcat Users List
Betreff: Re: DBCP ClassCastException


It works if I use org.apache.tomcat.dbcp.dbcp.BasicDataSource.
 I've tried adding all the commons jars to common/lib and it still doesn't
work with org.apache.commons.dbcp.BasicDataSource. How do you get it to cast 
with your own resource factory? The way I see it, it should be the same 
thing if you're extending from org.apache.commons.dbcp.BasicDataSource.
 Just FYI...Here's what I have in commons/lib:
 commons-collections-3.1.jar* log4j.jar*
commons-dbcp-1.2.1.jar* mysql-connector-java-3.1.7-bin.jar*
commons-pool-1.2.jar* naming-factory-dbcp.jar*
jasper-compiler-jdt.jar* naming-factory.jar*
jasper-compiler.jar* naming-resources.jar*
jasper-runtime.jar* servlet-api.jar*
jsp-api.jar*

 On 5/9/05, Pfingstl Gernot [EMAIL PROTECTED] wrote: 
 
 You can find org.apache.tomcat.dbcp.dbcp.BasicDataSource in 
 common/lib/naming-factory-dbcp.jar.
 If you put commons-dbcp.jar, commons-pool.jar and commons-collections.jarin 
 common/lib you (maybe) should be able to use 
 org.apache.commons.dbcp.BasicDataSource.
 I do it in a similar way - I have my own ressource factory, which extends 
 org.apache.commons.dbcp.BasicDataSourceFactory and it works in tomcat 5.5with 
 the above jars.
 
 Gernot
 
 -Ursprüngliche Nachricht-
 Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
 Gesendet: Montag, 09. Mai 2005 18:47
 An: Tomcat Users List
 Betreff: Re: DBCP ClassCastException
 
 I'm using BasicDataSource because javax.sql.DataSource does not have 
 methods
 to set the driver class name, url, username/pwd etc. My app needs to 
 support
 different databases and the driver is loaded based on which database is
 installed.
 If I use org.apache.tomcat.dbcp.dbcp.BasicDataSource, then my code is not
 portable to JBoss/Weblogic etc right? BTW, which jar is
 org.apache.tomcat.dbcp.dbcp.BasicDataSource in?
 Thanks for your response.
 Dhiren
 
 On 5/9/05, Pfingstl Gernot [EMAIL PROTECTED] wrote:
 
  Tomcat 5.5 doesn't use commons-dbcp directly, the tomcat team took the
  source and put it in other packages.
  So you should use org.apache.tomcat.dbcp.dbcp.BasicDataSource instead of
  org.apache.commons.dbcp.BasicDataSource in your source - btw why do you
  cast to BasicDataSource, you can use javax.sql.DataSource?
 
  Gernot
 
  -Ursprüngliche Nachricht-
  Von: Dhiren Bhatia [mailto:[EMAIL PROTECTED]
  Gesendet: Montag, 09. Mai 2005 17:19
  An: Tomcat Users List
  Betreff: Re: DBCP ClassCastException
 
 
  Hi Lutz,
  I changed the Resource tag definition to:
  Resource name=jdbc/myserver auth=Container type=
 javax.sql.DataSource
  
  maxActive=100 maxIdle=30 maxWait=1
  driverClassName=com.mysql.jdbc.Driver/
  I'm setting the username/password and jdbcurl using code.
  I still get the same ClassCastException. Is Tomcat instantiating the
  correct DataSourceFactory?
  I have the commons-dbcp-1.2.1.jar in my ${TOMCAT_HOME}/common/lib
  Thanks,
  Dhiren
 
  On 5/8/05, Lutz Zetzsche [EMAIL PROTECTED] wrote:
  
   Hi Dhiren,
  
   Am Montag, 9. Mai 2005 07:36 schrieb Dhiren Bhatia:
Hi all,
   
I'm getting a the following ClassCastException running Tomcat 5.5.9
with MySQL
   
java.lang.ClassCastException:
org.apache.tomcat.dbcp.dbcp.BasicDataSource
   
Here's the relevant code:
*Java code:*
org.apache.commons.dbcp.BasicDataSource datasource;
   
datasource =
(BasicDataSource)ctx.lookup(java:comp/env/jdbc/myserver);
   
*web.xml*
resource-ref
descriptionDB Connection/description
res-ref-namejdbc/myserver/res-ref-name
res-typejavax.sql.DataSource/res-type
res-authContainer/res-auth
/resource-ref

How do you get images to cache?

2005-05-09 Thread PAlvin
Background: For my web pages, since they are dynamically generated, I
want them NOT to be stored in browsers' caches.  No problem; I know
the tags 'n such to put in the pages so they don't cache.

BUT, for my images, I DO want the images to cache in the browser's
cache to make the pages load quicker and to save Internet traffic.

Question: How do I get the images to cache?

Peter Alvin
mobile 719-210-3858
skype 'smartmicro'





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do you get images to cache?

2005-05-09 Thread Tim Funk
Google search for various http headers to add to your response:
Expires, pragma, ...
You'll probably need a filter to  implement this.
-Tim
PAlvin wrote:
Background: For my web pages, since they are dynamically generated, I
want them NOT to be stored in browsers' caches.  No problem; I know 
the tags 'n such to put in the pages so they don't cache.

BUT, for my images, I DO want the images to cache in the browser's 
cache to make the pages load quicker and to save Internet traffic.
 
Question: How do I get the images to cache?

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How do I redirect all tomcat ports to use SSL?

2005-05-09 Thread Donny R Rota
Thanks!
I found another option that implicitely does it in the web.xml file:

Adding this in between the security constraints forces all port 80 
requests through 443 automatically.

   user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
   /user-data-constraint

...Don...
--
Don Rota, CTG Operations
Rational Software, IBM Software Group
20 Maguire Road, Lexington, MA 02421-3104 
Tel: 781 676 2655, Fax: 781 676 7645 
[EMAIL PROTECTED] 



Bob Feretich [EMAIL PROTECTED] 
05/05/2005 05:08 PM

To
Donny R Rota/Lexington/[EMAIL PROTECTED], tomcat-user@jakarta.apache.org
cc

Subject
Re: How do I redirect all tomcat ports to use SSL?






The below security-constraint will make Tomcat require the use of SSL.
To have Tomcat automaitcally redirect for SSL, you must code

redirectPort=443

as part of your port=80 connector definition in the server.xml file.

Regards,
Bob Feretich

 Subject:
 Re: How do I redirect all tomcat ports to use SSL?
 From:
 Fabian Pena [EMAIL PROTECTED]
 Date:
 Thu, 05 May 2005 14:20:28 -0300
 To:
 Tomcat Users List tomcat-user@jakarta.apache.org
 
 This is an example
 
 security-constraint
 web-resource-collection
   web-resource-namesecurePages/web-resource-name
   url-pattern/index.jsp/url-pattern
   http-methodGET/http-method
   http-methodPOST/http-method
 /web-resource-collection
 auth-constraint
   role-name*/role-name
 /auth-constraint
 user-data-constraint
   transport-guaranteeCONFIDENTIAL/transport-guarantee
 /user-data-constraint
   /security-constraint
 
 Fabian
 http://www.manentiasoftware.com
 
 Donny R Rota wrote:
 Thanks, I use security-constraints now, and I've been looking for this 
answer for weeks.
 I've not found that option available.  Can you send me an URL to this?
 In the mean time, I'm going to see if I can find that option in my other 
sources.
 thanks!
 ...Don...
 
 --
 Don Rota, CTG Operations
 Rational Software, IBM Software Group
 20 Maguire Road, Lexington, MA 02421-3104 Tel: 781 676 2655, Fax: 781 
676 7645 [EMAIL PROTECTED]
 
 
 Fabian Pena [EMAIL PROTECTED] 05/04/2005 04:51 PM
 Please respond to
 Tomcat Users List
 
 
 To
 Tomcat Users List tomcat-user@jakarta.apache.org
 cc
 
 Subject
 Re: How do I redirect all tomcat ports to use SSL?
 
 
 
 
 
 
 In a web application, you can edit your web.xml file and add a 
security-constraint to redirect all application requests to SSL.
 
 I Hope this help
 
 Fabian
 
 Donny R Rota wrote:
 
 This weeks puzzler  8^)
 
 I want all my Tomcat requests to go through SSL.
 I setup tomcat, and got port 80 and port 443 (SSL) working.
 But I cannot redirect port 80 to 443.  I keep getting refused:
 
 Is there a way in Tomcat to redirect all port 80 requests to SSL(443)?
 I know you can do it the other way around 8443 - 80.
 I'm just running standalone Tomcat, no Apache.
 
 
 advTHANKSance!
 ...Don...
 
 --
 Don Rota, CTG Operations
 Rational Software, IBM Software Group
 20 Maguire Road, Lexington, MA 02421-3104
 Tel: 781 676 2655, Fax: 781 676 7645
 [EMAIL PROTECTED]
 









Re: How do you get images to cache?

2005-05-09 Thread Donny R Rota
Thanks!  I was able to fix it by putting this in the 
Catalina/localhost/wiki.xml files directly:

   Valve className=org.apache.catalina.authenticator.FormAuthenticator
  disableProxyCaching=false /

--
Don Rota, CTG Operations
Rational Software, IBM Software Group
20 Maguire Road, Lexington, MA 02421-3104 
Tel: 781 676 2655, Fax: 781 676 7645 
[EMAIL PROTECTED] 



Tim Funk [EMAIL PROTECTED] 
05/09/2005 02:05 PM
Please respond to
Tomcat Users List


To
Tomcat Users List tomcat-user@jakarta.apache.org
cc

Subject
Re: How do you get images to cache?






Google search for various http headers to add to your response:
Expires, pragma, ...

You'll probably need a filter to  implement this.

-Tim


PAlvin wrote:

 Background: For my web pages, since they are dynamically generated, I
 want them NOT to be stored in browsers' caches.  No problem; I know 
 the tags 'n such to put in the pages so they don't cache.
 
 BUT, for my images, I DO want the images to cache in the browser's 
 cache to make the pages load quicker and to save Internet traffic.
 
 Question: How do I get the images to cache?


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




DBCP monitoring

2005-05-09 Thread Gabriel Belingueres
 Hi,
 Are there any DBCP monitoring tool that allow me to monitor how many open 
connections (and other stats) does DBCP holding?
 TIA,
Gabriel


DBCP monitoring tool

2005-05-09 Thread Gabriel Belingueres
Hi,
 Are there any DBCP monitoring tool that allow me to monitor how many open 
connections (and other stats) does DBCP holding?
 TIA,
Gabriel


Re: How do I handle International Characters

2005-05-09 Thread Harry Mantheakis
Hello


 I am using Tomcat 5.0 and I am trying to receive and
 send  thai characters. Can someone please tell me the
 simplest ways to do this.


This worked for me with Japanese characters:

Use a filter to set encodings for both requests and responses:


request.setCharacterEncoding( UTF-8 );
response.setContentType( text/html; charset=UTF-8 );


Specify the following HTML header meta-tag in your JSPs:


meta http-equiv=Content-Type content=text/html; charset=UTF-8


Always specify UTF-8 as the charset.

Stick to submitting form-data with POST methods.

I have not tried encoding URI's with GET requests. If you must use URI's
with GET requests, try to limit yourself to working with ID-string
parameters, so that you can avoid encoding issues.

NOTE: Calling the 'ServletResponse.setContentType()' method (as above) is
equivalent to calling the following two ServletResponse methods together:


response.setContentType( text/html );
response.setCharacterEncoding( UTF-8 );


Browsers should (and mostly do, I think) respect the encoding you specify
when setting the response content-type (and the meta-tag content-type) so
you can simply assume (in your filter) that your form-data will be in UTF-8.

Clients still need to, of course, set their browsers to display the relevant
charsets correctly.

HTH.

Harry Mantheakis
London, UK



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Automatic WAR updates - suggestions wanted

2005-05-09 Thread Jay Burgess
Our Tomcat 5.0.19/Windows 2000 web application is self-updating.  It can
download the newest version of itself (ie. a .WAR), and then spawn a Windows
.bat file to do an app update.  This batch file shuts down Tomcat, deletes the
webapp's files and directories under Tomcat, copies the new .WAR across, and
then restarts Tomcat.  Tomcat then redeploys the new WAR.

However, very infrequently, one or more files seem to be locked in one of our
webapp subdirectories when we try to remove the current app.  (We're not yet
sure why.)  Since not all of the the subdirectories are gone, Tomcat does not
redeploy the new .WAR on restart, and our app is effectively dead in the water.

Am I missing a setting in server.xml/context.xml/web.xml that can indicate
always re-deploy a .WAR, regardless of whether the webapp subdiretory tree is
present or not?

Thanks.

Jay

| Jay Burgess [Vertical Technology Group]
| Essential Technology Links via RSS
| http://www.vtgroup.com/






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: How do I handle International Characters

2005-05-09 Thread haim
I am using the following plug-in for properties file.
http://propedit.sourceforge.jp/index_en.html
Helps when using messages resources , eliminate the need of native2ascii.exe
Regards
Haim
Harry Mantheakis wrote:
Hello
 

I am using Tomcat 5.0 and I am trying to receive and
send  thai characters. Can someone please tell me the
simplest ways to do this.
   


This worked for me with Japanese characters:
Use a filter to set encodings for both requests and responses:
   request.setCharacterEncoding( UTF-8 );
   response.setContentType( text/html; charset=UTF-8 );
Specify the following HTML header meta-tag in your JSPs:
   meta http-equiv=Content-Type content=text/html; charset=UTF-8
Always specify UTF-8 as the charset.
Stick to submitting form-data with POST methods.
I have not tried encoding URI's with GET requests. If you must use URI's
with GET requests, try to limit yourself to working with ID-string
parameters, so that you can avoid encoding issues.
NOTE: Calling the 'ServletResponse.setContentType()' method (as above) is
equivalent to calling the following two ServletResponse methods together:
   response.setContentType( text/html );
   response.setCharacterEncoding( UTF-8 );
Browsers should (and mostly do, I think) respect the encoding you specify
when setting the response content-type (and the meta-tag content-type) so
you can simply assume (in your filter) that your form-data will be in UTF-8.
Clients still need to, of course, set their browsers to display the relevant
charsets correctly.
HTH.
Harry Mantheakis
London, UK

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: DBCP monitoring tool

2005-05-09 Thread Jimmy Ray
I usually do this at the database level.  I can give
you an example of the SQL that we run to see how many
connections as well as cursors are being used by our
Thin JDBC clients to Oracle:

To get sessions/connections to oracle:
select sid,username,program from v$session
where program = 'JDBC Thin Client';

To get cursors information:
select b.name,a.* 
from v$sesstat a,v$statname b
where a.statistic# = b.statistic#
and b.name in ('opened cursors current','opened
cursors cumulative',
'session uga memory','session pga memory')
and a.sid in (select sid from v$session
where program = 'JDBC Thin Client')
order by b.name;

To get open cursors:
select * from v$open_cursor
where sid in (select sid from v$session
where program = 'JDBC Thin Client');

Regards,

Jimmy Ray

--- Gabriel Belingueres [EMAIL PROTECTED] wrote:
 Hi,
  Are there any DBCP monitoring tool that allow me to
 monitor how many open 
 connections (and other stats) does DBCP holding?
  TIA,
 Gabriel
 



Yahoo! Mail
Stay connected, organized, and protected. Take the tour:
http://tour.mail.yahoo.com/mailtour.html


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: DBCP monitoring tool

2005-05-09 Thread Remy Maucherat
On 5/9/05, Gabriel Belingueres [EMAIL PROTECTED] wrote:
 Hi,
  Are there any DBCP monitoring tool that allow me to monitor how many open
 connections (and other stats) does DBCP holding?

With Tomcat 5.5.4+, DBCP datasources should have an associated MBean,
with all the useful statistics.

-- 
x
Rémy Maucherat
Developer  Consultant
JBoss Group (Europe) SàRL
x

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



compile against servlet.jar but must run tomcat with servlet-ap1.jar

2005-05-09 Thread Fred Cook

Hi All,
We our new to Tomcat and have a bit of an odd problem.  We are  
developing a getting started project.  We have found that we must 
compile with servlet.jar in our CLASSPATH, but Tomcat will not run with 
servlet.jar in the CLASSPATH.  Tomcat will run with servlet-api.jar, but 
the test program will not compile with servlet-api.jar in the 
CLASSPATH.  To be more specific we get a:

package javax.servlet.http does not exist
error when compiling against servlet-api.jar
Similar errors ocure when running Tomcat with servlet.jar
Changing the CLASSPATH everytime we decide to compile or run isn't much 
fun.  Anybody got an idea on why this is happening, and what the 
solution is.

Tomcat vs 5.5.7
apache vs 2.0.53
RH 8.0
JDK 1.5
-Fred
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: compile against servlet.jar but must run tomcat with servlet-ap1.jar

2005-05-09 Thread Frank W. Zammetti
As a generality, a compilation should set up all required environment 
setting with each build run.  Those settings should be transitory, i.e., 
should not persists beyond that build.  So in your case you would add 
servlet.jar to the classpath temporarily, compile, and revert the 
classpath (which may happen automatically depending on how you do your 
build).

If you are using an IDE, it will almost certainly handle this for you 
via some sort of classpath setup screen.  An IDE wouldn't be worth much 
if it didn't at least handle this for you :)

If you are working from a plain command line, you have some choices...
First, write a batch file or shell script, depending on your 
environment, to do your compile.  This script would include setting the 
classpath, your javac command, and possibly restoring the classpath to 
what it was before.  Note that if on Windows you execute a batch file, 
the change to classpath is only valid for the life of that command line 
invocation, so there's no need to restore anything (unless you are 
going to sit at a command prompt in the same window and build a couple 
of times).

Second, use Ant or Maven or some other build tool.  I suggest this 
option if you aren't using an IDE for sure.

It sounds like you might be doing some sort of teaching based on the 
fact that it's a getting started project... If your going to be 
teaching anyway, or if you are just learning yourself, I suggest taking 
the dive into Ant right away.  I like Ant myself, some prefer Maven... 
the choice is yours, but I think it's fair to say that Ant is a little 
more popular at this point... Maven might be king a few months down the 
road though.  In any case, neither is difficult at all once you get the 
basics down, and it will save you a lot of trouble in the long-run.

Frank
Fred Cook wrote:

Hi All,
We our new to Tomcat and have a bit of an odd problem.  We are  
developing a getting started project.  We have found that we must 
compile with servlet.jar in our CLASSPATH, but Tomcat will not run with 
servlet.jar in the CLASSPATH.  Tomcat will run with servlet-api.jar, but 
the test program will not compile with servlet-api.jar in the 
CLASSPATH.  To be more specific we get a:

package javax.servlet.http does not exist
error when compiling against servlet-api.jar
Similar errors ocure when running Tomcat with servlet.jar
Changing the CLASSPATH everytime we decide to compile or run isn't much 
fun.  Anybody got an idea on why this is happening, and what the 
solution is.

Tomcat vs 5.5.7
apache vs 2.0.53
RH 8.0
JDK 1.5
-Fred
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Tomcat 5 slow, it's in production, please help!

2005-05-09 Thread Jeffrey
Thanks for the advice. I will try your suggestions. I
noticed that from the server status view of the tomcat
manager, I saw some thread with the status 'S' has the
time of '24685295'. Does it mean the thread has hang
there for more than 6 hours (close to 7 hours)?



--- Parsons Technical Services
[EMAIL PROTECTED] wrote:

 I think that would be the direction I would take.
 
 If you need more proof:
 
 Sniff the connection to the server to confirm the
 lack of available 
 connections. So far it is pointing in that
 direction.
 
 Another test you might do is create a connection
 from a known IP, close the 
 browser and monitor the connection status. If it is
 hanging open then start 
 digging.
 
 I think you may also be experiencing  an issue of
 clickatosis. It occurs 
 when the client doesn't think the page is responding
 quick enough and since 
 more is better after 10 or 20 clicks they decide to
 wait or give up. Mean 
 while for each click they cause a request which can
 bog things down. 
 Wrapping this with the held connections you can get
 a scenario as such:
 
 Client hits site.
 No or slow response.
 Clicks again. Or several times.
 Often closes browser and tries over.
 This creates a new connection request.
 Snowballs from there.
 
 Think about this, do you really get over a 100k
 users in six hours? Or even 
 100k page requests? That's a lot of traffic. If the
 client machines abandons 
 the connection before the server, then establishes a
 new one, it compound 
 the problem.
 
 Find a way to have the OS let Apache handle the
 connection timeout and get 
 it down to a reasonable time.
 
 Since you are inheriting this, there may be a reason
 that the connection 
 timeout is set so high. If the original creator of
 this wanted the user to 
 be able to sit on a page for a long time without
 losing the session and 
 connection thus causing the user to have to
 re-authenticate. But then there 
 is a trade off. which you are experiencing right
 now.
 
 Get the time down until the complaint about having
 to re-login get too high 
 or until the connection speed delay is acceptable.
 
 Just my $0.015
 
 Doug
 - Original Message - 
 From: Jeffrey [EMAIL PROTECTED]
 To: Tomcat Users List
 tomcat-user@jakarta.apache.org
 Sent: Saturday, May 07, 2005 1:05 PM
 Subject: Re: Tomcat 5 slow, it's in production,
 please help!
 
 
  It seems that, at least in most cases, the main
 menu
  page after a login is loaded slow. After that
 other
  pages are loaded pretty quick. Does that mean once
 a
  connection is established, browser and server
  communication is ok. If that is the case, maybe I
  should look more at the connection timeout at the
 OS
  level (solaris 5.6) since I see a lot of TIME_WAIT
 at
  the machine using the 'netstat -n' command.
 
 
  --- Jeffrey [EMAIL PROTECTED] wrote:
 
  Please see the answer embedded below.
 
  --- Parsons Technical Services
  [EMAIL PROTECTED] wrote:
 
   127421 over what period of time?
  It's about 6 hours. But most of them are at the
  first
  hour or so.
  
   Without a profile it is impossible to say if
  Tomcat
   can handle the load. But
   if the memory consumption and the CPU usage is
 low
   (as noted) it is fairly
   safe to say that Tomcat itself is not the
 bottle
   neck.
  
   Quick question, why are you using Apache?
 
  I am using Apache SSL for SSL connections. It is
 the
  original setup by someone else.
 
  
   Also what is the time out for the connection in
   Apache?
 
  Apache's Timeout value is 300.
 MaxKeepAliveRequests
  is
  100 and KeepAliveTimeout is 15
  
   Do you get this slow reaction if you are
 hitting
   Tomcat directly?
 
  I did get the slow reaction if I hit Tomcat
 directly
  at port 8080 to the same webapp. But the tomcat
  manager web pages seem show up fairly quick.
 
  
   I may be repeating something that was covered
   because I have not been
   reading this thread in detail. So sorry if
 already
   asked and answered.
  
  
   Doug
  
  
  
   - Original Message - 
   From: Jeffrey [EMAIL PROTECTED]
   To: Tomcat Users List
   tomcat-user@jakarta.apache.org
   Sent: Saturday, May 07, 2005 10:44 AM
   Subject: Re: Tomcat 5 slow, it's in production,
   please help!
  
  
This website has many JSP pages of which each
  has
   many
JSPF included. I wonder whether or not the
  system
   is
not be able to handle this kind of  setting.
 But
strange thing is that when we experienced the
slowness, I looked at the usage of CPU and
 find
   that
almost 90% of the CPU is idle.
   
Do anyone know what kind of load a tomcat can
   handle.
I am thinking that maybe a load balancer will
   help.
But I am still puzzled by the fact of low CPU
   usage at
the time of slowness.
   
From the server status view in tomcat
 manager, I
   can
see 's Request count: 127421'
   
--- Jeffrey [EMAIL PROTECTED] wrote:
I have a apache/tomcat environment that has
  some
problems 

tomcat System Administrator's Guide and SysAdmin tools

2005-05-09 Thread Steve Jacobson
All,
 We have been looking for a comprehensive System Administrator's Guide 
for Tomcat, that looks at Tomcat from the perspective of a System 
Administrator that needs to deploy tomcat and applications on tomcat.  
Most of what we have googled concentrates on deploying tomcat for a 
developer, or a development environment.  Many SysAdmins don't actually 
speak java, though, and would be looking for a guide to be able to 
support java applications on their servers without having to become java 
experts themselves.

 We are also looking for any tools that might be used to verify a 
successful installation of tomcat, beyond the index.jsp, and manager and 
admin tools.  Has anyone written anything that goes through and makes 
sure that tomcat is installed correctly, and that everything is set up 
properly, as an installation verification tool?

 For both the documentation, and the tools, if we can't find anything 
that I think fully addresses this need, we will take a stab at producing 
both.  Does anyone have any thoughts / suggestions / requests, etc... 
for such documentation and tools to include?  Also, do people think that 
there might be a place within the tomcat documentation and distribution 
for these, or should we just target making them available on our own site?

Thanks for your help.
-Steve J
--
Steve Jacobson
Support Manager
SourceLabs, Inc.
[EMAIL PROTECTED]
(206) 322-0099 x110
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


ssl SocketException: Software caused connection abort: recv failed

2005-05-09 Thread Fco Javier Jiemnez
Hello,

I have a problem with Tomcat 5.0.28 with SSL mode enabled + Struts 1.2 + 
Windows XP + j2sdk 1.4.2

When I use Tomcat in ssl mode i read this error in console every time that 
click a link aplication web.

10-may-2005 0:55:21 org.apache.tomcat.util.net.TcpWorkerThread runIt
GRAVE: Remote Host /192.168.0.1 SocketException: Software caused connection 
abort: recv failed


If  I use http in 8080, there isn't error but if I use https 8443 appears the 
error.

I uncomment server.xml to enable ssl mode in Tomcat(default port 8443) and y 
generate self-signed certificate with keytool (default password changeit)

Anybody helps me? What's the problem?


Thanks.

PD: Sorry but my english is bad ;P

RE: Off Topic: Tomcat monitoring tools

2005-05-09 Thread Guillaume Lahitette
Thank you very much Peter. Yes indeed, we've used JMeter to do our testing but 
I wasn't aware of this monitoring capability. I'm trying to install Tomcat 5 to 
give it a try since JMeter can't play with our Tomcat 4.1.26 for monitoring 
purposes.

Any other candidates out there?

TIA.
Guillaume


 -Original Message-
 From: Peter Lin [mailto:[EMAIL PROTECTED]
 Sent: 09 May 2005 18:47
 To: Tomcat Users List
 Subject: Re: Off Topic: Tomcat monitoring tools
 
 
 there's a tool call jmeter from a group call Jakarta, you might have
 heard of them.
 
 Jmeter has the ability to monitor multiple tomcat's and show the
 performance in a graph.
 
 http://jakarta.apache.org/jmeter/
 
 http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html
 
 have fun
 
 
 peter lin
 
 
 On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote:
  Hi,
  
  I am looking for feedback on (preferably free) tools to monitor 
 the performance of Tomcat during stress testing.
  
  We're running Tomcat 4.1.26 in production on Linux and Windows 
 (as a service).
  
  Ideally, the tool would support connecting to multiple, remote servers.
  
  TIA.
  Guillaume
  
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Off Topic: Tomcat monitoring tools

2005-05-09 Thread Peter Lin
there is a java console for servlet containers, but I haven't tried it.

peter

On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote:
 Thank you very much Peter. Yes indeed, we've used JMeter to do our testing 
 but I wasn't aware of this monitoring capability. I'm trying to install 
 Tomcat 5 to give it a try since JMeter can't play with our Tomcat 4.1.26 for 
 monitoring purposes.
 
 Any other candidates out there?
 
 TIA.
 Guillaume
 
 
  -Original Message-
  From: Peter Lin [mailto:[EMAIL PROTECTED]
  Sent: 09 May 2005 18:47
  To: Tomcat Users List
  Subject: Re: Off Topic: Tomcat monitoring tools
 
 
  there's a tool call jmeter from a group call Jakarta, you might have
  heard of them.
 
  Jmeter has the ability to monitor multiple tomcat's and show the
  performance in a graph.
 
  http://jakarta.apache.org/jmeter/
 
  http://jakarta.apache.org/jmeter/usermanual/build-monitor-test-plan.html
 
  have fun
 
 
  peter lin
 
 
  On 5/9/05, Guillaume Lahitette [EMAIL PROTECTED] wrote:
   Hi,
  
   I am looking for feedback on (preferably free) tools to monitor
  the performance of Tomcat during stress testing.
  
   We're running Tomcat 4.1.26 in production on Linux and Windows
  (as a service).
  
   Ideally, the tool would support connecting to multiple, remote servers.
  
   TIA.
   Guillaume
  
   -
   To unsubscribe, e-mail: [EMAIL PROTECTED]
   For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
  -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
 
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Automatic WAR updates - suggestions wanted

2005-05-09 Thread Wendy Smoak
From: Jay Burgess [EMAIL PROTECTED]
Am I missing a setting in server.xml/context.xml/web.xml that can indicate
always re-deploy a .WAR, regardless of whether the webapp subdiretory 
tree is
present or not?

Not AFAIK... if the directory is there, it won't auto-expand.  You can, 
however, tell it NOT to explode the .war file in the first place.

--
Wendy Smoak 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: How do I handle International Characters

2005-05-09 Thread Lutz Zetzsche
Hi Harry,

Am Montag, 9. Mai 2005 20:53 schrieb Harry Mantheakis:
 Browsers should (and mostly do, I think) respect the encoding you
 specify when setting the response content-type (and the meta-tag
 content-type) so you can simply assume (in your filter) that your
 form-data will be in UTF-8.

 Clients still need to, of course, set their browsers to display the
 relevant charsets correctly.

As far as HTML forms are concerned, you can force the browser to submit 
them to the server using a particular charset by adding the 
accept-charset attribute to the form tag, i.e.:

form accept-charset=utf-8 ...
...
/form

http://www.w3.org/TR/REC-html40/interact/forms.html#adef-accept-charset


Best wishes,
Lutz

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]