Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chuck, On 06/09/2011 07:52 AM, Caldarale, Charles R wrote: Can you display the original request URL, or perhaps enable the AccessLogValve? (I'm not sure if that captures forwards, however.) It does. The redirect URL set to the client can be

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread André Warnier
Thomas Freitag wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Chuck, On 06/09/2011 07:52 AM, Caldarale, Charles R wrote: Can you display the original request URL, or perhaps enable the AccessLogValve? (I'm not sure if that captures forwards, however.) It does. The redirect URL

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Felix Schumacher
Am Donnerstag, den 09.06.2011, 04:53 +0100 schrieb Jocelyn Ireson-Paine: Hi, I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. This is with Tomcat 7.0.14, the latest stable version to which I upgraded an hour ago, and Java 1.6.0_26, which again I upgraded to at the

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Jocelyn Ireson-Paine
On Thu, 9 Jun 2011, André Warnier wrote: ... By the way : (Interface HttpServletResponse, Javaee 5) encodeUrl String encodeUrl(String url) Deprecated. As of version 2.1, use encodeURL(String url) instead Maybe it's worth replacing encodeUrl by encodeURL, and see if the problem still

Re: how to correct stop a thread and avoid leaks

2011-06-09 Thread Pid
On 07/06/2011 16:33, Bill Miller wrote: If you want to work with threads in tomcat you need to know about the Tomcat org.apache.catalina.LifecycleListener interface. Eh? Why would you need to put Tomcat specific dependencies in a spec compliant Servlet container? The above is simply not true.

Document of Tomcat 6.0.32.

2011-06-09 Thread Nash
Hi! I want to know how I can get the API Document of Tomcat 6.0.32 so I can refer it regardless of Internet connection. Thank you a lot! Best wishes! 2011-06-09 Nash

Re: Tomcat 7.0.14 / 6.0.32 session gets obviously invalid after request / JSESSIONID changes

2011-06-09 Thread Pid
On 08/06/2011 10:18, Sascha Hesse wrote: Hello all, I'm hosting our spring mvc 3.0.5 application in tomcat 7.0.14 and also tried 6.0.32 The server is hosting two webapps. The frontend: http://localhost:50012/frontend The backend: http://localhost:50012/backend The Request-Flow looks

Re: Document of Tomcat 6.0.32.

2011-06-09 Thread Markus Schönhaber
09.06.2011 10:13, Nash: I want to know how I can get the API Document of Tomcat 6.0.32 so I can refer it regardless of Internet connection. Thank you a lot! Download the fulldocs package, which, as it seems, is not linked to from the download page of 6.0. The name of the package is

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Thomas Freitag
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi André, On 09.06.11 um 09:07, André Warnier wrote: It does. The redirect URL set to the client can be logged with %{Location}o. I don't think we are talking about a redirect response sent to the client here. That would definitely /not/ work

Re: serving pre-compressed files

2011-06-09 Thread Pid
On 08/06/2011 16:03, Jesse Farinacci wrote: Greetings, I'm using Tomcat 7.0.14 and IBM Java 6. As part of my web application's bundling mechanism (via Maven) I have the ability to pre-gzip compress static resources. I'd like Tomcat to detect that a request for /path/to/resource has

RE: Auth in Context.xml

2011-06-09 Thread Umesh Bhatt
Hi, Sorry I meant auth not Auth. Thanks for correction. I used getConnection(username, password) but it gives me an error as It is not supported and doesn't connect with DB. Thanks, Umesh -Original Message- From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] Sent: Thursday,

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Jocelyn Ireson-Paine
On Thu, 9 Jun 2011, Felix Schumacher wrote: Am Donnerstag, den 09.06.2011, 04:53 +0100 schrieb Jocelyn Ireson-Paine: Hi, I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. This is with Tomcat 7.0.14, the latest stable version to which I upgraded an hour ago, and Java

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Jocelyn Ireson-Paine
On Thu, 9 Jun 2011, Caldarale, Charles R wrote: From: Jocelyn Ireson-Paine [mailto:p...@j-paine.org] Subject: Null-pointer exception from response.encodeUrl under Windows Tomcat 7 I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. First off, let me say that it's an

Re: Auth in Context.xml

2011-06-09 Thread André Warnier
Umesh Bhatt wrote: Hi, Sorry I meant auth not Auth. Thanks for correction. I used getConnection(username, password) but it gives me an error as It is not supported and doesn't connect with DB. Umesh, you would help the people trying to help you, and thus help yourself get answers faster,

Re: Tomcat 7.0.14 / 6.0.32 session gets obviously invalid after request / JSESSIONID changes

2011-06-09 Thread Sascha Hesse
it was set in a header. But I already figured out what the Problem was. For the Browser (Firefox 4) .localhost is not a valid domain for a cookie. Some documents on the web say, that for localhost domain has to be empty. This also didn't work. The solution was requesting the service with a full

Re: Static resource mapping in web.xml

2011-06-09 Thread Pid
On 08/06/2011 17:48, falva...@geocom.com.uy wrote: Currently we do not have this kind of attacks because the app runs in an intranet. But I know that in this closed scenario we should beware of the users. But if your network is penetrated, your server will be vulnerable and therefore a

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Pid
On 09/06/2011 06:52, Caldarale, Charles R wrote: From: Jocelyn Ireson-Paine [mailto:p...@j-paine.org] Subject: Null-pointer exception from response.encodeUrl under Windows Tomcat 7 I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. First off, let me say that it's

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Felix Schumacher
Am Donnerstag, den 09.06.2011, 09:40 +0100 schrieb Jocelyn Ireson-Paine: On Thu, 9 Jun 2011, Felix Schumacher wrote: Am Donnerstag, den 09.06.2011, 04:53 +0100 schrieb Jocelyn Ireson-Paine: Hi, I'm getting sporadic null-pointer exceptions from 'response.encodeUrl'. This is with Tomcat

Re: Auth in Context.xml

2011-06-09 Thread Konstantin Kolinko
2011/6/9 Umesh Bhatt umesh_bh...@mindtree.com: Sorry I meant auth not Auth.  Thanks for correction. I used getConnection(username, password) but it gives me an error as It is not supported and doesn't connect with DB. Sure. Apache Commons DBCP connection pool does not support that method.

Re: War file deployment deletes configuration descriptor in Tomcat 6

2011-06-09 Thread Konstantin Kolinko
2011/6/8 Dharamshila Khandelwal dharmshil...@gmail.com: Every time I deploy war file in webapps, it deletes the configuration descriptor which is present at $CATALINA_BASE/conf/[enginename]/[hostname] directory. Tomcat auto deploys war file in my Tomcat 6 configuration. 1. What _exactly_

How to handle client disconnection in 'no timeout' async servlets?

2011-06-09 Thread Paul Cazan
Hello, I am using Tomcat 7.0.14. I used to have a servlet implementing CometProcessor to process asynchronous streams, with timeout set very high (Integer.MAX_VALUE), and all worked fine. When I close the browser, the servlet is notified immediately about that (CometEvent.EventType.END) and I

Re: serving pre-compressed files

2011-06-09 Thread Jesse Farinacci
Hello, On Thu, Jun 9, 2011 at 4:27 AM, Pid p...@pidster.com wrote: Not quite the same, but similar, is the following: If you're using Tomcat 7, you have Servlet 3 compatibility, which means you can serve resources out of a specially* constructed jar. * Put resources in:

Embedded tomcat contexts confusion

2011-06-09 Thread Benson Margulies
I'm using tomcat 7.0.14. I create a org.apache.catalina.startup.Tomcat;. I call 'addWebapp' lshContext = tomcat.addWebapp(/lsh, docBase.getCanonicalPath());. The webapp in question has a Listener. The listener happens to belong to Spring. contextInitialized has a try/catch block. In the

Re: serving pre-compressed files

2011-06-09 Thread Pid
On 09/06/2011 13:34, Jesse Farinacci wrote: Hello, On Thu, Jun 9, 2011 at 4:27 AM, Pid p...@pidster.com wrote: Not quite the same, but similar, is the following: If you're using Tomcat 7, you have Servlet 3 compatibility, which means you can serve resources out of a specially* constructed

How to cluster two embedded tomcat 7 instances

2011-06-09 Thread Rüdiger Herrmann
Hi all, I would like to programmatically set up two Tomcat engines and have them form a basic cluster - all in the same VM. Creating and starting the servlet engines already works Tomcat tomcat = new Tomcat() tomcat.setPort( 123 ); // create context, add servlet, ... tomcat.start(); What

Tomcat 5.5 Clustering

2011-06-09 Thread Tauqir Akhtar
Hi I am running two Tomcat (5.5.27) Instances on two different machines deploying the same Java Application. I have made changes in server.xml to specify the Port on which Tomcat should run on the two machines. On Machine 1 : Connector port=8001 On Machine 12 : Connector port=8002 Both the

Re: How to cluster two embedded tomcat 7 instances

2011-06-09 Thread Martin Grotzke
Hi, perhaps memcached-session-manager is an option for you: http://code.google.com/p/memcached-session-manager/ It has integration tests that show how to configure it programatically:

Re: Tomcat 5.5 Clustering

2011-06-09 Thread Pid
On 09/06/2011 15:02, Tauqir Akhtar wrote: Hi I am running two Tomcat (5.5.27) Instances on two different machines deploying the same Java Application. If this is a new request for help, rather than a reply to Tomcat 6 Clustering vs. Tomcat 5.5 clustering please start a new thread, rather

Tomact 5.5 Clustering

2011-06-09 Thread Tauqir Akhtar
Hi I am running two Tomcat (5.5.27) Instances on two different machines deploying the same Java Application. I have made changes in server.xml to specify the Port on which Tomcat should run on the two machines. On Machine 1 : Connector port=8001 On Machine 2 : Connector port=8002 Both the

RE: Tomcat 5.5 Clustering

2011-06-09 Thread Tauqir Akhtar
Sorry abt that. I have created a new request now. Thanks Tauqir Akhtar -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Thursday, June 09, 2011 10:27 AM To: Tomcat Users List Subject: Re: Tomcat 5.5 Clustering On 09/06/2011 15:02, Tauqir Akhtar wrote: Hi I am

Re: Tomact 5.5 Clustering

2011-06-09 Thread Pid
On 09/06/2011 15:30, Tauqir Akhtar wrote: Hi I am running two Tomcat (5.5.27) Instances on two different machines deploying the same Java Application. I have made changes in server.xml to specify the Port on which Tomcat should run on the two machines. On Machine 1 : Connector

RE: Tomact 5.5 Clustering

2011-06-09 Thread Tauqir Akhtar
Pid I have uncommeneted the Cluster Element in server.xml on both the Instances.. Thanks Tauqir Akhtar -Original Message- From: Pid [mailto:p...@pidster.com] Sent: Thursday, June 09, 2011 10:36 AM To: Tomcat Users List Subject: Re: Tomact 5.5 Clustering On 09/06/2011 15:30, Tauqir

Re: ServletRequestListener and Expect-Header

2011-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon, On 6/8/2011 1:47 PM, Simon Olofsson wrote: I have a ServletRequestListener that tries too access a Request Parameter: sre.getServletRequest().getParameter(x); When I send a POST-Request with the Expect: 100-continue HTTP Header it hangs

Re: serving pre-compressed files

2011-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jesse, On 6/9/2011 8:34 AM, Jesse Farinacci wrote: I just wrote a quick javax.servlet.Filter. It sanity checks: 1) no ?gzip=false parameter (a la Tomcat's compression filter), and 2) Accept-Encoding: {,x-}gzip in any of the headers, and 3) that

Re: serving pre-compressed files

2011-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Jesse, On 6/9/2011 8:34 AM, Jesse Farinacci wrote: I just wrote a quick javax.servlet.Filter. Oh, if you're willing to do so, please share your code with the list. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (MingW32) Comment:

Re: My web application to use SSL (JSSE - RSA)

2011-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Charles, On 6/8/2011 3:03 PM, Charles Van Damme wrote: 1) I'm trying first with JSSE. Please see !-- Connectors ... in my server.xml file. Attachments stripped again. Please copy/paste into the message. 2) How can I prevent my NetBeans IDE to

Re: Static resource mapping in web.xml

2011-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Federico, On 6/8/2011 10:17 AM, falva...@geocom.com.uy wrote: servlet-mapping servlet-nameinvoker/servlet-name url-pattern/*/url-pattern /servlet-mapping Why not map the invoker to /servlet/*? Seems like that would fix your problem. -

Re: Tomact 5.5 Clustering

2011-06-09 Thread János Löbb
On Jun 9, 2011, at 10:30 AM, Tauqir Akhtar wrote: Hi I am running two Tomcat (5.5.27) Instances on two different machines deploying the same Java Application. I have made changes in server.xml to specify the Port on which Tomcat should run on the two machines. On Machine 1 :

Re: Static resource mapping in web.xml

2011-06-09 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Federico, On 6/8/2011 2:04 PM, falva...@geocom.com.uy wrote: If this is the case I could make it weight-in in the matter of building a well formed web.xml. Although it could take some time. How many servlets do you have? Mapping each servlet

Terminating long running request threads

2011-06-09 Thread Afkham Azeez
Hi folks, We are using embedded Tomcat 7.0.14, and we have a requirement to somehow terminate request threads that have been running for a 'long' time. Does Tomcat provide any support to do this? Do we have access to the request thread pool through JMX, and if so, is there a way to get hold of

Re: Terminating long running request threads

2011-06-09 Thread Afkham Azeez
For our requirement, it is even OK to detect to which webapp such a request is coming, and unload that webapp. On Thu, Jun 9, 2011 at 10:33 PM, Afkham Azeez afk...@gmail.com wrote: Hi folks, We are using embedded Tomcat 7.0.14, and we have a requirement to somehow terminate request threads

RE: Terminating long running request threads

2011-06-09 Thread Caldarale, Charles R
From: Afkham Azeez [mailto:afk...@gmail.com] Subject: Terminating long running request threads is there a way to get hold of these long running threads terminate them? This is not an issue specific to Tomcat; there is no way to safely terminate a Java thread without the cooperation of

Re: Terminating long running request threads

2011-06-09 Thread Afkham Azeez
On Thu, Jun 9, 2011 at 10:51 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Afkham Azeez [mailto:afk...@gmail.com] Subject: Terminating long running request threads is there a way to get hold of these long running threads terminate them? This is not an issue

Re: how to correct stop a thread and avoid leaks

2011-06-09 Thread Calum
On 9 June 2011 09:11, Pid p...@pidster.com wrote: Eh?  Why would you need to put Tomcat specific dependencies in a spec compliant Servlet container?  The above is simply not true. The OP use of a ServletContextListener is perfectly valid, (even if the rest of the code is a little odd). Is it

RE: Static resource mapping in web.xml

2011-06-09 Thread falvarez
Yes, we would probably use some tools to build the web.xml. Currently our applications has something between 1 to 15000 servlets. Mapping to /servlet/* how it works now, a normal URL is http://host:8080/webapp/servlet/myservlet;. But then I tried to remove the /servlet/ from the URL,

Re: ServletRequestListener and Expect-Header

2011-06-09 Thread André Warnier
Christopher Schultz wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Simon, On 6/8/2011 1:47 PM, Simon Olofsson wrote: I have a ServletRequestListener that tries too access a Request Parameter: sre.getServletRequest().getParameter(x); When I send a POST-Request with the Expect:

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Martin Gainty
place servletapi-2.3.jar in $CATALINA_HOME/bin $CATALINA_HOME/bin/servletapijavap ./javax/servlet/http/HttpServletResponse | grep encodeURL public abstract java.lang.String encodeURL(java.lang.String); Martin Gainty __ Verzicht und

RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Caldarale, Charles R
From: Martin Gainty [mailto:mgai...@hotmail.com] Subject: RE: Null-pointer exception from response.encodeUrl under Windows Tomcat 7 place servletapi-2.3.jar in $CATALINA_HOME/bin Absolute rubbish. Never, never do that. - Chuck THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR

Re: Null-pointer exception from response.encodeUrl under Windows Tomcat 7

2011-06-09 Thread Mark Thomas
On 09/06/2011 19:28, Martin Gainty wrote: place servletapi-2.3.jar in $CATALINA_HOME/bin Monumentally bad advice. An unbelieveably stupid idea. You should *not* do this. Mark $CATALINA_HOME/bin/servletapijavap ./javax/servlet/http/HttpServletResponse | grep encodeURL public

Re: RE: Static resource mapping in web.xml

2011-06-09 Thread Terence M. Bandoian
On 1:59 PM, falva...@geocom.com.uy wrote: Yes, we would probably use some tools to build the web.xml. Currently our applications has something between 1 to 15000 servlets. Mapping to /servlet/* how it works now, a normal URL is http://host:8080/webapp/servlet/myservlet;. But then I tried

Question on WORK directory of tomcat container

2011-06-09 Thread Savoy, Melinda
Due to a conflict between the cached JSPs in the work directory of a tomcat container on our app's QA Windows 2003 server, does the tomcat service have to be restarted? Any help would be greatly appreciated. Thanks. Melinda Savoy Sr. Programmer Analyst, ERP Systems Innovative Technology

RE: Question on WORK directory of tomcat container

2011-06-09 Thread Caldarale, Charles R
From: Savoy, Melinda [mailto:melindasa...@texashealth.org] Subject: Question on WORK directory of tomcat container Due to a conflict between the cached JSPs in the work directory of a tomcat container on our app's QA Windows 2003 server, does the tomcat service have to be restarted? What?

Re: how to correct stop a thread and avoid leaks

2011-06-09 Thread Pid
On 09/06/2011 18:44, Calum wrote: On 9 June 2011 09:11, Pid p...@pidster.com wrote: Eh? Why would you need to put Tomcat specific dependencies in a spec compliant Servlet container? The above is simply not true. The OP use of a ServletContextListener is perfectly valid, (even if the rest

RE: Question on WORK directory of tomcat container

2011-06-09 Thread Propes, Barry L
It might be helpful to know if you deleted items out of your work directory or if you are implying you have to leave cached JSPs there without touching them, but you altered something else? I guess like Chuck suggested, we'd be guessing at this, but it almost sounds like you are afraid to dump

Re: Migrated from 6.0.29 to 7.0.10, Now I get INFO: TLD skipped. URI: http://struts.apache.org/tags-bean is already defined

2011-06-09 Thread Dilip Parihar
Hi All, I had gone thru the same error and here is what I configured to fix the error: The solution i did is: 1. Remove the entries from WEB.xml of taglib directive. 2. Remove the *.tld from WEB-INF folder if any because they already exists in struts-xxx.jar file. 3. In JSP replace i.

Optimal Settings to use Tomcat as a HTTP File Server

2011-06-09 Thread Anand HS
Hi, We plan to use tomcat to let users download static content ( media, executables etc.. ). I was curious to know if any one has attempted it before and if so, the settings that we need to make to tomcat configurations to make it optimally serve static content. Thanks, Anand

RE: Optimal Settings to use Tomcat as a HTTP File Server

2011-06-09 Thread Caldarale, Charles R
From: Anand HS [mailto:anan...@gmail.com] Subject: Optimal Settings to use Tomcat as a HTTP File Server We plan to use tomcat to let users download static content ( media, executables etc.. ). As much as I like Tomcat, I have to think it might be more appropriate to use Apache httpd

Context Definition Doesn't Work

2011-06-09 Thread Mark Leone
I've been running Tomcat since version 4. Today, running 7.0.12, I decided to define a non-standard context, and I can't get it to work after carefully following all the instructions in the documentation and doing what all my searching confirmed I should be doing. My web app is deployed at

RE: Context Definition Doesn't Work

2011-06-09 Thread Caldarale, Charles R
From: Mark Leone [mailto:midnightj...@verizon.net] Subject: Context Definition Doesn't Work My web app is deployed at $CATALINA_HOME/webapps/filePort. That's the problem; see below. So I have the file $CATALINA_HOME/conf/Catalina/localhost/mbp#filePort.xml And I suspect that if you look

Re: Optimal Settings to use Tomcat as a HTTP File Server

2011-06-09 Thread Sriram Narayanan
On Fri, Jun 10, 2011 at 7:10 AM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Anand HS [mailto:anan...@gmail.com] Subject: Optimal Settings to use Tomcat as a HTTP File Server We plan to use tomcat to let users download static content ( media, executables etc.. ). As much as

Re: Question on WORK directory of tomcat container

2011-06-09 Thread Sriram Narayanan
On Fri, Jun 10, 2011 at 12:42 AM, Savoy, Melinda melindasa...@texashealth.org wrote: Due to a conflict between the cached JSPs in the work directory of a tomcat container on our app's QA Windows 2003 server, does the tomcat service have to be restarted? Any help would be greatly

RE: Optimal Settings to use Tomcat as a HTTP File Server

2011-06-09 Thread Caldarale, Charles R
From: Caldarale, Charles R Subject: RE: Optimal Settings to use Tomcat as a HTTP File Server We plan to use tomcat to let users download static content ( media, executables etc.. ). As much as I like Tomcat, I have to think it might be more appropriate to use Apache httpd rather than

Re: Optimal Settings to use Tomcat as a HTTP File Server

2011-06-09 Thread Anand HS
Thanks Charles and Sriram for your inputs. Since my requirement is to just serve static content, I will consider apache httpd for it. Thanks.! Anand On Thu, Jun 9, 2011 at 10:48 PM, Caldarale, Charles R chuck.caldar...@unisys.com wrote: From: Caldarale, Charles R Subject: RE: Optimal