RE: Performance with many small requests

2009-05-11 Thread Peter Crowther
From: David kerber [dcker...@verizon.net] My cpu usage for tomcat has gone from bouncing between 0 and 1 in task manager, to a steady 2 since more threads are now actually doing work instead of waiting around for their turn at the code, my disk writes per sec in perfmon have also more than

AW: AW: Permanent Redirect?

2009-05-11 Thread Alexander Diedler
Hello, Yes it works with Tuckey.org but, what about http and https? In my urlrewrite.xml only this entry: urlrewrite rule from/(.*)$/from to type=redirecthttp://www.thenewserver.de/$1/to /rule /urlrewrite But if the user came from https he should also redirected to

centralized server

2009-05-11 Thread Kaushal Shriyan
Hi, Is there a way to log all the catalina.out files of tomcat hosted on different servers to a centralized server and view it using a web Interface? Thanks and Regards Kaushal

RE: Tomcat 5.5.27 404 for JSP's in a particular derectory

2009-05-11 Thread Mackstar
Caldarale, Charles R wrote: 1. The shuppin directory is a subdirectory which is inside a ROOT application directory, it has other sibling directories which are working correctly. They may appear to work correctly, but that's probably just an accident. Each webapp should be directly

RE: Tomcat 5.5.27 404 for JSP's in a particular derectory

2009-05-11 Thread Mackstar
Thanks all for your help I am stupid stupid stupid I had my ftp set up so that even though ROOT houses my app I have ROOT and shuppin in the same directory aswell as shuppin inside the ROOT dir so it looked in the sibling of ROOT rather than the child of ROOT Thanks again for your help

Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

2009-05-11 Thread David Smith
Mackstar wrote: Thanks all for your help I am stupid stupid stupid I had my ftp set up so that even though ROOT houses my app I have ROOT and shuppin in the same directory aswell as shuppin inside the ROOT dir so it looked in the sibling of ROOT rather than the child of ROOT Thanks again

Trouble parsing datetime strings

2009-05-11 Thread David kerber
This is related to the performance issues discussed in the thread Performance with many small requests. When I reworked my servlet to synchronize only on pieces that needed to be synchronized, rather than on the entire request processing routine, I am now throwing an exception when parsing a

Re: Trouble parsing datetime strings

2009-05-11 Thread Xie Xiaodong
Hello, Date formats are not synchronized. It is recommended to create separate format instances for each thread. If multiple threads access a format concurrently, it must be synchronized externally. This is from the reference of JDK API. 2009/5/11 David kerber dcker...@verizon.net This is

RE: Trouble parsing datetime strings

2009-05-11 Thread Caldarale, Charles R
From: David kerber [mailto:dcker...@verizon.net] Subject: Trouble parsing datetime strings Declared at the class level, I have: private static final SimpleDateFormatsdfFullDateTime = new SimpleDateFormat( -MM-dd HH:mm:ss ); Oops. Read the fine print for SimpleDateFormat:

RE: how to enable management agent on a process

2009-05-11 Thread Caldarale, Charles R
From: Anamika raj [mailto:rajnam...@gmail.com] Subject: Re: how to enable management agent on a process i am not getting how to set com.sun.management.jmxremote in the system property. The basic answer is that you set it the same way you set any other Java system property. Perhaps you

Re: Performance with many small requests

2009-05-11 Thread David kerber
Peter Crowther wrote: From: David kerber [dcker...@verizon.net] My cpu usage for tomcat has gone from bouncing between 0 and 1 in task manager, to a steady 2 since more threads are now actually doing work instead of waiting around for their turn at the code, my disk writes per sec in perfmon

Re: Trouble parsing datetime strings

2009-05-11 Thread Konstantin Kolinko
2009/5/11 David kerber dcker...@verizon.net: This is related to the performance issues discussed in the thread Performance with many small requests. When I reworked my servlet to synchronize only on pieces that needed to be synchronized, rather than on the entire request processing routine, I

RE: Performance with many small requests

2009-05-11 Thread Caldarale, Charles R
From: David kerber [mailto:dcker...@verizon.net] Subject: Re: Performance with many small requests From what I can tell now, it looks like most of my wait time is on socket reads. In the thread dump I took about 20 minutes ago, I didn't see any waiting on disk writes: The line listed

Re: Trouble parsing datetime strings

2009-05-11 Thread David kerber
Konstantin Kolinko wrote: ... As the JavaDoc says http://java.sun.com/javase/6/docs/api/java/text/SimpleDateFormat.html Date formats are not synchronized. It is recommended to create separate format instances for each thread You may either create a new instance of SimpleDateFormat each time,

Re: how to enable management agent on a process

2009-05-11 Thread André Warnier
Well, you did not mention the platform under which you are running Tomcat, nor the Tomcat version, not the Java version, so I could only give you general stuff. (And if this happened to be a Tomcat running under Windows, please also indicate how you are starting Tomcat). Anamika raj wrote:

RE: Getting the Right High Availability Architecture for Tomcat

2009-05-11 Thread Nenad Kovacevic
Caldarale, Charles R wrote: Have you considered doing the SSL processing in the load balancer(s)? It would make life simpler. - Chuck From application's perspective it really does not make much of a difference where SSL is done - actually it does make now after your explanation -

Re: Getting the Right High Availability Architecture for Tomcat

2009-05-11 Thread André Warnier
Nenad Kovacevic wrote: Caldarale, Charles R wrote: Have you considered doing the SSL processing in the load balancer(s)? It would make life simpler. - Chuck From application's perspective it really does not make much of a difference where SSL is done - actually it does make now after

RE: Getting the Right High Availability Architecture for Tomcat

2009-05-11 Thread Nenad Kovacevic
Nenad Kovacevic wrote: Caldarale, Charles R wrote: Have you considered doing the SSL processing in the load balancer(s)? It would make life simpler. - Chuck From application's perspective it really does not make much of a difference where SSL is done - actually it does

RE: Getting the Right High Availability Architecture for Tomcat

2009-05-11 Thread Caldarale, Charles R
From: Nenad Kovacevic [mailto:micami...@yahoo.com] Subject: RE: Getting the Right High Availability Architecture for Tomcat Our applications do not issue concurrent requests to the servers, i.e. they are classical web applications where the user activates a control on a page and then waits

Re: AW: AW: Permanent Redirect?

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Alexander, On 5/11/2009 4:56 AM, Alexander Diedler wrote: Yes it works with Tuckey.org but, what about http and https? In my urlrewrite.xml only this entry: urlrewrite rule from/(.*)$/from to

Re: Getting the Right High Availability Architecture for Tomcat

2009-05-11 Thread Robin Wilson
Actually, script tags load sequentially, I believe. (Not sure about css.) -- Robin D. Wilson On May 11, 2009, at 10:28 AM, André Warnier a...@ice-sa.com wrote: Nenad Kovacevic wrote: Caldarale, Charles R wrote: Have you considered doing the SSL processing in the load balancer(s)?

Re: Form-based Container Security with SSL

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guojun, On 5/8/2009 5:27 PM, Guojun Zhu wrote: What do you mean You want to ensure a session is created in non-secure more BEFORE the user submits their credentials.? Session id cookies are created by Tomcat in either secure mode (when the

RE: IIS Redirect Issue

2009-05-11 Thread Maze, Jeffrey S.
The tomcat5.exe is running away with just bringing up the redirect servlet examples. No self-written Java has been added; just running the default, full-install items from Tomcat. I don't know what else to try. Maybe since I'm running Server 2k3R2 within VMWare with VMWare tools installed, this

RE: IIS Redirect Issue

2009-05-11 Thread Caldarale, Charles R
From: Maze, Jeffrey S. [mailto:jm...@co.geauga.oh.us] Subject: RE: IIS Redirect Issue I ran the Process Explorer and have the following Thread going hay- wire. tcnative-1.dll!Java_org_apache_tomcat_jni_OS_info+0xa236 tcnative-1.dll!Java_org_apache_tomcat_jni_Poll_poll+0xc6 It could

RE: IIS Redirect Issue

2009-05-11 Thread Maze, Jeffrey S.
Thanks for the reply.. Originally, I wasn't sure how to accomplish this, but after googling a found what he meant. I just ended up renaming the file and now the Tomcat server doesn't go into runaway during a IIS redirect. Thanks! But I have another question, what exactly does this

RE: IIS Redirect Issue

2009-05-11 Thread Caldarale, Charles R
From: Maze, Jeffrey S. [mailto:jm...@co.geauga.oh.us] Subject: RE: IIS Redirect Issue what exactly does this tcnative-1.dll file do? It's the same HTTP[S] handling code that's in httpd, which is why it's called Apache Portable Runtime. What are the advantages/disadvantages/security issues

Preventing OutOfMemoryError: Java heap space

2009-05-11 Thread Todd Hivnor
I have a Java application running under Tomcat 6.0.18 on Ubuntu. This is using Sun's 1.6.0_07 JVM. I know how to set the max heap space by setting -Xmx256m in CATALINA_OPTS. But with a lot of sessions, I still have the possibility of running out of heap space. My application uses a lot of

Re: Preventing OutOfMemoryError: Java heap space

2009-05-11 Thread George Sexton
I think the results are going to be pretty erratic. The issue that I see is that the garbage collector operation is (to my knowledge) not deterministic. IOW, you're not really accounting for memory that could be garbage collected. So, I think that you'll have a systematic bias showing less

How to configure Tomcat 6.0 with JAAS?

2009-05-11 Thread David Hoffer
No matter what I do...I always get an 'HTTP Status 403 - Access to the requested resource has been denied error' displayed after authenticating in Tomcat with JAAS. Here is my configuration. Tomcat 6.0.x server.xml: ... Host name=localhost appBase=webapps unpackWARs=true autoDeploy=true

Re: How to configure Tomcat 6.0 with JAAS?

2009-05-11 Thread David Hoffer
Update. It looks like the problem is with the Tomcat Realm configuration. If I move the jar that contains these custom classes to the Tomcat lib folder then it works! However this is not a workable solution. I can't deploy jars like this. How can I delay JAAS realm configuration to my web app?

RE: Preventing OutOfMemoryError: Java heap space

2009-05-11 Thread Peter Crowther
From: Todd Hivnor [spambox_98...@yahoo.com] I would like to proactively avoid running out of heap space. I would like people get a Server Too Busy message, _before_ the heap is actually exhausted. I would rather serve 40 users well than 45 users poorly. Rather than monitor memory, which is

Re: Getting the Right High Availability Architecture for Tomcat

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Robin, On 5/11/2009 11:47 AM, Robin Wilson wrote: Actually, script tags load sequentially, I believe. (Not sure about css.) That's a pretty bold statement. The truth is, it's complicated.

Re: Form Based Authentication creates user session before it is authenticated?

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Umesh, On 5/8/2009 9:03 PM, umeshkavade wrote: In my web application, I am using tomcat's form based authentication for protecting my secure web pages. Thus whenever user starts accessing webapp by providing an URL of protected page, it is

Re: Trouble parsing datetime strings

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 David, On 5/11/2009 10:22 AM, David kerber wrote: From the quick reading I did, I imagine that will give me a bit of a performance hit compared to using ThreadLocal, but since I've never used the ThreadLocal pattern before, I didn't want to try

Re: Performance with many small requests

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, On 5/8/2009 7:26 AM, Peter Crowther wrote: Decrypt: parallel. Send ack: parallel. Increment counters: synced. Write to log file: synced (or you'll have some very odd stuff happening). I'd go further and suggest that you re-factor your

Re: Cluster session sync question (from documentation)

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 5/6/2009 3:19 PM, André Warnier wrote: I can think of another : by using sticky sessions, you are forcing the load-balancer to keep track of which session belongs to which back-end, and to look up this table at each request. I could

Re: how to build an multi lingual website

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, On 5/7/2009 3:35 PM, Andrew Davidson wrote: My main website is in English. I want to have a landing page in Spanish that describes my website and invites the user to click through the English version of the web site. Any idea how I set

Confused by mpm/mod_jk

2009-05-11 Thread Bill Davidson
I'm trying to understand mpm_worker MaxCLients and it's relationship with mod_jk connection_pool_size. Here's what I've got at the moment: OS: Red Hat 5.2 Server httpd: 2.2.11 tomcat-connector: 1.2.28 tomcat: 6.0.18 Java: 1.6.0_13 httpd-mpm.conf: ListenBacklog 2048 IfModule

Re: Changing webserver from Tomcat 5.0 to 6.0.18

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ties, On 5/8/2009 2:26 AM, Ties wrote: A website is running on server A (Tomcat 5.0) and it has to move to server B (Tomcat 6.0.18). I have configured everything which should be configured. But somehow the server is not able to locate the webapp.

Re: how to build an multi lingual website

2009-05-11 Thread George Sexton
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Andrew, On 5/7/2009 3:35 PM, Andrew Davidson wrote: My main website is in English. I want to have a landing page in Spanish that describes my website and invites the user to click through the English version of the web

Re: Tomcat logs in EST, webapp reports time in GMT

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Ciarán, On 5/8/2009 8:04 AM, Rowe, Ciaran (IT) wrote: I'm not so experienced in how Java/Tomcat handle timezone matters, but I've come across a running instance of a container which claims to be in GMT for some webapps, and US/Eastern for others.

Re: centralized server

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Kaushal, On 5/11/2009 6:14 AM, Kaushal Shriyan wrote: Is there a way to log all the catalina.out files of tomcat hosted on different servers to a centralized server and view it using a web Interface? Yes. Tomcat provides none of this capability,

Re: Tomcat and Oracle connections

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Wouter, On 5/9/2009 5:46 AM, Wouter D'Haeseleer wrote: This means, no connections available anymore. And when I look at the connections itself in oracle I see that the following connection is using more then 200 sessions ! I think Chuck is

Re: how to build an multi lingual website

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 George, On 5/11/2009 5:30 PM, George Sexton wrote: Another way of doing this is to use resource bundles. It's uglier in some ways, but better in other ways. The OP said he was using mostly static content, so I think the redirection based upon

Re: changing location of conf/Catalina

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Dmitry, On 5/7/2009 3:07 PM, Dmitry Beransky wrote: I want to lock down the core Tomcat installation by making it read-only (and updateable only through a SCM). I've figured out how to relocate temp, work, logs, webapps directories, all of which

Re: Confused by mpm/mod_jk

2009-05-11 Thread Rainer Jung
Hi Bill, On 11.05.2009 23:15, Bill Davidson wrote: I'm trying to understand mpm_worker MaxCLients and it's relationship with mod_jk connection_pool_size. Here's what I've got at the moment: OS: Red Hat 5.2 Server httpd: 2.2.11 tomcat-connector: 1.2.28 tomcat: 6.0.18 Java: 1.6.0_13

Re: Form-based Container Security with SSL

2009-05-11 Thread Guojun Zhu
Dear Chris, Thank you very much. What we really want is that the login username/password communicates encrypted. Everything else can be in clear-text. (We also need the log-out, so I cannot use the digest authentification.) Showing a non-secure login page isn't a problem, is it? You just

Re: how to build an multi lingual website

2009-05-11 Thread George Sexton
Christopher Schultz wrote: %=rb.getString(Date)% INPUT TYPE=TEXT VALUE=05/27/2009 Heh, I hope you use a Locale-specific date format otherwise you'll confuse a lot of people. ;) I think I have this down. You can check: http://www.mhsoftware.com/caldemo/ and let me know... -- George

Re: Tomcat 5.5.27 404 for JSP's in a particular derectory

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Mackstar, On 5/10/2009 10:31 PM, Mackstar wrote: Konstantin Kolinko wrote: 2) Do not use the Invoker servlet. It is a hole you won't be able to patch See http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q2

Re: How to configure Tomcat 6.0 with JAAS?

2009-05-11 Thread Pid
David Hoffer wrote: Update. It looks like the problem is with the Tomcat Realm configuration. If I move the jar that contains these custom classes to the Tomcat lib folder then it works! However this is not a workable solution. I can't deploy jars like this. How can I delay JAAS realm

Re: Form-based Container Security with SSL

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Guojun, On 5/11/2009 5:49 PM, Guojun Zhu wrote: Dear Chris, Thank you very much. What we really want is that the login username/password communicates encrypted. Everything else can be in clear-text. (We also need the log-out, so I cannot

Analyzing Tomcat related VM crash?

2009-05-11 Thread Andre-John Mas
Hi, We have recently put into production a Tomcat 5.5.27 based web site, using JDK 1.6 (JDK 1.6.0_12-b04 on RedHat Linux). We have spent months developing and testing the site, both by us and the customer, and experienced no VM crashes. Now that we are in production we find the VM is

Re: Analyzing Tomcat related VM crash?

2009-05-11 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André-John, On 5/11/2009 6:48 PM, Andre-John Mas wrote: We have recently put into production a Tomcat 5.5.27 based web site, using JDK 1.6 (JDK 1.6.0_12-b04 on RedHat Linux). We have spent months developing and testing the site, both by us and the

Re: Analyzing Tomcat related VM crash?

2009-05-11 Thread Andre-John Mas
On 11-May-2009, at 18:59, Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André-John, On 5/11/2009 6:48 PM, Andre-John Mas wrote: We have recently put into production a Tomcat 5.5.27 based web site, using JDK 1.6 (JDK 1.6.0_12-b04 on RedHat Linux). We have spent

IIS tomcat connector plugin fail to reverse proxy.

2009-05-11 Thread eric tse
I am trying to use the IIS tomcat connector to act like a reverse proxy If I hit the IIS at /MWGAT it will forward the tomcat with /GAT However I fail to do this In the documentation http://tomcat.apache.org/connectors-doc/generic_howto/proxy.html they say I can do this If you are using

Re: Performance with many small requests

2009-05-11 Thread David Kerber
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Peter, On 5/8/2009 7:26 AM, Peter Crowther wrote: Decrypt: parallel. Send ack: parallel. Increment counters: synced. Write to log file: synced (or you'll have some very odd stuff happening). I'd go further and

Re: Confused by mpm/mod_jk

2009-05-11 Thread Bill Davidson
Rainer Jung wrote: Hey great, someone using recent version :) I've been trying to stay current with the stable releases since upgrading the app from httpd 1.3 and Tomcat 3.2.4 last year. I usually wait a couple weeks to a month and watch the mailing lists after a release to make sure nothing

RE: Analyzing Tomcat related VM crash?

2009-05-11 Thread Caldarale, Charles R
From: Andre-John Mas [mailto:aj...@sympatico.ca] Subject: Re: Analyzing Tomcat related VM crash? I have added the details to the end of this e-mail. If the hardware tests don't find anything, try running the JVM in client mode rather than server. Historically, the server JIT has been

RE: Tomcat and Oracle connections

2009-05-11 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: Tomcat and Oracle connections I would highly recommend adding these two attributes to your Resource: logAbaodoned=true removeAbandoned=true removeAbandonedTimeout=30 While you're at it, maybe you

RE: changing location of conf/Catalina

2009-05-11 Thread Caldarale, Charles R
From: Christopher Schultz [mailto:ch...@christopherschultz.net] Subject: Re: changing location of conf/Catalina Not sure if you can re-locate this, but have you considered giving read-only access to that directory for the Tomcat euid and allowing only admins to write? Making conf/Catalina

Re: How to configure Tomcat 6.0 with JAAS?

2009-05-11 Thread David Hoffer
Okay that sounds good I'll try that. Next newbie question...will this be server agnostic? I need to support Tomcat/JBoss/WebLogic. -Dave On Mon, May 11, 2009 at 4:17 PM, Pid p...@pidster.com wrote: David Hoffer wrote: Update. It looks like the problem is with the Tomcat Realm

Tomcat 6 conflict between apache JSTL libs and glassfish appserv-rt.jar

2009-05-11 Thread Joseph dela Peña
Hi, I've started using JSTL tags in my JSP. All was good until i needed to call a remote EJB from a servlet, store the object to a session, and redirect to a JSP page to display the content of the remote object. We'll just to clear things, i am able to do this properly using JSP expressions

RE: How to configure Tomcat 6.0 with JAAS?

2009-05-11 Thread Caldarale, Charles R
From: David Hoffer [mailto:dhoff...@gmail.com] Subject: Re: How to configure Tomcat 6.0 with JAAS? Next newbie question...will this be server agnostic? Unfortunately not. The servlet spec does not define how realms are to be configured, so each app server rolls its own mechanism. Note

RE: Tomcat 6 conflict between apache JSTL libs and glassfish appserv-rt.jar

2009-05-11 Thread Caldarale, Charles R
From: Joseph dela Peña [mailto:masterkure...@gmail.com] Subject: Tomcat 6 conflict between apache JSTL libs and glassfish appserv-rt.jar I'm getting a java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory; when i add appserv-rt.jar in my lib. You

RE: Performance with many small requests

2009-05-11 Thread Caldarale, Charles R
From: David Kerber [mailto:dcker...@verizon.net] Subject: Re: Performance with many small requests Incrementing a counter can't be much of a synchronization bottleneck, and if I switch to an AtomicInteger, it should be even less of one. Actually, it won't. There's a slight performance