Re: All threads (200) are currently busy

2008-11-02 Thread Juha Laiho
AD wrote:
 On Sat, Nov 1, 2008 at 5:25 PM, Caldarale, Charles R 
 [EMAIL PROTECTED] wrote:
 
 From: AD [mailto:[EMAIL PROTECTED]
 Subject: Re: All threads (200) are currently busy

 ah sorry, proxied through apache with mod_proxy_balancer on ajp port
 Can you try your load test directly into Tomcat on port 8080 and eliminate
 one variable?  If that test runs satisfactorily, you'll need to check into
 your front-end configuration.

 I did try connecting directly to 8080 on a few of the tomcat serviers in the
 cluster but the requests were just hanging.  I can run the load test again
 though with apache out of the mix and see what happens.

What kind of situation did you have when you took the thread dump in
the original request? Could you take a thread dump at a such point in
time where you are actually waiting for a request to complete? That
way, at least one of the threads would have to be somewhere in the
slow section.
-- 
..Juha

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can HttpServletRequest.forward() work across different tomcat instances?

2008-11-02 Thread Sriram Kuna
Hello,

We have many Tomcat instances, each running on a different machine (they are
controlled by a load balancer). In this case, can a tomcat instance do
HttpServlet.forward() to some other tomcat instance? Please clarify.

Regards
Sriram
chandrayaanhttp://excusemeworld.com/social/chandrayaan-1-facts-behind-indias-moon-mission


Re: Can HttpServletRequest.forward() work across different tomcat instances?

2008-11-02 Thread Sriram Narayanan
On Sun, Nov 2, 2008 at 2:41 PM, Sriram Kuna [EMAIL PROTECTED] wrote:
 Hello,

 We have many Tomcat instances, each running on a different machine (they are
 controlled by a load balancer). In this case, can a tomcat instance do
 HttpServlet.forward() to some other tomcat instance? Please clarify.


A request cannot be forwarded in this manner. A request is forwarded
only to another Servlet/JSP on the same web app context. This is
within the web app instance on that specific Tomcat instance.

 Regards
 Sriram
 chandrayaanhttp://excusemeworld.com/social/chandrayaan-1-facts-behind-indias-moon-mission


-- Sriram

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Iterations in JSF using JSTL via forEach

2008-11-02 Thread Nikola Milutinovic
JSTL is not a part of TC. Use Maven2 to assemble your application so it 
includes the desired version of JSTL. Or Ant.

Nix.





From: Alexander Hartner [EMAIL PROTECTED]
To: users@tomcat.apache.org
Sent: Friday, October 17, 2008 3:14:45 PM
Subject: Re: Iterations in JSF using JSTL via forEach

I figured out what the problem was. I was using JSTL 1.1 rather then 1.2.
I found a version of this here :
https://maven-repository.dev.java.net/repository/jstl/jars/

I am wondering if there are any plans to include this release with Tomcat
6, or make it easier accessible.

May this is already being done, just haven't found it.

Thanks
Alex

 I am sure this is a very silly problem, however I have been struggling
 with this for a while now. I am trying to iterate over a collection using
 JSF and JSTL's forEach which is apparently supported in JSP2.1 (2.0) and
 Tomcat 6.

 I have the version number in web.xml set to 2.5 and the faces-config.xml
 file set to 1.2 (see below).

 I checked the version of JARS included in the WAR file and they are :

 standard.jar : Implementation-Version: 1.1.2
 jstl.jar : Implementation-Version: 1.1.2
 jsf-impl.jar : Implementation-Version: 1.2_04-b20-p03
 jsf-api.jar : Implementation-Version: 1.2_04-b20-p03

 Below are the configuration files included with my WAR. I am using Tomcat
 apache-tomcat-6.0.16. I have found some older examples where I got this
 working, however I can't see why it doesn't work for me anymore.

 Any suggestions on this would really help me out a lot.

 Thanks in advance.
 Alex

 web.xml
 ===
 ?xml version=1.0 encoding=UTF-8?
 web-app version=2.5 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd;
 ...


 faces-config.xml
 
 ?xml version='1.0' encoding='UTF-8'?
 faces-config version=1.2
 xmlns=http://java.sun.com/xml/ns/javaee;
 xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
 xsi:schemaLocation=http://java.sun.com/xml/ns/javaee
 http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd;
 managed-bean
 managed-bean-nameController/managed-bean-name
 managed-bean-classcom.simple.Controller/managed-bean-class
 managed-bean-scoperequest/managed-bean-scope
 /managed-bean
 /faces-config

 jsp file
 
 [EMAIL PROTECTED] contentType=text/html%
 [EMAIL PROTECTED] pageEncoding=UTF-8%
 [EMAIL PROTECTED] prefix=c uri=http://java.sun.com/jsp/jstl/core%
 [EMAIL PROTECTED] prefix=f uri=http://java.sun.com/jsf/core%
 [EMAIL PROTECTED] prefix=h uri=http://java.sun.com/jsf/html%
 !DOCTYPE HTML PUBLIC -//W3C//DTD HTML 4.01 Transitional//EN
 http://www.w3.org/TR/html4/loose.dtd;
 html
   head
 meta http-equiv=Content-Type content=text/html; charset=UTF-8
 titleJSP Page/title
   /head
   body
 f:view
   h1Hallo : h:outputText value=#{Controller.message}//h1
   h1h:outputText value=JavaServer Faces //h1
   c:forEach var=item items=#{Controller.messages}
 h1Hallo/h1
 h:outputText id=value value=#{item}/
   /c:forEach
 /f:view
   /body
 /html


 jspx file
 =
 ?xml version=1.0 encoding=UTF-8?
 jsp:root xmlns:jsp=http://java.sun.com/JSP/Page;
   xmlns:h=http://java.sun.com/jsf/html;
   xmlns:f=http://java.sun.com/jsf/core;
   xmlns:c=http://java.sun.com/jsp/jstl/core;
   xmlns=http://www.w3.org/1999/xhtml;
   version=2.1
   jsp:directive.page contentType=text/html/
   jsp:output doctype-root-element=html
   doctype-public=-//W3C//DTD XHTML 1.0 Transitional//EN
   
 doctype-system=http://www.w3c.org/TR/xhtml1/DTD/xhtml1-transitional.dtd/

 jsp:directive.page contentType=text/html pageEncoding=UTF-8/

 !-- any content can be specified here, e.g.: --
 jsp:element name=text
 jsp:attribute name=langEN/jsp:attribute
 jsp:bodyHello World!/jsp:body
 /jsp:element
   f:view
 h1Hallo 2 : h:outputText value=#{Controller.message}//h1
 h1h:outputText value=JavaServer Faces //h1
 c:forEach var=item items=#{Controller.messages}
   h1Hallo/h1
   h:outputText id=value value=#{item}/
 /c:forEach
   /f:view
 /jsp:root


 Controller.java
 ===
 package com.simple;
 import java.util.ArrayList;
 import java.util.List;
 public class Controller
 {
   private ArrayListString stuff = new ArrayListString();
   public Controller()
   {
 System.out.println(Creating Controller);
 stuff.add(A1);
 stuff.add(A2);
 stuff.add(A3);
 stuff.add(A4);
 stuff.add(A5);
   }
   public String getMessage()
   {
 return This is a message;
   }
   public ArrayListString getMessages()
   {
 System.out.println(Getting Stuff);
 return stuff;
   }
   public void setMessage(ArrayListString stuff)
   {
 System.out.println(Setting Stuff);
 this.stuff = stuff;
  

Re: All threads (200) are currently busy

2008-11-02 Thread Bob Hall
--- On Sun, 11/2/08 at 1:23 AM, Juha Laiho [EMAIL PROTECTED] wrote:
 
 What kind of situation did you have when you took the
 thread dump in
 the original request? Could you take a thread dump at a
 such point in
 time where you are actually waiting for a request to
 complete? That
 way, at least one of the threads would have to be somewhere
 in the
 slow section.

AD, you could add a filter that would log request/response handling
for all requests and include the thread Id and request parms info.
The log would be processed to identify requests w/o a response and
requests that took a long time to handle.

-Bob


  

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Set application default

2008-11-02 Thread WILLIAMer

Hi all!
I wanna make my application as default(ROOT).
My application name is Com under the webapps  directory.
The application url is http://MyDomain/Com .
I want to change the url to http://MyDomain/ .

I add Context path= docBase=Com reloadable=true crossContext=true
debug=0/
in server.xml.
Restart tomcat and it work.
Now this application is under Solaris machine.

Then i try the same method add one line in server.xml and restart tomcat.
But it not work.
Now this application is under Windows server 2003.

My tomcat version is 5.5.20.
The tomcat in Solaris and windows server 2003 is the same version.
Why it work with Solaris operating system but windows fail?

I dont wanna change my application name to ROOT for this purpose.

-- 
View this message in context: 
http://www.nabble.com/Set-application-default-tp20296568p20296568.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Set application default

2008-11-02 Thread Caldarale, Charles R
 From: WILLIAMer [mailto:[EMAIL PROTECTED]
 Subject: Set application default

 I add Context path= docBase=Com reloadable=true
 crossContext=true debug=0/ in server.xml.

You really shouldn't do that - it's truly the lazy way out (i.e., one that will 
cost you more time and energy later).

 I dont wanna change my application name to ROOT for this purpose.

Do you have any justification for not changing the name, which really is the 
right thing to do?

Don't wanna is a child's excuse...

If you absolutely insist on not changing the name of your app's directory (or 
.war file), then place it somewhere other than under your Host appBase 
directory (webapps, in your case), and create a conf/Catalina/[host]/ROOT.xml 
file containing this Context element:

Context docBase=[location/of/default/app] reloadable=true 
crossContext=true debug=0/

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.

-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: JSP recompiles on every access - Tags in jar

2008-11-02 Thread Ron McNulty
Hi Mark

A preliminary attempt failed - there are obviously considerable changes 
between 5.5.23 and the head code in this area. Also, Cedric's patch embedded 
absolute file paths in the generated _jsp.java file, which sounds less than 
optimal. All other file paths appear to be context relative.

I will spend some more time chasing this issue, and update the bug report as 
suggested if I get anywhere..

Regards

Ron

Mark Thomas [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
 Ron McNulty wrote:
 Hi Mark

 Thanks - that appears to be exactly the problem. I searched the bug
 database, but did not find that one.

 I will have a go at applying Cedric Mailleux's patch to our Tomcat
 5.5.23 source and deploying the patch to Jetspeed. It will certainly be
 easier than getting permission to modify the code I am expected to
 maintain :)

 Glad that was the issue. It would be really helpful if you could update
 the bug report with the results of your testing with the patch. It is
 always good to know if it has worked or failed for someone else.

 Kind regards,

 Mark


 BTW, unpacking the jar was an option (and fixed the fault), but was a
 little clumsy.

 Regards

 Ron

 - Original Message - From: Mark Thomas [EMAIL PROTECTED]
 Newsgroups: gmane.comp.jakarta.tomcat.user
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Saturday, November 01, 2008 4:41 PM
 Subject: Re: JSP recompiles on every access - Tags in jar


 Ron McNulty wrote:
 Hi Chuck

 File times are all OK - Tomcat is running on the same machine. I should
 have mentioned I have seen this on Windows 2000 and XP SP3. I have not
 tried it on a Unix variant.

 Maybe related to
 https://issues.apache.org/bugzilla/show_bug.cgi?id=46047 ?

 Try unpacking the jar and seeing if that fixes it.

 Mark


 Eclipse project is attached - see readme.txt in the top-level 
 directory.

 I hope the mailing list accepts attachments...

 Regards

 Ron

 - Original Message - From: Caldarale, Charles R
 [EMAIL PROTECTED]
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Saturday, November 01, 2008 4:20 PM
 Subject: RE: JSP recompiles on every access - Tags in jar


 From: Ron McNulty [mailto:[EMAIL PROTECTED]
 Subject: JSP recompiles on every access - Tags in jar

 To my consternation, performance was terrible, and
 it turned out all JSPs (and their embedded custom
 tags) were being recompiled on every page access.

 Check that the timestamps on the files involved are not set in the
 future relative to the system Tomcat is running on.

 I have a small Eclipse project that reproduces the problem.

 If the timestamps are not out of whack, can you post the source to let
 others try it?

 - Chuck


 THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE 
 PROPRIETARY
 MATERIAL and is thus for use only by the intended recipient. If you
 received this in error, please contact the sender and delete the e-mail
 and its attachments from all computers.

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


 

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]



 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]

 




-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]