Re: I have a problem with Apache, Tomcat

2009-05-05 Thread André Warnier

Pid wrote:

nohacks wrote:
Apache has better Security and Load balancing for the tomcat cluster. 


I'm passing out hard hats & sandbags for anyone who wants one.

Do you also have some flame-retardant and anti-troll spells (or dwarfs) 
in your inventory ?


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: I have a problem with Apache, Tomcat

2009-05-05 Thread André Warnier

Caldarale, Charles R wrote:

From: nohacks [mailto:philipfwil...@gmail.com]
Subject: Re: I have a problem with Apache, Tomcat

I am not using Apache to server any Static content.


That begs the question: why do you have httpd in the game at all?


I knew you'd say that, I was about to do the same.
But I think that the answer is "balancer".

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Configuration in Eclipse

2009-05-05 Thread André Warnier

ados1...@gmail.com wrote:

It appears apparent that Tomcat is running as a service on my
Windows.


Right-click on the "My computer" icon and choose "Manage"
In the panel that appears, navigate to "services" (on the left side)
When you click on that, on the right side appears a list of services 
installed on your PC.

In that list, you should find "Apache Tomcat".
Right-click on that item, and in the pop-up menu, choose "stop".(*)
That should stop the service.
Now right-click on the item again, and choose "Properties".
One of those properties is "startup", which gives you a choice of 
"automatic", "Manual" or "disabled". Pick "Manual".

Now Tomcat will not start automatically anymore at each reboot.

If you want it to run later as a service, there are 2 ways :
- either follow the procedure above again, and instead of "stop" (at the 
place marked by *) choose "start".

- or, open a command window, and enter : net start "Apache Tomcat"

Another tip :
If you open a command window, and enter just "net start", you will get a 
list of running services, with their names according to Windows.
The name that appears as "Apache Tomcatxxx" is the name to use with 
these "net start" and "net stop" commands.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Using Multiple JVM instances

2009-05-05 Thread Caldarale, Charles R
> From: kareem_s_m [mailto:kareemud...@gmail.com]
> Subject: RE: Using Multiple JVM instances
> 
> But nothing is written to them

That's not what your screenshot shows: the jakarta_service_20090505.log file 
for JVM2 has a non-zero size.  What's in 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: j_security_check/j_username/j_password issue in Tomcat Version 6.0.18

2009-05-05 Thread Caldarale, Charles R
> From: Sanjay Manchiganti [mailto:ms4san...@yahoo.com]
> Subject: j_security_check/j_username/j_password issue in Tomcat Version
> 6.0.18
> 
> Did anything change in terms of j_securitycheck / container managed
> security between these two versions of tomcat?

What "two versions"?  The only one you mention is 6.0.18; I don't think much 
changed between 6.0.18 and 6.0.18.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: j_security_check/j_username/j_password issue in Tomcat Version 6.0.18

2009-05-05 Thread Sid Sidney
I looks like it has changed. I have the same problem getting parameters from 
this page that have been submitted via a post. However, I think that maybe the 
answer lies in the 
valve "org.apache.catalina.authenticator.FormAuthenticator"  

I'm sure that if you add the 



you will get to the values in the request. Of course enabling this valve won't 
cut if for production.

--- On Tue, 5/5/09, Sanjay Manchiganti  wrote:
From: Sanjay Manchiganti 
Subject: j_security_check/j_username/j_password issue in Tomcat Version 6.0.18
To: users@tomcat.apache.org
Date: Tuesday, May 5, 2009, 6:40 PM

Hello All,

I've deployed two apps(say A and B) into two instances of Tomcat running on
port 8080 and 8081.  They both have been enabled for form based
authentication.  

Step 1: When a user tries to access the application A he is shown a
userid/password page(Alogin.jsp) with all the j_xxx details.  

Step 2: On entering the details and clicking submit, I've configured the
action to take the details and post to the application B which is shown a
Blogin.jsp.  

Step 3: In Blogin.jsp, if I do a request.getParameter("j_username")
/ request.getParameter("j_password") , I'm getting the values
entered by the user in Step 2.  

Step 4: When I move the "same app" to 6.0.18 I'm getting null
values for request.getParameter("j_username") /
request.getParameter("j_password").  

Did anything change in terms of j_securitycheck / container managed security
between these two versions of tomcat?

Any input is highly appreciated.

Thanks,
Sanjay.


  


  

RE: Using Multiple JVM instances

2009-05-05 Thread kareem_s_m

And my Java is 1.5.07, Tomcat is 5.5.26 and machine is windows 2003 on 64
bit.

kareem_s_m wrote:
> 
> Thanks Chuck. When I start the first JVM service, the log files in the
> appropriate directory are created and data is written to stdout file (no
> errors though). When I start the second JVM service, the log files do get
> created in the appropriate directory (each JVM has its own directory for
> for log files). But nothing is written to them and the error that the
> 'Process terminated unexpectedly.
> http://www.nabble.com/file/p23397301/Multiple_JVM_Error.jpg  '
> 
> Caldarale, Charles R wrote:
>> 
>>> From: kareem_s_m [mailto:kareemud...@gmail.com]
>>> Subject: Using Multiple JVM instances
>> 
>>> But when I try to start both the services and make them
>>> run parallely, by going to windows services, I get an 
>>> error 'Error 1067: Process terminated unexpectedly'.
>>> 
>>> Why is it that I can run both the services parallely from 
>>> DOS prompt and cannot do the same from windows services?
>> 
>> I'm not able to reproduce your problem on my XP box.  Both of my Tomcat
>> 5.5.x services come up and run happily together.
>> 
>> You might want to clean out the logs directory of both your Tomcats, then
>> try starting both services, and see if there's something interesting
>> reported in the one that doesn't start properly.
>> 
>>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-Multiple-JVM-instances-tp23394165p23397749.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Using Multiple JVM instances

2009-05-05 Thread kareem_s_m

Thanks Chuck. When I start the first JVM service, the log files in the
appropriate directory are created and data is written to stdout file (no
errors though). When I start the second JVM service, the log files do get
created in the appropriate directory (each JVM has its own directory for for
log files). But nothing is written to them and the error that the 'Process
terminated unexpectedly.
http://www.nabble.com/file/p23397301/Multiple_JVM_Error.jpg  '

Caldarale, Charles R wrote:
> 
>> From: kareem_s_m [mailto:kareemud...@gmail.com]
>> Subject: Using Multiple JVM instances
> 
>> But when I try to start both the services and make them
>> run parallely, by going to windows services, I get an 
>> error 'Error 1067: Process terminated unexpectedly'.
>> 
>> Why is it that I can run both the services parallely from 
>> DOS prompt and cannot do the same from windows services?
> 
> I'm not able to reproduce your problem on my XP box.  Both of my Tomcat
> 5.5.x services come up and run happily together.
> 
> You might want to clean out the logs directory of both your Tomcats, then
> try starting both services, and see if there's something interesting
> reported in the one that doesn't start properly.
> 
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Using-Multiple-JVM-instances-tp23394165p23397301.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: IIS 6 Tomcat Connector isapi_redirect-1.2.28.dll not being called 404 2 1260 error

2009-05-05 Thread Leo Donahue - PLANDEVX
Just a thought.  By chance do you have another tomcat running on this server 
that would be listening on port 8009 or some other web server/container?  
Something installed via 3rd party maybe, like a disk management web app or the 
like?

I had this problem once, then realized that we had a 3rd party app using an 
embedded tomcat that was already listening on port 8009.  If that is your case, 
then you'll have to change "your tomcat" to listen on some other port than 8009.

Leo

-Original Message-
From: FOREBACK Dianne [mailto:dianne.foreb...@na.vallourec.com] 
Sent: Monday, May 04, 2009 2:09 PM
To: 'Tomcat Users List'
Subject: RE: IIS 6 Tomcat Connector isapi_redirect-1.2.28.dll not being called 
404 2 1260 error

I also deleted the registry keys for this setup, deleted the virtual directory, 
took off the web extensions, removed the filter and tried setting up again.  
Still no progress.

Thank you very much for the reply.  I have followed the instructions including 
step 9.  The IIS default website is not in the default IIS location.  Wondering 
if this causes a problem?

Thanks again,
Dianne


-Original Message-
From: Rainer Jung [mailto:rainer.j...@kippdata.de]
Sent: Sunday, May 03, 2009 6:22 PM
To: Tomcat Users List
Subject: Re: IIS 6 Tomcat Connector isapi_redirect-1.2.28.dll not being called 
404 2 1260 error

On 01.05.2009 22:46, FOREBACK Dianne wrote:
> I cannot get IIS 6 to use the Tomcat connector to redirect requests.
> I followed the directions in
> http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
> configuring the registry by hand.  This should be a relatively simple 
> task but I am obviously overlooking something.
>
> The following environment is being used, Tomcat 6.0, JDK 6.0.18, JRE 
> 1.6.0_13, Apache Tomcat Connectors  isapi_redirect-1.2.28.dll which I 
> downloaded and did not rebuild, IIS 6 on Windows Server 2003.
>
> I've triple checked the registry settings and can open every single 
> directory.  The isapi.log file is not being created.  (It appears that 
> the dll is not being called.)

Yes, as long as the log file is not created when you try to access a URL on the 
web server, the plugin is not loaded.

> The filter does show as being loaded (green) with high priority.
>
> IIS log file gives a 404 error.
>
> Tomcat is working fine.
>
> The uriworkermap.properties contains the following entries and I've 
> tried testing a .jsp example going through the IIS port.  It does pull 
> up when I use Tomcat directly.
>
> /localhost/examples/*=ajp13 /localhost/examples=ajp13
>
> The workers.properties file contains worker.ajp13.port=8009 
> worker.ajp13.host=localhost worker.ajp13.type=ajp13
>
> I've searched and am at a loss. Any help is very much appreciated.

Did you also follow all steps under "Configuring the ISAPI Redirector"
on the documentation page you used? Including step 9 (allowing the web service 
extension)?

Page "http://tomcat.apache.org/connectors-doc/reference/iis.html"; also contains 
a simplified way of setting the redirector properties without using the 
registry: put a file isapi_redirect.properties into the same directory, where 
your isapi_redirect.dll resides (the file name needs to be the same as that of 
the dll except for the suffix). The docs page describes its contents.

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org




This e-mail, and any files transmitted with it, may contain confidential and/or 
privileged material and is intended only for the person or entity to which it 
is addressed. If you are not the intended recipient, any review, 
retransmission, dissemination or other use of, or taking of any action in 
reliance upon, this information is prohibited. If you have received this email 
in error, please notify the sender immediately and delete this material from 
all known records.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: I have a problem with Apache, Tomcat

2009-05-05 Thread Pid
nohacks wrote:
> Apache has better Security and Load balancing for the tomcat cluster. 

I'm passing out hard hats & sandbags for anyone who wants one.

p


> Phil
> 
> 
> Caldarale, Charles R wrote:
>>> From: nohacks [mailto:philipfwil...@gmail.com]
>>> Subject: Re: I have a problem with Apache, Tomcat
>>>
>>> I am not using Apache to server any Static content.
>> That begs the question: why do you have httpd in the game at all?
>>
>>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>>
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



j_security_check/j_username/j_password issue in Tomcat Version 6.0.18

2009-05-05 Thread Sanjay Manchiganti
Hello All,

I've deployed two apps(say A and B) into two instances of Tomcat running on 
port 8080 and 8081.  They both have been enabled for form based 
authentication.  

Step 1: When a user tries to access the application A he is shown a 
userid/password page(Alogin.jsp) with all the j_xxx details.  

Step 2: On entering the details and clicking submit, I've configured the action 
to take the details and post to the application B which is shown a Blogin.jsp.  

Step 3: In Blogin.jsp, if I do a request.getParameter("j_username") / 
request.getParameter("j_password") , I'm getting the values entered by the user 
in Step 2.  

Step 4: When I move the "same app" to 6.0.18 I'm getting null values for 
request.getParameter("j_username") / request.getParameter("j_password").  

Did anything change in terms of j_securitycheck / container managed security 
between these two versions of tomcat?

Any input is highly appreciated.

Thanks,
Sanjay.


  

RE: I have a problem with Apache, Tomcat

2009-05-05 Thread Caldarale, Charles R
> From: nohacks [mailto:philipfwil...@gmail.com]
> Subject: RE: I have a problem with Apache, Tomcat
> 
> Apache has better Security and Load balancing for the tomcat cluster.

Security, no.  Load balancing, yes - if you can't afford a real one.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: I have a problem with Apache, Tomcat

2009-05-05 Thread nohacks

Apache has better Security and Load balancing for the tomcat cluster. 

Phil


Caldarale, Charles R wrote:
> 
>> From: nohacks [mailto:philipfwil...@gmail.com]
>> Subject: Re: I have a problem with Apache, Tomcat
>> 
>> I am not using Apache to server any Static content.
> 
> That begs the question: why do you have httpd in the game at all?
> 
>  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23396481.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Extra Threads in background

2009-05-05 Thread David.Meldrum
Well removing the extra  element from my server.xml fixed the 
problem and I now only have the one Background thread I intended.  You 
are right, less resources consumed.  I am not sure where I got the idea 
I needed:



 
 


Probably read it as an example in a book.

Christopher Schultz wrote:

Yup: you have two  elements pointing to the same deployment
directory. All of your webapps are being deployed one for each .
Thus, you get two of them. 



It is. If your thread has a "please die" boolean that it checks, you should 
simply set that and allow the thread to finish on its own.
  

This is what I do and it works fine now.  The thread dies very fast.

-d

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to eliminate stack traces from Tomcat responses?

2009-05-05 Thread B D
Christopher,
You're right! It took me some time to get error.jsp coexist properly with
the web service but there are no more Tomcat/Spring traces in error
responses.

Thank you very much!


On Tue, May 5, 2009 at 11:56 AM, Christopher Schultz <
ch...@christopherschultz.net> wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> B.D,
>
> On 5/4/2009 4:23 PM, B D wrote:
> > I run a Spring web service application under Tomcat 5.5.25 and need to
> > eliminate stack traces from all error responses.
> >
> > For Tomcat 3.2 you could add showDebugInfo="false" to server.conf but
> this
> > is not an option for 5.5.
> >
> > Defining  in web.xml to handle all exceptions
> > (java.lang.Throwable) does not help. I
> am
> > not sure if that's related to the fact that exception is thrown before
> > request object is fully created and any of my code is actually called.
>
> The request is fully created by the time Spring gets called, so you
> don't have to worry about anything weird like that.
>
> > From logs:
> > SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Throwable,
> > location=/error.jsp]
>
> I recommend fixing your error.jsp so that it doesn't throw its own
> exception: it looks like error.jsp itself is broken, to TC is
> falling-back on its own default error page.
>
> What do you get if you try to visit /error.jsp without an actual error
> occurring?
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.9 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkoAYaEACgkQ9CaO5/Lv0PAn4gCfa3r/fis2hKG3MAizhUEJj1Du
> S4wAn0WXmyIEdp+7FziGtYQoBQ8FWNys
> =iW4J
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


RE: Using Multiple JVM instances

2009-05-05 Thread Caldarale, Charles R
> From: kareem_s_m [mailto:kareemud...@gmail.com]
> Subject: Using Multiple JVM instances

> But when I try to start both the services and make them
> run parallely, by going to windows services, I get an 
> error 'Error 1067: Process terminated unexpectedly'.
> 
> Why is it that I can run both the services parallely from 
> DOS prompt and cannot do the same from windows services?

I'm not able to reproduce your problem on my XP box.  Both of my Tomcat 5.5.x 
services come up and run happily together.

You might want to clean out the logs directory of both your Tomcats, then try 
starting both services, and see if there's something interesting reported in 
the one that doesn't start properly.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Logging Request/Response Turn Around Time

2009-05-05 Thread joe.rice
Thanks!  That was exactly what I was looking for.

Joe

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: Tuesday, May 05, 2009 1:33 PM
To: Tomcat Users List
Subject: RE: Logging Request/Response Turn Around Time

> From: joe.r...@thomsonreuters.com [mailto:joe.r...@thomsonreuters.com]
> Subject: Logging Request/Response Turn Around Time
> 
> I'm interested in getting some very basic performance logging 
> around how long it takes between a request coming in and a 
> response going back out for each http request.

For the most basic info, enable the AccessLogValve in conf/server.xml.
For more detailed information, try this:
http://moskito.anotheria.net/

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: I have a problem with Apache, Tomcat

2009-05-05 Thread Caldarale, Charles R
> From: nohacks [mailto:philipfwil...@gmail.com]
> Subject: Re: I have a problem with Apache, Tomcat
> 
> I am not using Apache to server any Static content.

That begs the question: why do you have httpd in the game at all?

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Tomcat Configuration in Eclipse

2009-05-05 Thread Caldarale, Charles R
> From: ados1...@gmail.com [mailto:ados1...@gmail.com]
> Subject: Re: Tomcat Configuration in Eclipse
> 
> It appears apparent that Tomcat is running as a service on my
> Windows.

Not with javaw.exe; Tomcat as a service uses tomcat?.exe as the launcher 
executable.

> How can I try to stop Tomcat as a service and start manually ?

If it's really running as a service, use Control Panel -> Administrative Tools 
-> Services.

> My confusion is that even if I have not started Tomcat explicitly than
> also my ports are busy, after that if I change required port numbers
> in server.xml for tomcat and than try to start it than again I get
> same message saying that new port numbers are already in use and so
> tomcat cannot start and so what is way to come out of this deadlock
> kind of condition ?

The real problem appears to be with how you're using Eclipse, not Tomcat.  You 
may need help from Eclipse people to sort that out.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: I have a problem with Apache, Tomcat

2009-05-05 Thread nohacks

Hi Rainer,

Thanks very much for your responses. I have your answers below. 

1) Which component should respond to this request, Apache or Tomcat?

Tomcat should answer all. I am not using Apache to server any Static
content.

2)Which part of your webapps is expected to serve the content for

Tomcat

/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf

We are using JSF and JBoss Richfaces.

or there is some servlet, which should answer that request dynamically
and is not configured right, resp. the servlet producing the page which
contains this link produces garbage in the page.

I dont think it is garbage, but you never know right. hahah.

I see it returns a 200 here..

78.124.0.12 - - [04/May/2009:10:26:27 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
HTTP/1.1" 2001254 "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"


Thanks
Phil



Rainer Jung-3 wrote:
> 
> On 05.05.2009 16:12, nohacks wrote:
>> Hi Guys,
>> 
>> Thanks for your feedback with this issue. This has been making me crazy
>> for
>> such a long time.
>> 
>> I have put this in last night and tested. 
>> 
>>
>> JkMount /*.jsp loadbalancer
>> JkMount /*.jsf loadbalancer
>> JkMount /* loadbalancer
>> JkMount /servlet/* loadbalancer
>> 
>> JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
>> JkStripSession On
>> 
>> 
>> It does not work again. Strange it works for a while then when the
>> session
>> times out there seems to be an issue.
>> 
>> 78.124.0.12 - - [05/May/2009:09:43:51 -0400] "GET /login.jsf HTTP/1.1"
>> 200
>> 3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
>> 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR
>> 2.0.50727)"
>> 
>> == 404 here after a 200 
>> 
>> 78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
>> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
>> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
>> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR
>> 1.1.4322;
>> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 
> 1) Which component should respond to this request, Apache or Tomcat? I
> assume Tomcat. Does the right component answer the request? If you don't
> know, add an access log to Tomcat and check, whether the request hits
> Tomcat or not.
> 
> 2) Assuming yo want Tomcat to serve those and your configuration already
> does that right. The URL doesn't really look like a usual static
> content. Which part of your webapps is expected to serve the content for
> 
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf
> 
> If you can't answer that question, discuss with your developers. I
> expect, that this does not refer to static content (a file with the name
> eAF7sqpgb-jyGdIAFrMEaw__.jsf in a folder
> .../richfaces/renderkit/html/css/basic_classes.xcss/DATB/). More likely
> either this URL is totaly wrong and meant to address some static file like
> 
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss
> 
> or there is some servlet, which should answer that request dynamically
> and is not configured right, resp. the servlet producing the page which
> contains this link produces garbage in the page.
> 
> Regards,
> 
> Rainer
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/I-have-a-problem-with-Apache%2C-Tomcat-tp23322605p23395159.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat Configuration in Eclipse

2009-05-05 Thread ados1...@gmail.com
It appears apparent that Tomcat is running as a service on my
Windows.

How can I try to stop Tomcat as a service and start manually ?

I tried stopping Tomcat but still javaw.exe is running which is
somehow related to Tomcat. This has not happened one time but several
times...everytime I stop Tomcat Server and than again try to start
that Webserver it give me the same message that required ports are
busy.

My confusion is that even if I have not started Tomcat explicitly than
also my ports are busy, after that if I change required port numbers
in server.xml for tomcat and than try to start it than again I get
same message saying that new port numbers are already in use and so
tomcat cannot start and so what is way to come out of this deadlock
kind of condition ?

Thanks.

On Mon, May 4, 2009 at 11:40 PM, ados1...@gmail.com wrote:

> I have checked my Tomcat Server and it is not started yet and so it is
> confusing to see it working w/o starting it.
>
> -Ados
>
> On 5/4/09, Caldarale, Charles R  wrote:
> >> From: BRZEZINSKI, PAUL [mailto:paul.brzezin...@hp.com]
> >> Subject: RE: Tomcat Configuration in Eclipse
> >>
> >> The javaw.exe command is identical to java.exe, except that with
> >> javaw.exe there is no associated console window. This implies you can't
> >> get it to display the version with -version since there is no console
> >> to display it on. Use javaw.exe when you don't want a command prompt
> >> window to appear. The javaw.exe launcher will, however, display a
> >> dialog box with error information if a launch fails for some reason.
> >
> > What the OP really needs to know is that Eclipse uses javaw.exe to launch
> > Tomcat.  What he's looking at is an instance of Tomcat already running -
> as
> > André pointed out.
> >
> >  - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> > For additional commands, e-mail: users-h...@tomcat.apache.org
> >
> >
>
>
> --
> Hi,
>
> I am looking for Online Java/J2EE training here are my requirement
> from the course :  Core Java, Advanced Java, XML Programming, Java Web
> Program - JSP, Servlets, EJB, JMS, Hibernate, Java Web Services,
> Struts, Spring and JSF from the course.
>
> Kindly let me know about the course details and fee structure if you
> provide the training.
>
> Thanks,
> Apurva
>


Using Multiple JVM instances

2009-05-05 Thread kareem_s_m

Hi There,

I want to run 2 instances for my application on 2 separate JVMs on the same
machine. I have installed Java 1.5 and using Tomcat 5.5.26. Now in 

JVM1
-
(i) My Cataline_Home and Cataline_Base are =
E:\apps\thirdparty\apache5.5.26\JVM1
(ii) My JAVA_HOME = D:\JDk.

JVM1
-
(i) My Cataline_Home and Cataline_Base are =
E:\apps\thirdparty\apache5.5.26\JVM2
(ii) My JAVA_HOME = D:\JDk.

I have changed all the ports in both the server.xml. I can use the
startup.bat on each of the bin directories to start tomcat and I can access
the 2 different instances of the application at different port numbers at
the same time.

Now I install one service through the command 'service install JVM1' from
one bin and another service through the command 'service install JVM2' from
the other bin. This creates 2 new services in the machine called 'Apache
Tomcat JVM1' and 'Apache Tomcat JVM2'. I can start these services one at the
time and can access the application. But when I try to start both the
services and make them run parallely, by going to windows services, I get an
error 'Error 1067: Process terminated unexpectedly'.

Why is it that I can run both the services parallely from DOS prompt and
cannot do the same from windows services? How can I achieve this?

Any help is much appreciated.

Regards,
Kareem
-- 
View this message in context: 
http://www.nabble.com/Using-Multiple-JVM-instances-tp23394165p23394165.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: default log4j.xml for apps

2009-05-05 Thread bmelloni


Caldarale, Charles R wrote:
> 
> You didn't bother to tell us what version of Tomcat you're using, but for
> 6.0.x try putting the log4j.xml file in Tomcat's lib directory. 

Sorry, it is Tomcat 6.0.18, and I had log4j.xml present in the conf folder. 
Once I moved it to lib, it started getting used for the apps.

Thanks.
-- 
View this message in context: 
http://www.nabble.com/default-log4j.xml-for-apps-tp23391412p23393856.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: get Mod_jk precedence over mod_rewrite in Apache2

2009-05-05 Thread Rainer Jung
On 05.05.2009 16:13, André Warnier wrote:
> christophe.dumo...@ifma.fr wrote:
> ...
> Suggestion :
> instead of using the JkMount/JkUnMount way of configuring your forwarded
> URLs, use the way described here :
> http://tomcat.apache.org/connectors-doc/reference/apache.html
> in the section : Using SetHandler and Environment Variables
> 
> In other words, instead of
>   JkMount /myapp worker1
>   JkMount /myapp/* worker1
>   (JkUnMount /myapp/*.gif worker1)
> use
> 
> 
>   SetHandler jakarta-servlet
>   (SetEnvIf REQUEST_URI ^/myapp/.+\.gif no-jk)
>   ...
> 

If you want to use this recipe, be sure to use version 1.2.28 of mod_jk.
Version 1.2.27 had a problem with this type of confguration, when no
JkMount was used at all. Versions before 1.2.27 have a known security
related issue, so 1.2.28 is best.

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: get Mod_jk precedence over mod_rewrite in Apache2

2009-05-05 Thread Rainer Jung
On 05.05.2009 14:38, christophe.dumo...@ifma.fr wrote:
> Hello to the list,
> 
> Here is my context :
> My apache2 server must provide a default access (http://servername/*) to
> a default (Tomcat) webapps ROOT, so I configure mod_jk in apache2 like
> this :  JkMount / * /home/tomcat/webapps/ROOT, this works fine.

This line doesn't really make sense. So how do you configure it?

> BUT before I have to use mod_rewrite to redirect some old google'
> indexed URLs to other new static HTML content.

That's the problem with the root context. It grabs everything. If you
have a way to express how those old URLs look like, you can use
JkUnmount or André's trick to exclude those URLs from JK forwarding.

> My problem: mod_jk always redirect IN FIRST ANYWAY Any request to the
> ROOT Webapps (Tomcat jkmount /*).

It does not "redirect" (a redirect send a 30x response back to the
browser containing a new URL the browser should retrieve instead). It
does forward the request to Tomcat and sends back the Tomcat response to
the browser, which is completely transparent for the browser.

> Here is my issue : How to get Mod_jk precedence over mod_rewrite in
> Apache2 process ?
> 
> Any help would be appreciate ...!
> thanks,
> Christophe Dumonet.

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: StandardServer.await: Invalid command 'GET / HTTP/1.1' received

2009-05-05 Thread balachandra maddina
Hi Rainer,

 Thx a lot for the solution. yes, you are right, after changing the
admin port to 8005 in the config it worked fine.

Thank you,
bala.

On 5/5/09, Rainer Frey  wrote:
> On Tuesday 05 May 2009 12:01:24 balachandra maddina wrote:
>> Hi All,
>>   5 May, 2009 3:24:11 PM org.apache.catalina.core.StandardServer await
>>   WARNING: StandardServer.await: Invalid command 'GET / HTTP/1.1' received
>>
>> im using eclipse ganymede and the the server configuration is set to use
>> tomcat6 installation and both http/1.1 and admin port values are set to
>> 8080. not sure whats causing the issue. any help would be appreciated.
>
> Exactly that *is* the issue! The admin port is for receiving admin commands,
> and the HTTP port is for receiving HTTP requests. You must use different
> ports. What happened is: the HTTP connector could not start, because the
> server already opened that port. Your browser/client/whatever sent the
> request to the admin port , the server does not understand HTTP and logs
> this error.
>
>> Thank you,
>> bala.
>
> Rainer
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: I have a problem with Apache, Tomcat

2009-05-05 Thread Rainer Jung
On 05.05.2009 16:12, nohacks wrote:
> Hi Guys,
> 
> Thanks for your feedback with this issue. This has been making me crazy for
> such a long time.
> 
> I have put this in last night and tested. 
> 
>
> JkMount /*.jsp loadbalancer
> JkMount /*.jsf loadbalancer
> JkMount /* loadbalancer
> JkMount /servlet/* loadbalancer
> 
> JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
> JkStripSession On
> 
> 
> It does not work again. Strange it works for a while then when the session
> times out there seems to be an issue.
> 
> 78.124.0.12 - - [05/May/2009:09:43:51 -0400] "GET /login.jsf HTTP/1.1" 200
> 3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
> 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
> 
> == 404 here after a 200 
> 
> 78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

1) Which component should respond to this request, Apache or Tomcat? I
assume Tomcat. Does the right component answer the request? If you don't
know, add an access log to Tomcat and check, whether the request hits
Tomcat or not.

2) Assuming yo want Tomcat to serve those and your configuration already
does that right. The URL doesn't really look like a usual static
content. Which part of your webapps is expected to serve the content for

/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf

If you can't answer that question, discuss with your developers. I
expect, that this does not refer to static content (a file with the name
eAF7sqpgb-jyGdIAFrMEaw__.jsf in a folder
.../richfaces/renderkit/html/css/basic_classes.xcss/DATB/). More likely
either this URL is totaly wrong and meant to address some static file like

/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss

or there is some servlet, which should answer that request dynamically
and is not configured right, resp. the servlet producing the page which
contains this link produces garbage in the page.

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: Logging Request/Response Turn Around Time

2009-05-05 Thread Caldarale, Charles R
> From: joe.r...@thomsonreuters.com [mailto:joe.r...@thomsonreuters.com]
> Subject: Logging Request/Response Turn Around Time
> 
> I'm interested in getting some very basic performance logging 
> around how long it takes between a request coming in and a 
> response going back out for each http request.

For the most basic info, enable the AccessLogValve in conf/server.xml.  For 
more detailed information, try this:
http://moskito.anotheria.net/

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Logging Request/Response Turn Around Time

2009-05-05 Thread joe.rice
I've got a webapp running in Tomcat and I'm interested in getting some
very basic performance logging around how long it takes between a
request coming in and a response going back out for each http request.
Most of my internet searches have turned up JMeter or JMX type
approaches.  Is there an easier way to do this by just adding something
to web.xml or upping a logging parameter somewhere?

 

Thanks,


Joe Rice 

 



RE: default log4j.xml for apps

2009-05-05 Thread Caldarale, Charles R
> From: bmelloni [mailto:bruno.mell...@chickasaw.net]
> Subject: default log4j.xml for apps
> 
> But I have to have a central log4j.xml available with default logging
> configuration for all of the apps.  How can I do this in Tomcat?

You didn't bother to tell us what version of Tomcat you're using, but for 6.0.x 
try putting the log4j.xml file in Tomcat's lib directory.  For older versions, 
try shared/lib.

 - 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 unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: default log4j.xml for apps

2009-05-05 Thread Martin Gainty

start by configuring $CATALINA_HOME/lib/log4j.properties e.g.
log4j.rootLogger=debug, R 
log4j.appender.R=org.apache.log4j.RollingFileAppender 
log4j.appender.R.File=${catalina.home}/logs/tomcat.log 
log4j.appender.R.MaxFileSize=10MB 
log4j.appender.R.MaxBackupIndex=10 
log4j.appender.R.layout=org.apache.log4j.PatternLayout 
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n 
log4j.logger.org.apache.catalina=DEBUG, R
http://www.mbaworld.com/docs/logging.html

Martin 
__ 
Disclaimer and Confidentiality/Verzicht und Vertraulichkeitanmerkung/Note de 
déni et de confidentialité
This message is confidential. If you should not be the intended receiver, then 
we ask politely to report. Each unauthorized forwarding or manufacturing of a 
copy is inadmissible. This message serves only for the exchange of information 
and has no legal binding effect. Due to the easy manipulation of emails we 
cannot take responsibility over the the contents.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger 
sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung 
oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem 
Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. 
Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung 
fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le 
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez 
l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est 
interdite. Ce message sert à l'information seulement et n'aura pas n'importe 
quel effet légalement obligatoire. Étant donné que les email peuvent facilement 
être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité 
pour le contenu fourni.




> Date: Tue, 5 May 2009 09:44:36 -0700
> From: bruno.mell...@chickasaw.net
> To: users@tomcat.apache.org
> Subject: default log4j.xml for apps
> 
> 
> Although we use jBoss for our servers, I use Tomcat for development because
> of its much faster restart and better integration with Eclipse.  The
> applications reuse certain components heavily and thus rely on the presence
> of a central log4j.xml to control the logging level for those components
> (which in jBoss' case is jBoss' jboss-logj.xml).
> 
> And here comes my problem.  I don't particularly care if Tomcat logging
> continues using its current approach, since it is already fairly silent. 
> But I have to have a central log4j.xml available with default logging
> configuration for all of the apps.  How can I do this in Tomcat?
> -- 
> View this message in context: 
> http://www.nabble.com/default-log4j.xml-for-apps-tp23391412p23391412.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

_
Windows Live™: Keep your life in sync.
http://windowslive.com/explore?ocid=TXT_TAGLM_BR_life_in_synch_052009

Re: Memory Question

2009-05-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matt,

On 5/4/2009 11:29 PM, Matt Corban wrote:
> Where does Tomcat store the memory usage that it displays in the Server
> Status under the Manager console?  I was thinking about writing a shell
> script to keep track of the memory usage over time (such as the free memory,
> total memory and max memory) and store it in a file.

I just posted full code to do this the other day:

http://www.nabble.com/GC-Problem-td23296336.html#a23336209

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoAdZEACgkQ9CaO5/Lv0PAGowCfdM41Q0A4wNxbrtdmotQS4VO2
c+EAoLCEN47WB445QiEe6yWiduWlo4Fg
=fK3u
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



default log4j.xml for apps

2009-05-05 Thread bmelloni

Although we use jBoss for our servers, I use Tomcat for development because
of its much faster restart and better integration with Eclipse.  The
applications reuse certain components heavily and thus rely on the presence
of a central log4j.xml to control the logging level for those components
(which in jBoss' case is jBoss' jboss-logj.xml).

And here comes my problem.  I don't particularly care if Tomcat logging
continues using its current approach, since it is already fairly silent. 
But I have to have a central log4j.xml available with default logging
configuration for all of the apps.  How can I do this in Tomcat?
-- 
View this message in context: 
http://www.nabble.com/default-log4j.xml-for-apps-tp23391412p23391412.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to eliminate stack traces from Tomcat responses?

2009-05-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

B.D,

On 5/4/2009 4:23 PM, B D wrote:
> I run a Spring web service application under Tomcat 5.5.25 and need to
> eliminate stack traces from all error responses.
> 
> For Tomcat 3.2 you could add showDebugInfo="false" to server.conf but this
> is not an option for 5.5.
> 
> Defining  in web.xml to handle all exceptions
> (java.lang.Throwable) does not help. I am
> not sure if that's related to the fact that exception is thrown before
> request object is fully created and any of my code is actually called.

The request is fully created by the time Spring gets called, so you
don't have to worry about anything weird like that.

> From logs:
> SEVERE: Exception Processing ErrorPage[exceptionType=java.lang.Throwable,
> location=/error.jsp]

I recommend fixing your error.jsp so that it doesn't throw its own
exception: it looks like error.jsp itself is broken, to TC is
falling-back on its own default error page.

What do you get if you try to visit /error.jsp without an actual error
occurring?

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoAYaEACgkQ9CaO5/Lv0PAn4gCfa3r/fis2hKG3MAizhUEJj1Du
S4wAn0WXmyIEdp+7FziGtYQoBQ8FWNys
=iW4J
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Tomcat 6.0.18 on Win32 - Enabling Security Manager

2009-05-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Chris,

On 5/4/2009 7:31 PM, Chris Brookes wrote:
> Yeah the OWASP guide was pretty good, there was one there for Tomcat
> 5.5, that was part of the base for my guide along with a couple of
> other key resources The DISA Tomcat checklist titled "Web Checklist
> Tomcat Version 6 Release 1.5" at
> http://iase.disa.mil/stigs/checklist/ was also pretty good.

I didn't read that DISA stuff in too much detail but it seemed worthless
to me. 

> As far as enabling security manager is concerned, my guide does say
> that the rules in catalina.policy need to be assessed against the
> business requirements of the application and that the default
> catalina.policy provides limited protection which needs to be
> assessed on an application by application basis.

Actually, the default /allowances/ are exceedingly limited. Try turning
on the security manager and see how much of your stuff breaks.
Basically, nothing works if you just enable the security manager right
out of the box. That's a good thing: you should be extremely limited
unless you specifically make allowances for certain things.

I think you have your logic wrong on this one.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoAX/EACgkQ9CaO5/Lv0PAdRACcCQhhc686OUZT0R2PTROimcEi
iTAAnjxTAAC/MOrb1GBUJSRfrdhk6VP1
=kExn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: I have a problem with Apache, Tomcat

2009-05-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Phil,

On 5/5/2009 10:12 AM, nohacks wrote:
> I have put this in last night and tested. 
> 
>
> JkMount /*.jsp loadbalancer
> JkMount /*.jsf loadbalancer
> JkMount /* loadbalancer
> JkMount /servlet/* loadbalancer
> 
> JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
> JkStripSession On

This really should work. Are you sure this configuration is being used?
Since you have /a4j_3_2_2-SNAPSHOTorg/* mounted, you shouldn't be
getting these errors:

> 78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
> /a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
> HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
> (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
> Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

Can you confirm that Tomcat never receives this request? Use the
AccessLogValve to get a logfile similar to the httpd one and observe
them in tandem.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoAXnsACgkQ9CaO5/Lv0PBr7QCfSfZdbl30j9uQ+xsL79FjgHvR
f0gAnRcwPg78k69HBiIckk7jnZQDGIgh
=tW2S
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: Problem Accessing resource files in Tomcat 6.0.18

2009-05-05 Thread George Sexton

Are you using getResourceAsStream()? Do your paths start with / ?

Jacob Bergöö wrote:

Hi All,
I have a problem when I deploy my war file on Tomcat 6.0.18 that does not
occur when I deploy the same war file on my Jetty web server.

My war file contains a jar artifact that when Spring is initialized reads a
couple of js files and process them using Rhino on the server side. This
works fine when I develop it because I am using Jetty when I run it local on
my machine, but when I try to run it on our development server that runs a
Tomcat then It suddenly does not work.
In What way are Tomcat treating this resources differently than Jetty? What
do I need to do to fix this?

Thanks for any suggestions,

Jacob


--
George Sexton
MH Software, Inc.
Voice: +1 303 438 9585
URL:   http://www.mhsoftware.com/

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Problem Accessing resource files in Tomcat 6.0.18

2009-05-05 Thread Jacob Bergöö

Hi All,
I have a problem when I deploy my war file on Tomcat 6.0.18 that does not
occur when I deploy the same war file on my Jetty web server.

My war file contains a jar artifact that when Spring is initialized reads a
couple of js files and process them using Rhino on the server side. This
works fine when I develop it because I am using Jetty when I run it local on
my machine, but when I try to run it on our development server that runs a
Tomcat then It suddenly does not work.
In What way are Tomcat treating this resources differently than Jetty? What
do I need to do to fix this?

Thanks for any suggestions,

Jacob
-- 
View this message in context: 
http://www.nabble.com/Problem-Accessing-resource-files-in-Tomcat-6.0.18-tp23389326p23389326.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: get Mod_jk precedence over mod_rewrite in Apache2

2009-05-05 Thread André Warnier

christophe.dumo...@ifma.fr wrote:
...
Suggestion :
instead of using the JkMount/JkUnMount way of configuring your forwarded 
URLs, use the way described here :

http://tomcat.apache.org/connectors-doc/reference/apache.html
in the section : Using SetHandler and Environment Variables

In other words, instead of
  JkMount /myapp worker1
  JkMount /myapp/* worker1
  (JkUnMount /myapp/*.gif worker1)
use


  SetHandler jakarta-servlet
  (SetEnvIf REQUEST_URI ^/myapp/.+\.gif no-jk)
  ...


I find that it makes it much clearer what has precedence over what, 
because it fits better in the Apache general configuration logic.



Also, do not forget that in order for JkMount etc.. to be active in 
VirtualHosts (if you set them in the main part of the configuration), 
you have to use JkMountCopy in the VirtualHost.

Search for "JkMountCopy" on that same page.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: I have a problem with Apache, Tomcat

2009-05-05 Thread nohacks

Hi Guys,

Thanks for your feedback with this issue. This has been making me crazy for
such a long time.

I have put this in last night and tested. 

   
JkMount /*.jsp loadbalancer
JkMount /*.jsf loadbalancer
JkMount /* loadbalancer
JkMount /servlet/* loadbalancer

JkMount /a4j_3_2_2-SNAPSHOTorg/* loadbalancer
JkStripSession On


It does not work again. Strange it works for a while then when the session
times out there seems to be an issue.

78.124.0.12 - - [05/May/2009:09:43:51 -0400] "GET /login.jsf HTTP/1.1" 200
3370 "-" "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR
1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"

== 404 here after a 200 

78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/basic_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET
/a4j_3_2_2-SNAPSHOTorg/richfaces/renderkit/html/css/extended_classes.xcss/DATB/eAF7sqpgb-jyGdIAFrMEaw__.jsf;jsessionid=FFC14D3D01CF7F18460147292A996BF8.tomcat3
HTTP/1.1" 404 7014 "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET /css/stylesheet.css
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:52 -0400] "GET /js/jquery-1.2.3.pack.js
HTTP/1.1" 304 - "http://www.myAppName.com/login.jsf"; "Mozilla/4.0
(compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322;
Media Center PC 4.0; FDM; .NET CLR 2.0.50727)"
78.124.0.12 - - [05/May/2009:09:43:53 -0400] "GET
/js/jquery.jcarousel.pack.js HTTP/1.1" 304 -
"http://www.myAppName.com/login.jsf"; "Mozilla/4.0 (compatible; MSIE 7.0;
Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0;
FDM; .NET CLR 2.0.50727)"


I am going to try the 
RewriteRule /contextPath/(.*);jsessionid=[0-9A-Z]*(.*)
/path/to/webapps/contextPath/$1$2 [L] 

I will let you know how it goes. 

Fell free to add anything you might have thought of to this thread. All is
appreciated.

Thanks
Phil




Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> André,
> 
> On 5/4/2009 1:50 PM, André Warnier wrote:
>> I was not quite convinced by Chris's explanation, so I tested this by
>> myself.
> 
> [snip]
> 
>> So, despite my initial scepticism (for which I apologise), Chris turns
>> out to be right.
> 
> Sometimes it's goog to convince yourself of something, rather than
> accepting it as fact. That's always a good advice with statements made
> on this list (and on the Internet in general). No offense taken.
> 
>> I don't think that mod_jk, even with the "JkStripSession" parameter on,
>> will scan each page returned by Tomcat, and /in the content/ change
>> these links to remove the ";jsessionid=..." part.
> 
> It does not have to. The links are only a problem when the web server
> attempts to service them. If the ";jsessionid=..." is stripped-away
> before the files are located, then everything is okay.
> 
>> So the questions would be :
>> 1) /why/ does the page returned by Tomcat contain the embedded  
>> tags with a ";jsessionid=" URI ?
>> What puts that jession-id there ?
> 
> All URLs should be run through HttpServletResponse.encodeURL, which adds
> the ";jsessionid=..." if the container isn't sure that the client
> supports cookies. This allows sessions to be used even if cookies are
> unavailable. It's also required by the Servlet Spec.
> 
>> OR
>> 2) what makes it so that when Tomcat returns that page, Apache+mod_jk
>> think that this css URI does /not/ have to be forwarded to Tomcat ?
> 
> The OP never set *.css to be served by Tomcat. Had this been the case,
> everything would have been okay, since Tomcat knows how to use the
> ";jsessionid=..." parameter (and also knows how to ignore it properly,
> thank you very much httpd!).
> 
>> There must be, at the Apache level, a rogue JkUnMount or SetEnvIf no_jk
>> rule that interferes there, in the sense of not being quite smart enough
>> to know that this link /should/ be forwarded to Tomcat.
>> 
>> And if it should /not/ be forwarded to Tomcat after all, then you should
>> use a smart RewriteRule that will strip the ";jsessionid.." from these
>> URI's, before Apache attempts to find them locally.
> 
> FWIW that rule is this:
> 
> RewriteRule /contextPath/(.*);jsessionid=[0-9A-Z]*(.*)
> /path/to/webapps/contextPath/$1$2 [L]
> 
> (I've been around this par

Re: context setting problem

2009-05-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Tohid,

On 4/18/2009 2:46 AM, tohid noroozi wrote:
> i use context tag in server.xml like this :
>autoDeploy="true"   xmlValidation="false" xmlNamespaceAware="false">
> 
> 
>   www.tnr.com
>   
> 
> what i want is set [Tomcat 6.0/webaps/root] as physical address of site and
> [Tomcat 6.0/portal] to use when url is [localhost/outsie] .
> my problem is jsp files in Tomcat 6.0/portal has different application
> context and i cant use it ass part of localhost site with same context .
> i wouldnt like to put this folder  inside webapps/ROOT direcotry and i want
> put this directory out side  .

I think what you want is this:


   


   


Since it's not recommended to put  elements into your
server.xml, you probably want to define just the  elements and
either use different docBase attributes, or create
conf/Catalina/localhost/ROOT.xml and conf/Catalina/www.tnr.com/ROOT.xml
files instead.

> some attribute such as  crossContext="true"  privileged="true"
> allowLinking="true" has not any effect for me.

These attributes have nothing to do with the host or the context path,
so setting them arbitrarily will not help you.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoAPYoACgkQ9CaO5/Lv0PDIqACeLNZTj2K/RsDHz3j//iNo3lul
FOUAoJL26fyjrWQkH48xkKbn4H5dx1DK
=FfR1
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to make request parameters available to a login.jsp?

2009-05-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sid,

On 5/4/2009 5:45 PM, Sid Sidney wrote:
> Our application serves many different clients. Every page in our application 
> (including the login.jsp and errorLogin.jsp) is configured to look like our 
> clients predetermined look and feel.   We use this property to distinguish 
> which look and feel to display.

Could this be done with a URL path change instead of request parameters?
I realize that this means a big change to the way you are doing things,
but presumably you have a centralized "modify URL to encode LAF" and
"read LAF from URL" methods, so you could just change those to use paths
instead of parameters. Just a thought.

I've never seen private labeling done using request parameters before.

You can feel free to log a bug against TC 6. I'm just not sure how much
interest you'll get. You never know :)

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoAOvoACgkQ9CaO5/Lv0PDhFACbBv+dNvtYWI050CsYyAcKgqKJ
1+wAoJ2X1lZxUhCXpwZtG44GJzSSpfEz
=ZtBn
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: How to make request parameters available to a login.jsp?

2009-05-05 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sid,

On 5/4/2009 10:20 PM, Sid Sidney wrote:
> One thing I've just found out is that if I enable the   
> RequestDumperValue
> The post data becomes available to the login.jsp. 
> 
>  

That's an interesting hack: the RequestDumperValve works by
siphoning-off the POST data and /also/ storing those parameters into the
request such that request.getParameter() and friends all work properly.
Since the valve operates /before/ the security valve, you get the added
benefit of your parameters working in the login page.

> I'm going to have to look more at this.

Check to see how the RequestDumperValve populated the request's
parameter map. Maybe that would help you (or a TC dev) create a patch
for this issue.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkoAO40ACgkQ9CaO5/Lv0PBswwCfcW8aZsXlesvDWvNtuamEfzBZ
hDQAoLW2+X7bFDi3ETIW/dPnQWso/EdG
=JQIR
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



get Mod_jk precedence over mod_rewrite in Apache2

2009-05-05 Thread Christophe . Dumonet

Hello to the list,

Here is my context :
My apache2 server must provide a default access (http://servername/*)  
to a default (Tomcat) webapps ROOT, so I configure mod_jk in apache2  
like this :  JkMount / * /home/tomcat/webapps/ROOT, this works fine.


BUT before I have to use mod_rewrite to redirect some old google'  
indexed URLs to other new static HTML content.
My problem: mod_jk always redirect IN FIRST ANYWAY Any request to the  
ROOT Webapps (Tomcat jkmount /*).


Here is my issue : How to get Mod_jk precedence over mod_rewrite in  
Apache2 process ?


Any help would be appreciate ...!
thanks,
Christophe Dumonet.



This message was sent using IMP, the Internet Messaging Program.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: StandardServer.await: Invalid command 'GET / HTTP/1.1' received

2009-05-05 Thread Pid
balachandra maddina wrote:
> Hi All,
> 
>   When i tried to configure the tomcat6 with eclipse im getting following
> error
> 
>   5 May, 2009 3:24:11 PM org.apache.catalina.core.StandardServer await
>   WARNING: StandardServer.await: Invalid command 'GET / HTTP/1.1' received
> 
> im using eclipse ganymede and the the server configuration is set to use
> tomcat6 installation and both http/1.1 and admin port values are set to
> 8080. not sure whats causing the issue. any help would be appreciated.

Umm, well that right there, would be the issue.

Why would you set the HTTP and shutdown port to be the same one?
Leave the shutdown port on 8005 or another similar (but free) port.

p


> Thank you,
> bala.
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: StandardServer.await: Invalid command 'GET / HTTP/1.1' received

2009-05-05 Thread Rainer Frey
On Tuesday 05 May 2009 12:01:24 balachandra maddina wrote:
> Hi All,
>   5 May, 2009 3:24:11 PM org.apache.catalina.core.StandardServer await
>   WARNING: StandardServer.await: Invalid command 'GET / HTTP/1.1' received
>
> im using eclipse ganymede and the the server configuration is set to use
> tomcat6 installation and both http/1.1 and admin port values are set to
> 8080. not sure whats causing the issue. any help would be appreciated.

Exactly that *is* the issue! The admin port is for receiving admin commands, 
and the HTTP port is for receiving HTTP requests. You must use different 
ports. What happened is: the HTTP connector could not start, because the 
server already opened that port. Your browser/client/whatever sent the 
request to the admin port , the server does not understand HTTP and logs  
this error.

> Thank you,
> bala.

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



StandardServer.await: Invalid command 'GET / HTTP/1.1' received

2009-05-05 Thread balachandra maddina
Hi All,

  When i tried to configure the tomcat6 with eclipse im getting following
error

  5 May, 2009 3:24:11 PM org.apache.catalina.core.StandardServer await
  WARNING: StandardServer.await: Invalid command 'GET / HTTP/1.1' received

im using eclipse ganymede and the the server configuration is set to use
tomcat6 installation and both http/1.1 and admin port values are set to
8080. not sure whats causing the issue. any help would be appreciated.

Thank you,
bala.


Re: How to make request parameters available to a login.jsp?

2009-05-05 Thread André Warnier

Sid Sidney wrote:

One thing I've just found out is that if I enable the   
RequestDumperValue
The post data becomes available to the login.jsp. 


 

I'm going to have to look more at this.

But that one's kind of "expensive".



Again I'm not the Tomcat expert here.
But it seems to me that if you are going to go that path, and use 
something that is not "officially" in either Tomcat or in the Servlet 
Spec, you run the risk of it stopping from working at some undeterminate 
moment/version in the future.
Maybe you would do better rethinking your logic a bit, and see if there 
is not an easier way to determine who the client is, rather than by 
digging out the previous request data (of which there might not be any).
You could for example pick up the IP of the customer and determine that 
way who he is, before even sending the login page.  That could probably 
be done with a servlet filter.

How many different "customers" are we talking about ?

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org