You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Eric Raymond <er...@comcast.net> on 2005/04/28 21:36:15 UTC

RE: How to configure tomcat to compile JSPs with Sun JDK 1.5

OK.  I can't stands no more of this. Here is the magic incantation which 
you are looking for:

Remove TOMCAT_HOME/common/lib/jasper-compiler-jdt.jar

Copy JAVA_HOME/lib/tools.jar to TOMCAT_HOME/common/lib

Copy a recent version of ant.jar (from  Apache ant) to 
TOMCAT_HOME/common/lib

Edit TOMCAT_HOME/conf/web.xml and change th 
compilerSourceVM/compilerTargetVM to 1.5

That should do it!

IMHO, the documentation on this is lacking and incomplete.  We'd be all 
better served if this was *well* documented in easy to find places (like 
the release notes, the RUNNING document, the tomcat FAQ, and the obvious 
place in the documentation)  Hopefully this will be a one line 
configuration option in the future.

A good product is not made better by requiring a set of tricks known 
only to an enlightened few to do some fairly simple things.  If a 
question is asked more than X times, it's time to consider some minor 
changes to the documentation and/or implementation.  Very easy to take 
the viewpoint that others are stupid or lazy. Blame 'em.  Much harder to 
take ownership of the root of the problem and make it go away!  It takes 
a very confident developer to take this point of view.

OK,  I'll get off my soapbox and fend off the ensuing flames.  If I was 
half the man I claim to be, I'd jump into the code/docs and submit a patch.


tomcat-user-digest-help@jakarta.apache.org wrote:

>tomcat-user Digest 28 Apr 2005 18:23:33 -0000 Issue 5585
>
>Topics (messages 125796 through 125825):
>
>Re: Howto configure tomcat to compile JSPs with Sun JDK 1.5
>	125796 by: Steiner, Stephan
>
>Re: Tomcat 5 and SSL Configuration
>	125797 by: Bruce Perryman
>	125822 by: Mark Thomas
>
>unable to  send a java mail
>	125798 by: vishwam
>	125799 by: Dale, Matt
>	125800 by: Peter Crowther
>	125801 by: Marco Pöhler
>	125802 by: vishwam
>	125804 by: Peter Crowther
>
>Session lost when switching from https to http in Tomcat 5.
>	125803 by: Anhony
>	125810 by: Anto Paul
>	125811 by: Anhony
>	125812 by: David Smith
>
>How to use servlet filters without modifying webapp
>	125805 by: joelsherriff
>	125806 by: Anhony
>	125807 by: joelsherriff
>	125808 by: joelsherriff
>	125809 by: Robert r. Sanders
>	125813 by: joelsherriff
>
>deploy using manager
>	125814 by: Jiang, Peiyun
>	125815 by: Raghupathy,Gurumoorthy
>	125817 by: David Whitehurst
>
>Images & CSS not loaded after the request passes through a Servlet Filter
>	125816 by: Roberto
>	125818 by: Frank W. Zammetti
>	125823 by: Roberto
>
>logging problem (bug?)
>	125819 by: matt.pierce.colinx.com
>
>Re: Virtual Hosts and SSL Certificates
>	125820 by: Mark Thomas
>	125821 by: Mark Thomas
>
>Re: tomcat connectors
>	125824 by: Patty O'Reilly
>
>Re: ThreadPool logFull -- BufferedInputStream
>	125825 by: Patty O'Reilly
>
>Administrivia:
>
>To subscribe to the digest, e-mail:
>	tomcat-user-digest-subscribe@jakarta.apache.org
>
>To unsubscribe from the digest, e-mail:
>	tomcat-user-digest-unsubscribe@jakarta.apache.org
>
>To post to the list, e-mail:
>	tomcat-user@jakarta.apache.org
>
>
>----------------------------------------------------------------------
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> RE: Howto configure tomcat to compile JSPs with Sun JDK 1.5
> From:
> "Steiner, Stephan" <St...@nextiraone.ch>
> Date:
> Thu, 28 Apr 2005 14:03:00 +0200
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <F6...@srklo1008.sdd.alcatel.ch>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain
>
>
>Hi
>
>  
>
>>Did you have a look at the how-to, which I mentioned yesterday? And if yes,
>>    
>>
>why didn't >it solve your problem?
>
>  
>
>>-> http://jakarta.apache.org/tomcat/tomcat-5.5-doc/jasper-howto.html
>>    
>>
>
>It works..  But there's a problem with 
>
>compilerSourceVM - What JDK version are the source files compatible with?
>(Default JDK 1.4) 
>compilerTargetVM - What JDK version are the generated files compatible with?
>(Default JDK 1.4) 
>
>If you set those, you'll get a "resource unavailable" message for every page
>you try to access (regardless whether you set this to 1.4 or 1.5).
>
>I believe it has been fixed in the CSV since (I haven't found time to
>compile Tomcat on my own and try), and I didn't find anything about this in
>the 5.5.9 changelog.
>
>Regards
>Stephan
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Tomcat 5 and SSL Configuration
> From:
> Bruce Perryman <bp...@yahoo.com>
> Date:
> Thu, 28 Apr 2005 05:09:57 -0700 (PDT)
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <20...@web51605.mail.yahoo.com>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=us-ascii
>
>
>Thanks,
>
>It worked, the only problem is that we failed to
>specify the RSA algorithm.
>
>Are we screwed for using DSA?
>
>--- Mark Thomas <ma...@apache.org> wrote:
>
>  
>
>>The following steps should work (although I have
>>only ever done this 
>>using my own CA).
>>
>>1. Create tomcat key in your own keystore
>>2. Create CSR
>>3. Submit CSR
>>4. Get response
>>5. Import CA's root cert to cacerts
>>(%JAVA_HOME%\jre\lib\security\cacerts)
>>6. Import new cert to same keystore as 1 (use same
>>alias & trustcacerts 
>>option)
>>7. Restart Tomcat
>>
>>HTH
>>
>>Mark
>>
>>Bruce Perryman wrote:
>>    
>>
>>>Thanks for responding!
>>>
>>>Yes, I do have a backup, but I should have
>>>      
>>>
>>mentioned
>>    
>>
>>>that there were several attempts to get this
>>>      
>>>
>>working.
>>    
>>
>>>One of the first attempts ommitted step #5, but I
>>>      
>>>
>>had
>>    
>>
>>>the same result.
>>>I used step #5 in an attempt to remove the old and
>>>then insert the new. But that didn't work either.
>>>
>>>One other thing that I noticed is that my previous
>>>(expired) keystore had 2 certs in it one was a
>>>      
>>>
>>root
>>    
>>
>>>trusted cert entry and the tomcat key entry.
>>>
>>>This time, in one of my initial attempts, the
>>>      
>>>
>>tomcat
>>    
>>
>>>alias was the only entry and it was the trusted
>>>      
>>>
>>cert
>>    
>>
>>>entry.
>>>
>>>Does this have anything to do with the problem?
>>>--- Mark Thomas <ma...@apache.org> wrote:
>>>
>>>      
>>>
>>>>Bruce,
>>>>
>>>>You should not have done step 5. This deleted your
>>>>private key. I hope 
>>>>you have a backup ;)
>>>>
>>>>Mark
>>>>
>>>>Bruce Perryman wrote:
>>>>
>>>>        
>>>>
>>>>>Hello,
>>>>>
>>>>>I'm using TC 5.0.19 and j2sdk1.4.2_04 on RedHat
>>>>>          
>>>>>
>>9.
>>    
>>
>>>>>My SSL certificate expired and I received a new
>>>>>          
>>>>>
>>>>one
>>>>
>>>>        
>>>>
>>>>>but haven't been able to get the new one to work.
>>>>>          
>>>>>
>>>>>Here are the steps that I used to get the
>>>>>          
>>>>>
>>>>certificate
>>>>
>>>>        
>>>>
>>>>>and import it into my keystore:
>>>>>
>>>>>[1] keytool -genkey -alias tomcat
>>>>>    -keyalg RSA -keystore .keystore
>>>>>[2] keytool -certreq -alias tomcat
>>>>>    -keystore .keystore -file tomcat.csr
>>>>>[3] Submit tomcat.csr to Entrust and then
>>>>>    retrieve entrust_ssl_ca.cer  (We used
>>>>>    cut and paste, not file download.)
>>>>>[4] shut down Tomcat
>>>>>[5] keytool -delete -alias tomcat
>>>>>     -keystore .keystore
>>>>>[6] keytool import -trustcacerts
>>>>>    -alias tomcat -file entrust_ssl_ca.cer
>>>>>    -keystore .keystore
>>>>>[7] restart tomcat
>>>>>Instead of [6], we also tried:
>>>>>[6a] keytool import -alias tomcat
>>>>>     -file entrust_ssl_ca.cer -keystore
>>>>>          
>>>>>
>>.keystore
>>    
>>
>>>>>When I restart Tomcat and view my page, I get the
>>>>>message that the page cannot be displayed.
>>>>>
>>>>>In my catalina.out file, I see the following
>>>>>          
>>>>>
>>>>severe
>>>>
>>>>        
>>>>
>>>>>error msg:
>>>>>
>>>>>Endpoint [SSL: ServerSocket[addr=     ]] ignored
>>>>>exception: java.net.SocketException: SSL
>>>>>          
>>>>>
>>handshake
>>    
>>
>>>>>errorjavax.net.ssl.SSLException: No available
>>>>>certificate corresponds to the SSL cipher suites
>>>>>          
>>>>>
>>>>which
>>>>
>>>>        
>>>>
>>>>>are enabled.
>>>>>
>>>>>Does anyone know what I'm doing wrong? I don't
>>>>>          
>>>>>
>>>>have
>>>>
>>>>        
>>>>
>>>>>the exact steps that I performed with my previous
>>>>>certificate, but the above steps are what I used
>>>>>          
>>>>>
>>>>for
>>>>
>>>>        
>>>>
>>>>>the newly issued certificate.
>>>>>
>>>>>Thanks, in advance, for your help.
>>>>>
>>>>>
>>>>>		
>>>>>__________________________________ 
>>>>>Do you Yahoo!? 
>>>>>Yahoo! Mail - 250MB free storage. Do more. Manage
>>>>>          
>>>>>
>>>>less. 
>>>>
>>>>        
>>>>
>>>>>http://info.mail.yahoo.com/mail_250
>>>>>
>>>>>
>>>>>          
>>>>>
>---------------------------------------------------------------------
>  
>
>>>>>To unsubscribe, e-mail:
>>>>>          
>>>>>
>>>>tomcat-user-unsubscribe@jakarta.apache.org
>>>>
>>>>        
>>>>
>>>>>For additional commands, e-mail:
>>>>>          
>>>>>
>>>>tomcat-user-help@jakarta.apache.org
>>>>
>>>>        
>>>>
>>>>>          
>>>>>
>>>>        
>>>>
>---------------------------------------------------------------------
>  
>
>>>>To unsubscribe, e-mail:
>>>>tomcat-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail:
>>>>tomcat-user-help@jakarta.apache.org
>>>>
>>>>
>>>>        
>>>>
>>>__________________________________________________
>>>Do You Yahoo!?
>>>Tired of spam?  Yahoo! Mail has the best spam
>>>      
>>>
>>protection around 
>>    
>>
>>>http://mail.yahoo.com 
>>>
>>>
>>>      
>>>
>---------------------------------------------------------------------
>  
>
>>>To unsubscribe, e-mail:
>>>      
>>>
>>tomcat-user-unsubscribe@jakarta.apache.org
>>    
>>
>>>For additional commands, e-mail:
>>>      
>>>
>>tomcat-user-help@jakarta.apache.org
>>    
>>
>>>
>>>      
>>>
>>
>>    
>>
>---------------------------------------------------------------------
>  
>
>>To unsubscribe, e-mail:
>>tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail:
>>tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around 
>http://mail.yahoo.com 
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Tomcat 5 and SSL Configuration
> From:
> Mark Thomas <ma...@apache.org>
> Date:
> Thu, 28 Apr 2005 19:00:54 +0100
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <42...@apache.org>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding:
> 7bit
>
>
> Bruce,
>
> Sorry. Don't know. I have only ever got it working using RSA. However, 
> when I did this I got so many things wrong the first 20 or so times I 
> tried it it could have been anything stopping it working.
>
> Mark
>
> Bruce Perryman wrote:
>
>> Thanks,
>>
>> It worked, the only problem is that we failed to
>> specify the RSA algorithm.
>>
>> Are we screwed for using DSA?
>>
>> --- Mark Thomas <ma...@apache.org> wrote:
>>
>>
>>> The following steps should work (although I have
>>> only ever done this using my own CA).
>>>
>>> 1. Create tomcat key in your own keystore
>>> 2. Create CSR
>>> 3. Submit CSR
>>> 4. Get response
>>> 5. Import CA's root cert to cacerts
>>> (%JAVA_HOME%\jre\lib\security\cacerts)
>>> 6. Import new cert to same keystore as 1 (use same
>>> alias & trustcacerts option)
>>> 7. Restart Tomcat
>>>
>>> HTH
>>>
>>> Mark
>>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> unable to send a java mail
> From:
> "vishwam" <gv...@info-telecomsys.com>
> Date:
> Thu, 28 Apr 2005 18:48:23 +0530
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@ez0>
> MIME-Version:
> 1.0
> Content-Type:
> multipart/alternative; 
> boundary="----=_NextPart_000_0021_01C54C22.DACB6910"
>
>
>iam trying to send a simple email using javamailAPI
>but iam getting the following error
>
>sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts.
>
> at sun.net.smtp.SmtpClient.issueCommand(Unknown Source)
> at sun.net.smtp.SmtpClient.toCanonical(Unknown Source)
>
>Iam trying for last 4 days 
>,but i couldn't solve this problem 
>
>it is important ,bcos iam using it in my project 
>i'll be grateful to someone who solves this problem
>
>thanks
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> RE: unable to send a java mail
> From:
> "Dale, Matt" <Ma...@beCogent.com>
> Date:
> Thu, 28 Apr 2005 14:19:05 +0100
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding:
> quoted-printable
> Message-ID:
> <BC...@exchair2.becogent.com>
>
>
>The problem appears to be with your SMTP server and not java. Looks like you might need to open it up a bit to relaying.
>
>Ta
>Matt
>
>-----Original Message-----
>From: vishwam [mailto:gvishwam@info-telecomsys.com]
>Sent: 28 April 2005 14:18
>To: Tomcat Users List
>Subject: unable to send a java mail 
>
>
>iam trying to send a simple email using javamailAPI
>but iam getting the following error
>
>sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts.
>
> at sun.net.smtp.SmtpClient.issueCommand(Unknown Source)
> at sun.net.smtp.SmtpClient.toCanonical(Unknown Source)
>
>Iam trying for last 4 days 
>,but i couldn't solve this problem 
>
>it is important ,bcos iam using it in my project 
>i'll be grateful to someone who solves this problem
>
>thanks
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> RE: unable to send a java mail
> From:
> "Peter Crowther" <Pe...@melandra.com>
> Date:
> Thu, 28 Apr 2005 14:23:49 +0100
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="us-ascii"
> Content-Transfer-Encoding:
> quoted-printable
> Message-ID:
> <DD...@raccoon.melandra.net>
>
>
>>From: vishwam [mailto:gvishwam@info-telecomsys.com] 
>>iam trying to send a simple email using javamailAPI
>>but iam getting the following error
>>
>>sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain 
>>isn't in my list of allowed rcpthosts.
>>    
>>
>
>That's a response from your mail server.  I suspect you're trying to
>send it something like:
>
>RCPT peter@somedomain.com
>
>... where it's not allowed to accept mail for somedomain.com, probably
>because the server's configured to stop it being used as a relay.
>
>If you know who you're sending to, try this from the Tomcat server:
>
>telnet <mailserver> 25
>[and then type into the telnet window]
>HELO <name of Tomcat server>
>MAIL From:<from address>
>RCPT To:<recipient address>
>
>... and see whether you get a 553 error back from the RCPT.  That would
>prove it.
>
>		- Peter
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: unable to send a java mail
> From:
> Marco Pöhler <li...@poehlerpoehler.de>
> Date:
> Thu, 28 Apr 2005 15:25:37 +0200
> To:
> "tomcat-user@jakarta.apache.org" <to...@jakarta.apache.org>
>
> To:
> "tomcat-user@jakarta.apache.org" <to...@jakarta.apache.org>
>
> Content-Type:
> text/plain
> Message-ID:
> <11...@laptop.poehlerpoehler.de>
> MIME-Version:
> 1.0
> Content-Transfer-Encoding:
> 7bit
>
>
>Hi,
>
>try to make a POP3 request before trying to send a SMTP Mail thru the
>mailserver. This can be a security feature of your mailserver.
>
>Marco
>
>---
>http://www.kontaktlinsen-preisvergleich.de
>http://www.parfuem-faq.de 
>
>Am Donnerstag, den 28.04.2005, 18:48 +0530 schrieb vishwam:
>  
>
>>iam trying to send a simple email using javamailAPI
>>but iam getting the following error
>>
>>sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list of allowed rcpthosts.
>>
>> at sun.net.smtp.SmtpClient.issueCommand(Unknown Source)
>> at sun.net.smtp.SmtpClient.toCanonical(Unknown Source)
>>
>>Iam trying for last 4 days 
>>,but i couldn't solve this problem 
>>
>>it is important ,bcos iam using it in my project 
>>i'll be grateful to someone who solves this problem
>>
>>thanks
>>    
>>
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: unable to send a java mail
> From:
> "vishwam" <gv...@info-telecomsys.com>
> Date:
> Thu, 28 Apr 2005 18:59:04 +0530
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@ez0>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding:
> 7bit
>
>
>my smtp server requires authentication with username & password
>
>but i couldn't find these smtp authentication fields in java mail
>specification
>my email program is like this
>
>
>public class MailServlet extends HttpServlet {
>
>  static final String FROM = "gvishwam@info-telecomsys.com";
>  static final String TO = "vishwam_1232@yahoo.com";
>
>  public void doGet(HttpServletRequest req, HttpServletResponse res)
>                               throws ServletException, IOException {
>    res.setContentType("text/plain");
>    PrintWriter out = res.getWriter();
>
>    ParameterParser parser = new ParameterParser(req);
>    String from = parser.getStringParameter("from", FROM);
>    String to = parser.getStringParameter("to", TO);
>
>    try {
>      SmtpClient smtp = new SmtpClient("xxxxxx");  // smtphost name
>      smtp.from(from);
>      smtp.to(to);
>      PrintStream msg = smtp.startMessage();
>
>      msg.println("To: " + to);  // so mailers will display the To: address
>      msg.println("Subject: Customer feedback");
>      msg.println();
>
>      Enumeration enum1 = req.getParameterNames();
>      while (enum1.hasMoreElements()) {
>        String name = (String)enum1.nextElement();
>        if (name.equals("to") || name.equals("from")) continue;  // Skip
>to/from
>        String value = parser.getStringParameter(name, null);
>        msg.println(name + " = " + value);
>      }
>
>      msg.println();
>      msg.println("---");
>      msg.println("Sent by " + HttpUtils.getRequestURL(req));
>
>      smtp.closeServer();
>}
>----- Original Message -----
>From: "Dale, Matt" <Ma...@beCogent.com>
>To: "Tomcat Users List" <to...@jakarta.apache.org>
>Sent: Thursday, April 28, 2005 6:49 PM
>Subject: RE: unable to send a java mail
>
>
>The problem appears to be with your SMTP server and not java. Looks like you
>might need to open it up a bit to relaying.
>
>Ta
>Matt
>
>-----Original Message-----
>From: vishwam [mailto:gvishwam@info-telecomsys.com]
>Sent: 28 April 2005 14:18
>To: Tomcat Users List
>Subject: unable to send a java mail
>
>
>iam trying to send a simple email using javamailAPI
>but iam getting the following error
>
>sun.net.smtp.SmtpProtocolException: 553 Sorry, that domain isn't in my list
>of allowed rcpthosts.
>
> at sun.net.smtp.SmtpClient.issueCommand(Unknown Source)
> at sun.net.smtp.SmtpClient.toCanonical(Unknown Source)
>
>Iam trying for last 4 days
>,but i couldn't solve this problem
>
>it is important ,bcos iam using it in my project
>i'll be grateful to someone who solves this problem
>
>thanks
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> RE: unable to send a java mail
> From:
> "Peter Crowther" <Pe...@melandra.com>
> Date:
> Thu, 28 Apr 2005 14:34:41 +0100
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="us-ascii"
> Content-Transfer-Encoding:
> quoted-printable
> Message-ID:
> <DD...@raccoon.melandra.net>
>
>
>>From: vishwam [mailto:gvishwam@info-telecomsys.com] 
>>my smtp server requires authentication with username & password
>>
>>but i couldn't find these smtp authentication fields in java mail
>>specification
>>    
>>
>
>The section entitled 'transport' in
>http://java.sun.com/developer/onlineTraining/JavaMail/contents.html
>gives more information - essentially, use Transport.send (message,
>username, password) to send the message.
>
>		- Peter
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Session lost when switching from https to http in Tomcat 5.
> From:
> "Anhony" <an...@comcast.net>
> Date:
> Thu, 28 Apr 2005 09:29:24 -0400
> To:
> <to...@jakarta.apache.org>
>
> To:
> <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@AS>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
> Content-Transfer-Encoding:
> 7bit
>
>
> I have a servlet/JSP application in which users establish their 
> servlet session using https but conduct the rest of their interactions 
> using http.
>
> The session appears not to be preserved between https and http, ie. 
> after switching from back to http the request.getSession(false) call 
> returns null. Can anyone shed light on this for me? Is this expected? 
> Is there a workaround/configuration/setting in Tomcat 5 I might have 
> missed?
>
> Thanks
>
> Anthony
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Session lost when switching from https to http in Tomcat 5.
> From:
> Anto Paul <an...@gmail.com>
> Date:
> Thu, 28 Apr 2005 19:56:08 +0530
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <8f...@mail.gmail.com>
> Reply-To:
> Anto Paul <an...@gmail.com>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1
> Content-Transfer-Encoding:
> quoted-printable
>
>
>On 4/28/05, Anhony <an...@comcast.net> wrote:
>  
>
>>I have a servlet/JSP application in which users establish their servlet
>>session using https but conduct the rest of their interactions using http.
>>
>>The session appears not to be preserved between https and http, ie. after
>>switching from back to http the request.getSession(false) call returns null.
>>Can anyone shed light on this for me? Is this expected? Is there a
>>workaround/configuration/setting in Tomcat 5 I might have missed?
>>
>>Thanks
>>
>>Anthony
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>
>Please specify version of Tomcat and URLs which you used which caused problems. 
>It is working fine for me on Tomcat 4.1.12,4.1.30,4.1.31.
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Session lost when switching from https to http in Tomcat 5.
> From:
> "Anhony" <an...@comcast.net>
> Date:
> Thu, 28 Apr 2005 10:42:56 -0400
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>, "Anto Paul" 
> <an...@gmail.com>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>, "Anto Paul" 
> <an...@gmail.com>
>
> Message-ID:
> <00...@AS>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
> Content-Transfer-Encoding:
> 7bit
>
>
> I am using Tomcat 5.0.28
>
> Users log into my application from https://xxx.com/login.jsp.  When 
> submitted, I check for a valid userID/Password, create a session with 
> getSession(), and then save the userID/Password in a session variable. 
> The validated user is then returned to my main tools page. If the user 
> then selects a link to a non secure page, http://..., I get a return 
> of null when performing getSession( false) when trying to check that 
> the user is valid.
>
> Thanks for the help.
>
> Anthony
>
>
> ----- Original Message ----- From: "Anto Paul" <an...@gmail.com>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, April 28, 2005 10:26 AM
> Subject: Re: Session lost when switching from https to http in Tomcat 5.
>
>
> On 4/28/05, Anhony <an...@comcast.net> wrote:
>
>> I have a servlet/JSP application in which users establish their servlet
>> session using https but conduct the rest of their interactions using 
>> http.
>>
>> The session appears not to be preserved between https and http, ie. 
>> after
>> switching from back to http the request.getSession(false) call 
>> returns null.
>> Can anyone shed light on this for me? Is this expected? Is there a
>> workaround/configuration/setting in Tomcat 5 I might have missed?
>>
>> Thanks
>>
>> Anthony
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
> Please specify version of Tomcat and URLs which you used which caused 
> problems.
> It is working fine for me on Tomcat 4.1.12,4.1.30,4.1.31.
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Session lost when switching from https to http in Tomcat 5.
> From:
> David Smith <dn...@cornell.edu>
> Date:
> Thu, 28 Apr 2005 11:23:36 -0400
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <42...@cornell.edu>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding:
> 7bit
>
>
> Last I knew sessions are not shared between SSL and non-SSL 
> connections by design (as opposed to a bug).  Your best bet is probably:
>
> 1. Start a session on the non-ssl side
> 2. Forward the user to the ssl login w/ the session id in the request
> 3. The ssl login stores the session id and any other important info in 
> a shared persistence layer (i.e. database) and forwards back to the 
> non-ssl side
> 4. The non-ssl side checks the persistence layer for it's session id 
> and any other info left by the login page.
>
> --David
>
> Anhony wrote:
>
>> I am using Tomcat 5.0.28
>>
>> Users log into my application from https://xxx.com/login.jsp.  When 
>> submitted, I check for a valid userID/Password, create a session with 
>> getSession(), and then save the userID/Password in a session 
>> variable. The validated user is then returned to my main tools page. 
>> If the user then selects a link to a non secure page, http://..., I 
>> get a return of null when performing getSession( false) when trying 
>> to check that the user is valid.
>>
>> Thanks for the help.
>>
>> Anthony
>>
>>
>> ----- Original Message ----- From: "Anto Paul" <an...@gmail.com>
>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>> Sent: Thursday, April 28, 2005 10:26 AM
>> Subject: Re: Session lost when switching from https to http in Tomcat 5.
>>
>>
>> On 4/28/05, Anhony <an...@comcast.net> wrote:
>>
>>> I have a servlet/JSP application in which users establish their servlet
>>> session using https but conduct the rest of their interactions using 
>>> http.
>>>
>>> The session appears not to be preserved between https and http, ie. 
>>> after
>>> switching from back to http the request.getSession(false) call 
>>> returns null.
>>> Can anyone shed light on this for me? Is this expected? Is there a
>>> workaround/configuration/setting in Tomcat 5 I might have missed?
>>>
>>> Thanks
>>>
>>> Anthony
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>> Please specify version of Tomcat and URLs which you used which caused 
>> problems.
>> It is working fine for me on Tomcat 4.1.12,4.1.30,4.1.31.
>>
>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> How to use servlet filters without modifying webapp
> From:
> "joelsherriff" <jo...@comcast.net>
> Date:
> Thu, 28 Apr 2005 09:36:32 -0400
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@akumac>
> MIME-Version:
> 1.0
> Content-Type:
> multipart/alternative; 
> boundary="----=_NextPart_000_00B2_01C54BD5.C30FFF90"
>
>
>Hello,
>    I'm experimenting with applying a servlet filter to an existing webapp and I'm getting a ClassCastException upon startup.
>Can I do this without modifying the webapp source and adding my filter in there?  If so, what else could be causing this?
>
>I'm not sure where it looks for the filter .class file but I put it in the webapp's WEB-INF/classes directory - I guess it finds it
>since I'm getting this error.  The filter really does nothing, I'm just trying to get A filter in place before making it more complicated.
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: How to use servlet filters without modifying webapp
> From:
> "Anhony" <an...@comcast.net>
> Date:
> Thu, 28 Apr 2005 09:48:55 -0400
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@AS>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
> Content-Transfer-Encoding:
> 7bit
>
>
> Greetings,
>
> Try adding a <filter> block to your web.xml. Your JSP container 
> locates your filters thru these sections in the web.xml. I included a 
> small sample <filter> block below.
>
> <filter>
>     <filter-name>processingFilter</filter-name>
>     <filter-class>servletFilters.ProcessingFilter</filter-class>
> </filter>
>
> I hope this helps.
>
> Anthony-
>
>
>
> ----- Original Message ----- From: "joelsherriff" 
> <jo...@comcast.net>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Thursday, April 28, 2005 9:36 AM
> Subject: How to use servlet filters without modifying webapp
>
>
> Hello,
>    I'm experimenting with applying a servlet filter to an existing 
> webapp and I'm getting a ClassCastException upon startup.
> Can I do this without modifying the webapp source and adding my filter 
> in there?  If so, what else could be causing this?
>
> I'm not sure where it looks for the filter .class file but I put it in 
> the webapp's WEB-INF/classes directory - I guess it finds it
> since I'm getting this error.  The filter really does nothing, I'm 
> just trying to get A filter in place before making it more complicated.
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: How to use servlet filters without modifying webapp
> From:
> "joelsherriff" <jo...@comcast.net>
> Date:
> Thu, 28 Apr 2005 10:08:12 -0400
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@akumac>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding:
> 7bit
>
>
>I've done that, thanks.  Here's what I added for the filter:
>
>    <filter>
>        <filter-name>timerFilter</filter-name>
>        <filter-class>TimerFilter</filter-class>
>    </filter>
>
>    <filter-mapping>
>        <filter-name>timerFilter</filter-name>
>        <url-pattern>/*</url-pattern>
>    </filter-mapping>
>
>to my web.xml.  It appears to be finding it properly.  If I change the
>filter name to a non-existent filter, I
>properly get a ClassNotFoundException.  So it's something IN the filter, or
>so it would seem.  All I've
>done is copy an example filter from the web - it looks like:
>
>import java.io.*;
>import javax.servlet.*;
>import javax.servlet.http.*;
>
>public class TimerFilter implements Filter {
>
>  private FilterConfig config = null;
>
>  public void init(FilterConfig config) throws ServletException {
>    this.config = config;
>  }
>
>  public void destroy() {
>    this.config = null;
>  }
>
>  public void doFilter(ServletRequest request, ServletResponse response,
>                     FilterChain chain) throws IOException, ServletException
>{
>    long before = System.currentTimeMillis();
>    chain.doFilter(request, response);
>    long after = System.currentTimeMillis();
>
>    String name = "";
>    if (request instanceof HttpServletRequest) {
>      name = ((HttpServletRequest)request).getRequestURI();
>    }
>    config.getServletContext().log(name + ": " + (after - before) + "ms");
>  }
>}
>
>
>
>
>----- Original Message ----- 
>From: "Anhony" <an...@comcast.net>
>To: "Tomcat Users List" <to...@jakarta.apache.org>
>Sent: Thursday, April 28, 2005 9:48 AM
>Subject: Re: How to use servlet filters without modifying webapp
>
>
>  
>
>>Greetings,
>>
>>Try adding a <filter> block to your web.xml. Your JSP container locates
>>    
>>
>your
>  
>
>>filters thru these sections in the web.xml. I included a small sample
>><filter> block below.
>>
>><filter>
>>     <filter-name>processingFilter</filter-name>
>>     <filter-class>servletFilters.ProcessingFilter</filter-class>
>></filter>
>>
>>I hope this helps.
>>
>>Anthony-
>>
>>
>>
>>----- Original Message ----- 
>>From: "joelsherriff" <jo...@comcast.net>
>>To: "Tomcat Users List" <to...@jakarta.apache.org>
>>Sent: Thursday, April 28, 2005 9:36 AM
>>Subject: How to use servlet filters without modifying webapp
>>
>>
>>Hello,
>>    I'm experimenting with applying a servlet filter to an existing webapp
>>and I'm getting a ClassCastException upon startup.
>>Can I do this without modifying the webapp source and adding my filter in
>>there?  If so, what else could be causing this?
>>
>>I'm not sure where it looks for the filter .class file but I put it in the
>>webapp's WEB-INF/classes directory - I guess it finds it
>>since I'm getting this error.  The filter really does nothing, I'm just
>>trying to get A filter in place before making it more complicated.
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: How to use servlet filters without modifying webapp
> From:
> "joelsherriff" <jo...@comcast.net>
> Date:
> Thu, 28 Apr 2005 10:20:19 -0400
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@akumac>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding:
> 7bit
>
>
>And to save anyone the trouble, I also tried substituting the url-pattern
>element for a servlet-name element and named the
>servlet I'm trying to filter.  Same result - ClassCastException.  I get
>nothing helpful from the log, but just in case someone
>with more experience can, here's a snip:
>
>2005-04-28 10:16:59 StandardContext[/blojsom]: Starting filters
>2005-04-28 10:16:59 StandardContext[/blojsom]:  Starting filter
>'timerFilter'
>2005-04-28 10:16:59 StandardContext[/blojsom]: Exception starting filter
>timerFilter
>java.lang.ClassCastException
> at
>org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
>Config.java:206)
> at
>org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
>terConfig.java:280)
> at
>org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCon
>fig.java:73)
> at
>org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:31
>01)
>
>
>----- Original Message ----- 
>From: "joelsherriff" <jo...@comcast.net>
>To: "Tomcat Users List" <to...@jakarta.apache.org>
>Sent: Thursday, April 28, 2005 10:08 AM
>Subject: Re: How to use servlet filters without modifying webapp
>
>
>  
>
>>I've done that, thanks.  Here's what I added for the filter:
>>
>>    <filter>
>>        <filter-name>timerFilter</filter-name>
>>        <filter-class>TimerFilter</filter-class>
>>    </filter>
>>
>>    <filter-mapping>
>>        <filter-name>timerFilter</filter-name>
>>        <url-pattern>/*</url-pattern>
>>    </filter-mapping>
>>
>>to my web.xml.  It appears to be finding it properly.  If I change the
>>filter name to a non-existent filter, I
>>properly get a ClassNotFoundException.  So it's something IN the filter,
>>    
>>
>or
>  
>
>>so it would seem.  All I've
>>done is copy an example filter from the web - it looks like:
>>
>>import java.io.*;
>>import javax.servlet.*;
>>import javax.servlet.http.*;
>>
>>public class TimerFilter implements Filter {
>>
>>  private FilterConfig config = null;
>>
>>  public void init(FilterConfig config) throws ServletException {
>>    this.config = config;
>>  }
>>
>>  public void destroy() {
>>    this.config = null;
>>  }
>>
>>  public void doFilter(ServletRequest request, ServletResponse response,
>>                     FilterChain chain) throws IOException,
>>    
>>
>ServletException
>  
>
>>{
>>    long before = System.currentTimeMillis();
>>    chain.doFilter(request, response);
>>    long after = System.currentTimeMillis();
>>
>>    String name = "";
>>    if (request instanceof HttpServletRequest) {
>>      name = ((HttpServletRequest)request).getRequestURI();
>>    }
>>    config.getServletContext().log(name + ": " + (after - before) + "ms");
>>  }
>>}
>>
>>
>>
>>
>>----- Original Message ----- 
>>From: "Anhony" <an...@comcast.net>
>>To: "Tomcat Users List" <to...@jakarta.apache.org>
>>Sent: Thursday, April 28, 2005 9:48 AM
>>Subject: Re: How to use servlet filters without modifying webapp
>>
>>
>>    
>>
>>>Greetings,
>>>
>>>Try adding a <filter> block to your web.xml. Your JSP container locates
>>>      
>>>
>>your
>>    
>>
>>>filters thru these sections in the web.xml. I included a small sample
>>><filter> block below.
>>>
>>><filter>
>>>     <filter-name>processingFilter</filter-name>
>>>     <filter-class>servletFilters.ProcessingFilter</filter-class>
>>></filter>
>>>
>>>I hope this helps.
>>>
>>>Anthony-
>>>
>>>
>>>
>>>----- Original Message ----- 
>>>From: "joelsherriff" <jo...@comcast.net>
>>>To: "Tomcat Users List" <to...@jakarta.apache.org>
>>>Sent: Thursday, April 28, 2005 9:36 AM
>>>Subject: How to use servlet filters without modifying webapp
>>>
>>>
>>>Hello,
>>>    I'm experimenting with applying a servlet filter to an existing
>>>      
>>>
>webapp
>  
>
>>>and I'm getting a ClassCastException upon startup.
>>>Can I do this without modifying the webapp source and adding my filter
>>>      
>>>
>in
>  
>
>>>there?  If so, what else could be causing this?
>>>
>>>I'm not sure where it looks for the filter .class file but I put it in
>>>      
>>>
>the
>  
>
>>>webapp's WEB-INF/classes directory - I guess it finds it
>>>since I'm getting this error.  The filter really does nothing, I'm just
>>>trying to get A filter in place before making it more complicated.
>>>
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>      
>>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: How to use servlet filters without modifying webapp
> From:
> "Robert r. Sanders" <ro...@ipov.net>
> Date:
> Thu, 28 Apr 2005 09:26:10 -0500
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <42...@ipov.net>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding:
> 7bit
>
>
> Try the following:
>
>    - Put you filter into a package, I've seen some versions of the JVM 
> that really don't like non-package classes.
>    - Make sure you are using settings compatible with the JVM that 
> Tomcat is running under when compiling the class.
>
> joelsherriff wrote:
>
>> I've done that, thanks.  Here's what I added for the filter:
>>
>>    <filter>
>>        <filter-name>timerFilter</filter-name>
>>        <filter-class>TimerFilter</filter-class>
>>    </filter>
>>
>>    <filter-mapping>
>>        <filter-name>timerFilter</filter-name>
>>        <url-pattern>/*</url-pattern>
>>    </filter-mapping>
>>
>> to my web.xml.  It appears to be finding it properly.  If I change the
>> filter name to a non-existent filter, I
>> properly get a ClassNotFoundException.  So it's something IN the 
>> filter, or
>> so it would seem.  All I've
>> done is copy an example filter from the web - it looks like:
>>
>> import java.io.*;
>> import javax.servlet.*;
>> import javax.servlet.http.*;
>>
>> public class TimerFilter implements Filter {
>>
>>  private FilterConfig config = null;
>>
>>  public void init(FilterConfig config) throws ServletException {
>>    this.config = config;
>>  }
>>
>>  public void destroy() {
>>    this.config = null;
>>  }
>>
>>  public void doFilter(ServletRequest request, ServletResponse response,
>>                     FilterChain chain) throws IOException, 
>> ServletException
>> {
>>    long before = System.currentTimeMillis();
>>    chain.doFilter(request, response);
>>    long after = System.currentTimeMillis();
>>
>>    String name = "";
>>    if (request instanceof HttpServletRequest) {
>>      name = ((HttpServletRequest)request).getRequestURI();
>>    }
>>    config.getServletContext().log(name + ": " + (after - before) + 
>> "ms");
>>  }
>> }
>>
>>
>>
>>
>> ----- Original Message ----- From: "Anhony" <an...@comcast.net>
>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>> Sent: Thursday, April 28, 2005 9:48 AM
>> Subject: Re: How to use servlet filters without modifying webapp
>>
>>
>>  
>>
>>> Greetings,
>>>
>>> Try adding a <filter> block to your web.xml. Your JSP container locates
>>>   
>>
>> your
>>  
>>
>>> filters thru these sections in the web.xml. I included a small sample
>>> <filter> block below.
>>>
>>> <filter>
>>>     <filter-name>processingFilter</filter-name>
>>>     <filter-class>servletFilters.ProcessingFilter</filter-class>
>>> </filter>
>>>
>>> I hope this helps.
>>>
>>> Anthony-
>>>
>>>
>>>
>>> ----- Original Message ----- From: "joelsherriff" 
>>> <jo...@comcast.net>
>>> To: "Tomcat Users List" <to...@jakarta.apache.org>
>>> Sent: Thursday, April 28, 2005 9:36 AM
>>> Subject: How to use servlet filters without modifying webapp
>>>
>>>
>>> Hello,
>>>    I'm experimenting with applying a servlet filter to an existing 
>>> webapp
>>> and I'm getting a ClassCastException upon startup.
>>> Can I do this without modifying the webapp source and adding my 
>>> filter in
>>> there?  If so, what else could be causing this?
>>>
>>> I'm not sure where it looks for the filter .class file but I put it 
>>> in the
>>> webapp's WEB-INF/classes directory - I guess it finds it
>>> since I'm getting this error.  The filter really does nothing, I'm just
>>> trying to get A filter in place before making it more complicated.
>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>   
>>
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>  
>>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: How to use servlet filters without modifying webapp
> From:
> "joelsherriff" <jo...@comcast.net>
> Date:
> Thu, 28 Apr 2005 12:15:12 -0400
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> To:
> "Tomcat Users List" <to...@jakarta.apache.org>
>
> Message-ID:
> <00...@akumac>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="iso-8859-1"
> Content-Transfer-Encoding:
> 7bit
>
>
>Thanks - that seemed to do the trick.
>
>----- Original Message ----- 
>From: "Robert r. Sanders" <ro...@ipov.net>
>To: "Tomcat Users List" <to...@jakarta.apache.org>
>Sent: Thursday, April 28, 2005 10:26 AM
>Subject: Re: How to use servlet filters without modifying webapp
>
>
>  
>
>>Try the following:
>>
>>    - Put you filter into a package, I've seen some versions of the JVM
>>that really don't like non-package classes.
>>    - Make sure you are using settings compatible with the JVM that
>>Tomcat is running under when compiling the class.
>>
>>joelsherriff wrote:
>>
>>    
>>
>>>I've done that, thanks.  Here's what I added for the filter:
>>>
>>>   <filter>
>>>       <filter-name>timerFilter</filter-name>
>>>       <filter-class>TimerFilter</filter-class>
>>>   </filter>
>>>
>>>   <filter-mapping>
>>>       <filter-name>timerFilter</filter-name>
>>>       <url-pattern>/*</url-pattern>
>>>   </filter-mapping>
>>>
>>>to my web.xml.  It appears to be finding it properly.  If I change the
>>>filter name to a non-existent filter, I
>>>properly get a ClassNotFoundException.  So it's something IN the filter,
>>>      
>>>
>or
>  
>
>>>so it would seem.  All I've
>>>done is copy an example filter from the web - it looks like:
>>>
>>>import java.io.*;
>>>import javax.servlet.*;
>>>import javax.servlet.http.*;
>>>
>>>public class TimerFilter implements Filter {
>>>
>>> private FilterConfig config = null;
>>>
>>> public void init(FilterConfig config) throws ServletException {
>>>   this.config = config;
>>> }
>>>
>>> public void destroy() {
>>>   this.config = null;
>>> }
>>>
>>> public void doFilter(ServletRequest request, ServletResponse response,
>>>                    FilterChain chain) throws IOException,
>>>      
>>>
>ServletException
>  
>
>>>{
>>>   long before = System.currentTimeMillis();
>>>   chain.doFilter(request, response);
>>>   long after = System.currentTimeMillis();
>>>
>>>   String name = "";
>>>   if (request instanceof HttpServletRequest) {
>>>     name = ((HttpServletRequest)request).getRequestURI();
>>>   }
>>>   config.getServletContext().log(name + ": " + (after - before) +
>>>      
>>>
>"ms");
>  
>
>>> }
>>>}
>>>
>>>
>>>
>>>
>>>----- Original Message ----- 
>>>From: "Anhony" <an...@comcast.net>
>>>To: "Tomcat Users List" <to...@jakarta.apache.org>
>>>Sent: Thursday, April 28, 2005 9:48 AM
>>>Subject: Re: How to use servlet filters without modifying webapp
>>>
>>>
>>>
>>>
>>>      
>>>
>>>>Greetings,
>>>>
>>>>Try adding a <filter> block to your web.xml. Your JSP container locates
>>>>
>>>>
>>>>        
>>>>
>>>your
>>>
>>>
>>>      
>>>
>>>>filters thru these sections in the web.xml. I included a small sample
>>>><filter> block below.
>>>>
>>>><filter>
>>>>    <filter-name>processingFilter</filter-name>
>>>>    <filter-class>servletFilters.ProcessingFilter</filter-class>
>>>></filter>
>>>>
>>>>I hope this helps.
>>>>
>>>>Anthony-
>>>>
>>>>
>>>>
>>>>----- Original Message ----- 
>>>>From: "joelsherriff" <jo...@comcast.net>
>>>>To: "Tomcat Users List" <to...@jakarta.apache.org>
>>>>Sent: Thursday, April 28, 2005 9:36 AM
>>>>Subject: How to use servlet filters without modifying webapp
>>>>
>>>>
>>>>Hello,
>>>>   I'm experimenting with applying a servlet filter to an existing
>>>>        
>>>>
>webapp
>  
>
>>>>and I'm getting a ClassCastException upon startup.
>>>>Can I do this without modifying the webapp source and adding my filter
>>>>        
>>>>
>in
>  
>
>>>>there?  If so, what else could be causing this?
>>>>
>>>>I'm not sure where it looks for the filter .class file but I put it in
>>>>        
>>>>
>the
>  
>
>>>>webapp's WEB-INF/classes directory - I guess it finds it
>>>>since I'm getting this error.  The filter really does nothing, I'm just
>>>>trying to get A filter in place before making it more complicated.
>>>>
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>
>>>
>>>      
>>>
>>-- 
>>    Robert r. Sanders
>>    Chief Technologist
>>    iPOV
>>    (334) 821-5412
>>    www.ipov.net
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> deploy using manager
> From:
> "Jiang, Peiyun" <Pe...@nrc-cnrc.gc.ca>
> Date:
> Thu, 28 Apr 2005 12:23:59 -0400
> To:
> 'Tomcat Users List' <to...@jakarta.apache.org>
>
> To:
> 'Tomcat Users List' <to...@jakarta.apache.org>
>
> Message-ID:
> <10...@nrcmrdex1d.imsb.nrc.ca>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset="iso-8859-1"
>
>
>>>From tomcat /manager/ did:
>(1) remove application
>(2) uploaded war from PC to server to install
>(3) optionally reload/stop/start, sometimes repeatedly
>
>Tomcat still running the old version.
>
>Any known reasons?
>
>Peiyun Jiang
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> RE: deploy using manager
> From:
> "Raghupathy,Gurumoorthy" <gu...@uk.fid-intl.com>
> Date:
> Thu, 28 Apr 2005 17:25:47 +0100
> To:
> "'Tomcat Users List'" <to...@jakarta.apache.org>
>
> To:
> "'Tomcat Users List'" <to...@jakarta.apache.org>
>
> Message-ID:
> <84...@ukkwd705nts.kwd.uk.fid-intl.com> 
>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain
>
>
>Delete the work dir and reload 
>
>-----Original Message-----
>From: Jiang, Peiyun [mailto:Peiyun.Jiang@nrc-cnrc.gc.ca] 
>Sent: 28 April 2005 17:24
>To: 'Tomcat Users List'
>Subject: deploy using manager
>
>
>>>From tomcat /manager/ did:
>(1) remove application
>(2) uploaded war from PC to server to install
>(3) optionally reload/stop/start, sometimes repeatedly
>
>Tomcat still running the old version.
>
>Any known reasons?
>
>Peiyun Jiang
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: deploy using manager
> From:
> David Whitehurst <dl...@comcast.net>
> Date:
> Thu, 28 Apr 2005 09:36:05 -0400
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <42...@comcast.net>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding:
> 7bit
>
>
> I use JBoss 3.2.5 and sometimes I have great difficulty in getting 
> servlet or JSP apps to redeploy correctly.  I have learned over time 
> to delete the /work and /tmp directories in the server area of JBoss.  
> The /work dir is Tomcat's compiled JSPs and Servlets and the /tmp dir 
> is JBoss' deployment staging.
>
> Can someone explain in technical terms why servlet apps sometimes have 
> this problem?  I want to understand why just deleting dirs fixes 
> things.  I also understand that JSP changes are supposed to recompile 
> on-demand calling the URL.
>
> Thanks,
>
> David L. Whitehurst
> Raghupathy,Gurumoorthy wrote:
>
>> Delete the work dir and reload
>> -----Original Message-----
>> From: Jiang, Peiyun [mailto:Peiyun.Jiang@nrc-cnrc.gc.ca] Sent: 28 
>> April 2005 17:24
>> To: 'Tomcat Users List'
>> Subject: deploy using manager
>>
>>
>>> From tomcat /manager/ did:
>>
>> (1) remove application
>> (2) uploaded war from PC to server to install
>> (3) optionally reload/stop/start, sometimes repeatedly
>>
>> Tomcat still running the old version.
>>
>> Any known reasons?
>>
>> Peiyun Jiang
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>  
>>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Images & CSS not loaded after the request passes through a Servlet Filter
> From:
> Roberto <ro...@gmail.com>
> Date:
> Thu, 28 Apr 2005 14:25:07 -0300
> To:
> tomcat-user@jakarta.apache.org
>
> To:
> tomcat-user@jakarta.apache.org
>
> Message-ID:
> <ec...@mail.gmail.com>
> Reply-To:
> Roberto <ro...@gmail.com>
> MIME-Version:
> 1.0
> Content-Type:
> multipart/alternative; boundary="----=_Part_2164_1056831.1114709107829"
>
>
>Hi,
>
>I have a small java application, in which a servlet processes the request 
>and then
>calls a JSP to present the data. Everything is OK with that configuration. 
>Then, I decided
>to create a servlet filter, to redirect every request to that application, 
>to a login page first.
>
>The code of that filter is the following:
>
>******************************
>public final class ApplicationFilter implements Filter {
>private FilterConfig _fc = null;
>
>public void init(FilterConfig filterConfig)
>throws ServletException {
>this._fc = filterConfig;
>}
>
>public void doFilter(ServletRequest request,
>ServletResponse response,
>FilterChain chain)
>throws IOException,
>ServletException {
>
>try {
>RequestDispatcher rd = 
>_fc.getServletContext().getRequestDispatcher("/login");
>rd.forward(request, response);
>} catch (Exception e) {
>System.out.println("Exception: " + e.getMessage());
>e.printStackTrace();
>}
>}
>
>-- (the rest was intentionally omitted) --
>*******************************************
>
>
>The redirection works great, BUT all images and CSS referenced in the JSP 
>file are not
>loaded after the request passes through the filter. The application runs 
>perfectly, and takes
>the user to the login screen, and after that, to the application. The 
>application does some
>database queries and returns the data correctly. BUT, everything without 
>images or the
>styles defined in the CSS file. 
>
>Just to make a test, I put the CSS file contents directly inside the JSP 
>file, and it
>worked great. In this case, images were not loaded also...
>
>The process flows like this:
>
>Request --> Filter --> login (a servlet) --> login.jsp --> queryDB (a 
>servlet) --> queryDB.jsp
>
>When I disable the filter, in the web.xml file, everything works as would be 
>expected.
>
>The configuration in web.xml is OK: all servlets are set, as is the filter 
>itself.
>
>I'm using Tomcat 5.0.28 on a Gentoo Linux system, with POSIX threads and 
>kernel
>2.6.9. The hardware is a P IV HT 3.2 Ghz.
>
>I also checked the archives of this list, but was unable to find any 
>reference to a problem
>like this one. Does anyone know what is happening ?
>
>Regards,
>Roberto
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Images & CSS not loaded after the request passes through a Servlet 
> Filter
> From:
> "Frank W. Zammetti" <fz...@omnytex.com>
> Date:
> Thu, 28 Apr 2005 13:37:01 -0400 (EDT)
> To:
> "Roberto" <ro...@gmail.com>
>
> To:
> "Roberto" <ro...@gmail.com>
> CC:
> tomcat-user@jakarta.apache.org
>
> Message-ID:
> <28...@webmail.chiron.lunarpages.com>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain;charset=iso-8859-1
> Content-Transfer-Encoding:
> 8bit
>
>
>Question: are the requests for images and CSS files also going through the
>filter?  I'm wondering if those requests are getting forarded to the logon
>page too, which obviously wouldn't work.
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Images & CSS not loaded after the request passes through a Servlet 
> Filter
> From:
> Roberto <ro...@gmail.com>
> Date:
> Thu, 28 Apr 2005 15:04:55 -0300
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <ec...@mail.gmail.com>
> Reply-To:
> Roberto <ro...@gmail.com>
> MIME-Version:
> 1.0
> Content-Type:
> multipart/alternative; boundary="----=_Part_2181_2199245.1114711495791"
>
>
>Frank,
>
>You got it. The filter configuration, in the web.xml file, was
>intercepting ALL requests (<url-pattern>/*</url-pattern>). I really
>thought that the filter would intercept only requests for Servlets,
>not all HTTP requests...
>
>Thanks ! This problem was really pissing me off... :)
>
>Regards
>Roberto
>
>On 4/28/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
>  
>
>>Question: are the requests for images and CSS files also going through the
>>filter? I'm wondering if those requests are getting forarded to the logon
>>page too, which obviously wouldn't work.
>>
>>--
>>Frank W. Zammetti
>>Founder and Chief Software Architect
>>Omnytex Technologies
>>http://www.omnytex.com
>>
>>On Thu, April 28, 2005 1:25 pm, Roberto said:
>>    
>>
>>>Hi,
>>>
>>>I have a small java application, in which a servlet processes the 
>>>      
>>>
>>request
>>    
>>
>>>and then
>>>calls a JSP to present the data. Everything is OK with that 
>>>      
>>>
>>configuration.
>>    
>>
>>>Then, I decided
>>>to create a servlet filter, to redirect every request to that 
>>>      
>>>
>>application,
>>    
>>
>>>to a login page first.
>>>
>>>The code of that filter is the following:
>>>
>>>******************************
>>>public final class ApplicationFilter implements Filter {
>>>private FilterConfig _fc = null;
>>>
>>>public void init(FilterConfig filterConfig)
>>>throws ServletException {
>>>this._fc = filterConfig;
>>>}
>>>
>>>public void doFilter(ServletRequest request,
>>>ServletResponse response,
>>>FilterChain chain)
>>>throws IOException,
>>>ServletException {
>>>
>>>try {
>>>RequestDispatcher rd =
>>>_fc.getServletContext().getRequestDispatcher("/login");
>>>rd.forward(request, response);
>>>} catch (Exception e) {
>>>System.out.println("Exception: " + e.getMessage());
>>>e.printStackTrace();
>>>}
>>>}
>>>
>>>-- (the rest was intentionally omitted) --
>>>*******************************************
>>>
>>>
>>>The redirection works great, BUT all images and CSS referenced in the 
>>>      
>>>
>>JSP
>>    
>>
>>>file are not
>>>loaded after the request passes through the filter. The application runs
>>>perfectly, and takes
>>>the user to the login screen, and after that, to the application. The
>>>application does some
>>>database queries and returns the data correctly. BUT, everything without
>>>images or the
>>>styles defined in the CSS file.
>>>
>>>Just to make a test, I put the CSS file contents directly inside the JSP
>>>file, and it
>>>worked great. In this case, images were not loaded also...
>>>
>>>The process flows like this:
>>>
>>>Request --> Filter --> login (a servlet) --> login.jsp --> queryDB (a
>>>servlet) --> queryDB.jsp
>>>
>>>When I disable the filter, in the web.xml file, everything works as 
>>>      
>>>
>>would
>>    
>>
>>>be
>>>expected.
>>>
>>>The configuration in web.xml is OK: all servlets are set, as is the 
>>>      
>>>
>>filter
>>    
>>
>>>itself.
>>>
>>>I'm using Tomcat 5.0.28 on a Gentoo Linux system, with POSIX threads and
>>>kernel
>>>2.6.9. The hardware is a P IV HT 3.2 Ghz.
>>>
>>>I also checked the archives of this list, but was unable to find any
>>>reference to a problem
>>>like this one. Does anyone know what is happening ?
>>>
>>>Regards,
>>>Roberto
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>    
>>
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> logging problem (bug?)
> From:
> matt.pierce@colinx.com
> Date:
> Thu, 28 Apr 2005 13:53:12 -0400
> To:
> tomcat-user@jakarta.apache.org
>
> To:
> tomcat-user@jakarta.apache.org
>
> MIME-Version:
> 1.0
> Message-ID:
> <OF...@colinx.com>
> Content-Type:
> multipart/alternative; boundary="=_alternative 0062416885256FF1_="
>
>
>I am running tomcat 5.5 on a java 1.5 vm.
>I want to turn tomcat logging (via java.util logging) up for debugging but 
>if I set everything to FINEST there is so much logging that It takes far 
>too much time to start up.  I am trying to trim down some of the excess 
>logging to make this more manageable.  One of the packages producing 
>excessive logs is org.apache.tomcat.util.digester.  I am trying to turn 
>this package down, but found that I cannot affect it by turning down the 
>logger of that name with the following line in 
>$JAVA_HOME/jre/lib/logging.properties: 
>
>org.apache.tomcat.util.digester.level = INFO
>
>Rather, the only logger I have found that affects it is 
>org.apache.commons.  The problem is that this then blocks all of the 
>commons logging which I want.  Is there a way that I can just turn down 
>the logging on the tomcat.util.digester package?  Is this a bug?
>
>
>  
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Virtual Hosts and SSL Certificates
> From:
> Mark Thomas <ma...@apache.org>
> Date:
> Thu, 28 Apr 2005 18:53:36 +0100
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <42...@apache.org>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding:
> 7bit
>
>
> You will need to SSL connectors, once for each host.
>
> Mark
>
> Fritz Schneider wrote:
>
>> I am running TC 5.5.8 standalone under Windows XP Pro. I have two 
>> domains
>> coming in to the same IP address, one for production and one for 
>> testing.
>> There are two <host> elements in my <engine>. I have a CA created SSL
>> certificate for the production domain, but I want to add a self-signed
>> certificate for the test domain.
>>
>> My question is: if I import my test certificate with alias tomcat, 
>> will that
>> overwrite my production certificate? Can I import it with a different 
>> alias?
>> If so, how does the SSL Connector find it?
>>
>> Thanks,
>> Fritz
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: Virtual Hosts and SSL Certificates
> From:
> Mark Thomas <ma...@apache.org>
> Date:
> Thu, 28 Apr 2005 18:53:47 +0100
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> To:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <42...@apache.org>
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1; format=flowed
> Content-Transfer-Encoding:
> 7bit
>
>
> You will need two SSL connectors, once for each host.
>
> Mark
>
> Fritz Schneider wrote:
>
>> I am running TC 5.5.8 standalone under Windows XP Pro. I have two 
>> domains
>> coming in to the same IP address, one for production and one for 
>> testing.
>> There are two <host> elements in my <engine>. I have a CA created SSL
>> certificate for the production domain, but I want to add a self-signed
>> certificate for the test domain.
>>
>> My question is: if I import my test certificate with alias tomcat, 
>> will that
>> overwrite my production certificate? Can I import it with a different 
>> alias?
>> If so, how does the SSL Connector find it?
>>
>> Thanks,
>> Fritz
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>
>
> ------------------------------------------------------------------------
>
> Subject:
> Re: tomcat connectors
> From:
> "Patty O'Reilly" <or...@qualcomm.com>
> Date:
> Thu, 28 Apr 2005 11:19:41 -0700 (PDT)
> To:
> Mladen Turk <ml...@jboss.com>
>
> To:
> Mladen Turk <ml...@jboss.com>
> CC:
> Tomcat Users List <to...@jakarta.apache.org>
>
> Message-ID:
> <Pi...@zelda.qualcomm.com>
> MIME-Version:
> 1.0
> Content-Type:
> TEXT/PLAIN; charset=US-ASCII
>
>
>Mladen,
>
>You are my hero! Setting connectionTimeout="20000" to the
>AJP connector has resolved my accumulating threads and connections
>problem.
>
>--patty
>
>On Sat, 23 Apr 2005, Mladen Turk wrote:
>
>  
>
>>Date: Sat, 23 Apr 2005 10:21:27 +0200
>>From: Mladen Turk <ml...@jboss.com>
>>Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>To: Tomcat Users List <to...@jakarta.apache.org>
>>Subject: Re: tomcat connectors
>>
>>Patty O'Reilly wrote:
>>    
>>
>>>Thanks very much for responding. I'm still stuggling with an ever
>>>growing number of connections to the apache server and an ever growing
>>>number of threads on my tomcat server. I'm fairly certain it is
>>>not the application. I have all three timeouts set but no joy.
>>>
>>>worker.ifa-prod.jweb1.cachesize=1
>>>worker.ifa-prod.jweb1.cache_timeout=600
>>>worker.ifa-prod.jweb1.socket_keepalive=1
>>>worker.ifa-prod.jweb1.socket_timeout=300
>>>worker.ifa-prod.jweb1.recycle_timeout=300
>>>
>>>      
>>>
>>You are probably using prefork mpm, so there is no way to
>>control the number of connections to Tomcat in any way, trough
>>mod_jk. You can limit it only by setting MaxClients in the httpd.conf
>>to the maximum number desired.
>>Because of pre-forking mechanism each child process will eventually
>>establish a single connection to Tomcat, thus the number of connections
>>will rise from StartServers to MaxClients.
>>
>>So there are two solutions for prefork.
>>1. Make maxThreads==MaxClients
>>2. Add connectionTimeout="20000" to AJP connector.
>>
>>The leter one will recycle inactive connections, but degrade
>>the performance.
>>
>>Regards,
>>Mladen.
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>    
>>
>>
>> ------------------------------------------------------------------------
>>
>> Subject:
>> Re: ThreadPool logFull -- BufferedInputStream
>> From:
>> "Patty O'Reilly" <or...@qualcomm.com>
>> Date:
>> Thu, 28 Apr 2005 11:22:18 -0700 (PDT)
>> To:
>> Tomcat Users List <to...@jakarta.apache.org>
>>
>> To:
>> Tomcat Users List <to...@jakarta.apache.org>
>>
>> Message-ID:
>> <Pi...@zelda.qualcomm.com>
>> MIME-Version:
>> 1.0
>> Content-Type:
>> TEXT/PLAIN; charset=US-ASCII
>>
>>
>>This problem was resolved (thanks to a suggestion from Mladen Turk)
>>by adding connectionTimeout="20000" to the AJP connector in the
>>server.xml file.
>>
>>--patty
>>
>>On Mon, 18 Apr 2005, Patty O'Reilly wrote:
>>
>>    
>>
>>>Date: Mon, 18 Apr 2005 13:53:24 -0700 (PDT)
>>>From: Patty O'Reilly <or...@qualcomm.com>
>>>Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>>To: Tomcat Users List <to...@jakarta.apache.org>
>>>Subject: ThreadPool logFull -- BufferedInputStream
>>>
>>>I haven't heard anything back so I thought I'd rephrase my question.
>>>
>>>I'm running tomcat-5.0.30 with apache 2.0.52 and j2sdk1.4.2_04 on
>>>Red Hat AS 3 update 2. I am seeing runaway thread creation where
>>>threads continue to accumulate until they are maxed out.
>>>
>>>After doing a thread dump, which I have very little experience
>>>reading, it appears that there may be a socket bug in either Java
>>>or RedHat, but I'm not sure.
>>>
>>>Most threads are locked on BufferedInputStream. This is what a typical
>>>thread looks like:
>>>
>>>"TP-Processor104" daemon prio=1 tid=0x080dc218 nid=0x4c87 runnable [ad1ff000..a$
>>>at java.net.SocketInputStream.socketRead0(Native Method)
>>>   at java.net.SocketInputStream.read(SocketInputStream.java:129)
>>>   at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
>>>   at java.io.BufferedInputStream.read1(BufferedInputStream.java:222)
>>>   at java.io.BufferedInputStream.read(BufferedInputStream.java:277)
>>>   - locked <0x339bd098> (a java.io.BufferedInputStream)
>>>   at org.apache.jk.common.ChannelSocket.read(ChannelSocket.java:598)
>>>   at org.apache.jk.common.ChannelSocket.receive(ChannelSocket.java:535)
>>>   at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:6$
>>>at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
>>>   at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.$
>>>at java.lang.Thread.run(Thread.java:534)
>>>
>>>The last thing called appears to be SocketInputStream.socketRead0
>>>(Native Method). The application is a simple jsp using taglibs.
>>>
>>>Can anyone shed some light on this. I'm brand new to Tomcat.
>>>
>>>Thanks
>>>
>>>--patty
>>>
>>>On Wed, 13 Apr 2005, Patty O'Reilly wrote:
>>>
>>>      
>>>
>>>>Date: Wed, 13 Apr 2005 16:13:40 -0700 (PDT)
>>>>From: Patty O'Reilly <or...@qualcomm.com>
>>>>Reply-To: Tomcat Users List <to...@jakarta.apache.org>
>>>>To: tomcat-user@jakarta.apache.org
>>>>Subject: ThreadPool logFull
>>>>
>>>>Hi,
>>>>
>>>>I'm running tomcat 5.0.30.
>>>>
>>>>After running for a week or so the server begins to slow down and
>>>>finally crashes because it is out of threads. I can see the java
>>>>processes accumulating day by day.
>>>>
>>>>Apr 8, 2005 3:11:16 PM org.apache.tomcat.util.threads.ThreadPool logFull
>>>>SEVERE: All threads (200) are currently busy, waiting. Increase maxThreads (200)
>>>>or check the servlet status
>>>>
>>>>I'm pretty new to tomcat. Not sure if the error is in my apache
>>>>server's workers.properties, or the tomcat servers server.xml, or....
>>>>
>>>>Can anyone point me in the right direction. This service is lightly
>>>>loaded. 200 threads should be plenty.
>>>>
>>>>--patty
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>>
>>>>        
>>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>>
>>>      
>>>

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