Re: Web app calls JMS over SSL - certificates

2012-02-06 Thread Pid *
On 6 Feb 2012, at 23:10, Peter Kleczka  wrote:

> Hello
>
> I have a web app on Tomcat 6.0.24. The app needs to call a JMS app on
> another server over SSL. I installed the keystore/truststore files in
> $CatalinaHome/conf/certs and set VM arguments so that the JVM knows where
> to find the certs. The server administrator says that I should encapsulate
> these certs within the WAR file and that we should not have to set the VM
> arguments.
>
> The documentation that I have read so far seems to only discuss how to set
> up SSL on Tomcat.
>
> Is there a way that Tomcat or my web app can automatically load the certs
> without setting VM arguments?

How are you configuring JMS now?

Which JMS provider/lib are you using?


p



>
> Thanks kindly in advance.

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



RE: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Lev A KARATUN
Charles,

I made the adjustments and it works now.

Thank you!

Best Regards, 
Karatun Lev,


"Caldarale, Charles R"  wrote on 06.02.2012 
18:41:18:

> "Caldarale, Charles R"  
> 06.02.2012 18:42
> 
> Please respond to
> "Tomcat Users List" 
> 
> To
> 
> Tomcat Users List 
> 
> cc
> 
> Subject
> 
> RE: How can I access tomcat's logs using my jsp?
> 
> > From: Lev A KARATUN [mailto:lev.kara...@raiffeisen.ru] 
> > Subject: RE: How can I access tomcat's logs using my jsp?
> 
> > when I'm copypasting the default servlet block to 
> > $CATALINA_BASE/logs/WEB-INF/web.xml, the application
> > no longer works.
> 
> There's an additional step required for Tomcat 6 that's not 
> necessary for Tomcat 7.  So either upgrade, or do the following:
> 
> Change the name of the DefaultServlet in logs/WEB-INF/web.xml to 
> logsdefault (or some other unique label):
> 
> logsdefault
> 
> and add a  for it:
> 
> 
> logsdefault
> /
> 
> 
> Tomcat 6 does not allow you to override the  settings 
> in the global conf/web.xml, but Tomcat 7 does.
> 
> > And one more question - if myapp's docBase is set to 
$CATALINA_BASE/logs , 
> > does it matter what is in the webapps/myapp folder?
> 
> Assuming the "myapp" you're referring to is the one for accessing 
> Tomcat's logs, you should not risk problems by also having a 
> webapps/myapp.  It shouldn't hurt, but...
> 
> And, as usual, ignore Martin G's irrelevant ramblings.
> 
>  - 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
> 



---
This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient any 
use, distribution, copying or disclosure is strictly prohibited. If you have 
received this message in error, please notify the sender immediately either by 
telephone or by e-mail and delete this message and any attachment from your 
system. Correspondence via e-mail is for information purposes only. ZAO 
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail 
unless otherwise agreed. 
---

Re: POST data (single character) cleared when using tomcat 6.0.33 and Character Encoding Filter

2012-02-06 Thread kitagawa
> FYI: The same issue reported against 5.5.35:
> https://issues.apache.org/bugzilla/show_bug.cgi?id=52579
>
> Thank you for your research. I think you are right. Though I am not
> sure how much this can be fixed in Tomcat now.

Thank you for your responses.

We were able to find the reason for the problem.
It would be great if the bug can be patched from the Tomcat side, but
until that time I will try something to solve the problem.

Thank you for your help,
--
Naoki Kitagawa

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



Re: Odd interface binding observations

2012-02-06 Thread Konstantin Kolinko
2012/2/6 Christopher Schultz :
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> All,
>
> During a recent production deployment (Debian Linux), we added a
> localhost-only connector like this:
>
>                   protocol="org.apache.coyote.http11.Http11NioProtocol"
>               address="127.0.0.1" secure="true"
>               URIEncoding="UTF-8" executor="tomcatThreadPool" />
>
> (We use secure="true" because we have security-constraints that
> require it, but we want to avoid the cost of SSL setup when
> communicating locally).
>
> /etc/hosts contains this:
>
> 127.0.0.1       localhost
>
> # The following lines are desirable for IPv6 capable hosts
> ::1     ip6-localhost ip6-loopback
> fe00::0 ip6-localnet
> ff00::0 ip6-mcastprefix
> ff02::1 ip6-allnodes
> ff02::2 ip6-allrouters
> ff02::3 ip6-allhosts
>  end of /etc/hosts =
>
> When I use netstat to show me what's bound to what, I see this:
>
> $ netstat -plan | grep 8187
> tcp6       0      0 :::127.0.0.1:8187   :::*

The above is ipv6 representation of an ip4 address.
BTW, maybe you can try with address="::1" in your ?

> LISTEN     2737/java
>
> Also:
>
> $ host localhost
> localhost.chadis.com    A       [my public ip]
>

I suspect that
1. Something adds "domain suffix", thus the name becomes "localhost.chadis.com"
2. DNS server is asked about "localhost.chadis.com" and finds wildcard
record for "*..chadis.com". The IP in that wildcard record in your
public IP.

The host command always performs a DNS query, ignoring the /etc/hosts
file.  (An evidence:  use -v (verbose) flag).

Try "ping localhost". It prints the IP where it connects to.

> I'm using "localhost:8187" as my host:port in my connection URL and
> everything seems to work. Do I just not know how to read netstat's
> output (I don't know much about the way Linux does IPv6)?
>
> Anyone have any idea why 'host' returns my public IP for 'localhost'?
> Or, when I use "localhost:8187" (which probably resolves to my public
> IP), I can establish a connection?
>

Best regards,
Konstantin Kolinko

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



Re: Clustering and https configuration

2012-02-06 Thread Pid
On 06/02/2012 18:29, Christopher Schultz wrote:
> Riccardo,
> 
> On 2/6/12 8:10 AM, Riccardo Venittelli wrote:
>> Now my test web app work fine but i'm unable to find a
>> configuration for SingleSignOn in cluster.
> 
> Are you trying to set up a Cluster to communicate over SSL? I don't
> believe  supports that. I have two recommendations (having
> never done anything like this):

Or is he asking for a ClusterSingleSignOn?


p

> * stunnel (requires that you know in advance which ports will be used)
> 
> That's probably either non-ideal or not actually possible due to the
> multicast nature of the  capabilities.
> 
> * Use a secure VPN with multicast enabled on that interface
> 
> -chris
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Dependencies on extensions functionality

2012-02-06 Thread Violeta Georgieva
>Gotcha: so, the validation works properly, but the catalina.ext.dirs
>doesn't actually get added to the classpath. Oops.
that's correct

2012/2/6 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Violeta,
>
> On 2/6/12 1:31 PM, Violeta Georgieva wrote:
> > Actually as I wrote in the mail with the scenario:
> >
> > when I do not specify the "catalina.ext.dirs", deployment fails
> >
> >> INFO: Deploying web application archive
> > C:\apache-tomcat-7.0.25\webapps\test-web-app.war
> >> Feb 4, 2012 10:41:44 PM
> >> org.apache.catalina.util.ExtensionValidator
> > validateManifestResources
> >> INFO: ExtensionValidator[/test-web-app][Web Application
> >> Manifest]:
> > Required extension [test-jar] not found.
> >> Feb 4, 2012 10:41:44 PM
> >> org.apache.catalina.util.ExtensionValidator
> > validateManifestResources
> >> INFO: ExtensionValidator[/test-web-app]: Failure to find [1]
> >> required
> > extension(s).
> >> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
> > startInternal
> >
> >> SEVERE: Error getConfigured Feb 4, 2012 10:41:44 PM
> >> org.apache.catalina.core.StandardContext
> > startInternal
> >> SEVERE: Context [/test-web-app] startup failed due to previous
> >> errors
> >
> > then when I specify "catalina.ext.dirs" then it fails with CNFE
>
> Gotcha: so, the validation works properly, but the catalina.ext.dirs
> doesn't actually get added to the classpath. Oops.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk8wHqkACgkQ9CaO5/Lv0PBXdQCgkvcmuAnGBEmcbrUUtPySGqmS
> dJUAoJ1KGf/flTDzmNd0JigGEO+7muMD
> =dog/
>  -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Dependencies on extensions functionality

2012-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Violeta,

On 2/6/12 1:31 PM, Violeta Georgieva wrote:
> Actually as I wrote in the mail with the scenario:
> 
> when I do not specify the "catalina.ext.dirs", deployment fails
> 
>> INFO: Deploying web application archive
> C:\apache-tomcat-7.0.25\webapps\test-web-app.war
>> Feb 4, 2012 10:41:44 PM
>> org.apache.catalina.util.ExtensionValidator
> validateManifestResources
>> INFO: ExtensionValidator[/test-web-app][Web Application
>> Manifest]:
> Required extension [test-jar] not found.
>> Feb 4, 2012 10:41:44 PM
>> org.apache.catalina.util.ExtensionValidator
> validateManifestResources
>> INFO: ExtensionValidator[/test-web-app]: Failure to find [1]
>> required
> extension(s).
>> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
> startInternal
> 
>> SEVERE: Error getConfigured Feb 4, 2012 10:41:44 PM
>> org.apache.catalina.core.StandardContext
> startInternal
>> SEVERE: Context [/test-web-app] startup failed due to previous
>> errors
> 
> then when I specify "catalina.ext.dirs" then it fails with CNFE

Gotcha: so, the validation works properly, but the catalina.ext.dirs
doesn't actually get added to the classpath. Oops.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8wHqkACgkQ9CaO5/Lv0PBXdQCgkvcmuAnGBEmcbrUUtPySGqmS
dJUAoJ1KGf/flTDzmNd0JigGEO+7muMD
=dog/
-END PGP SIGNATURE-

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



Odd interface binding observations

2012-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

All,

During a recent production deployment (Debian Linux), we added a
localhost-only connector like this:



(We use secure="true" because we have security-constraints that
require it, but we want to avoid the cost of SSL setup when
communicating locally).

/etc/hosts contains this:

127.0.0.1   localhost

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
 end of /etc/hosts =

When I use netstat to show me what's bound to what, I see this:

$ netstat -plan | grep 8187
tcp6   0  0 :::127.0.0.1:8187   :::*
LISTEN 2737/java

Also:

$ host localhost
localhost.chadis.comA   [my public ip]

I'm using "localhost:8187" as my host:port in my connection URL and
everything seems to work. Do I just not know how to read netstat's
output (I don't know much about the way Linux does IPv6)?

Anyone have any idea why 'host' returns my public IP for 'localhost'?
Or, when I use "localhost:8187" (which probably resolves to my public
IP), I can establish a connection?

Thanks,
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8wHeIACgkQ9CaO5/Lv0PBd5ACeLOlU9y1mdtTrzYRVQqxgK1fy
NigAoKeTZ4Rs0caRmq7lsXS6IHj36Ksj
=Aupx
-END PGP SIGNATURE-

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



Re: Client Authentication--getting certificate information on the server side

2012-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Sanjeev,

On 2/6/12 12:01 PM, Sanjeev Sharma wrote:
> This forces client authentication when I try to access the app
> using a browser and when I provide a trusted certificate, I'm able
> get authenticated.  After the authentication I was expecting to get
> the client certificate information in the session, but I get
> nothing. How do I pass the Common Name from the subject line of the
> client certificate to the server during authentication so that I
> can access it from a struts action?

You've stumbled upon the answer, but this is all documented quite well
in the servlet specification. Pick a version -- any version -- and
read it.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8wHOkACgkQ9CaO5/Lv0PAjGQCgiNBu1MY2Kzv3IEZ3MOa/VgZw
XXAAn0hk9BBDP4WAkrnmVYavanO7KLVn
=ohd6
-END PGP SIGNATURE-

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



Re: Dependencies on extensions functionality

2012-02-06 Thread Violeta Georgieva
Actually as I wrote in the mail with the scenario:

, when I do not specify the "catalina.ext.dirs", deployment fails

>INFO: Deploying web application archive
C:\apache-tomcat-7.0.25\webapps\test-web-app.war
>Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
validateManifestResources
>INFO: ExtensionValidator[/test-web-app][Web Application Manifest]:
Required extension [test-jar] not found.
>Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
validateManifestResources
>INFO: ExtensionValidator[/test-web-app]: Failure to find [1] required
extension(s).
>Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
startInternal

>SEVERE: Error getConfigured
>Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
startInternal
>SEVERE: Context [/test-web-app] startup failed due to previous errors

then when I specify "catalina.ext.dirs" then it fails with CNFE

2012/2/6 Christopher Schultz 

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Pid,
>
> On 2/6/12 6:48 AM, Pid wrote:
> > On 06/02/2012 11:08, Violeta Georgieva wrote:
> >>> I was going to ask you why you were using it!  So is your
> >>> interest purely academic?
> >> I have existing applications that are moving to Tomcat from
> >> another application server. As "dependencies on extensions" is a
> >> standard mechanism for shared libraries, they use it in order to
> >> be independent from the application servers.
> >
> > I see - in my experience this mechanism is rarely used in web
> > applications.  Interesting.
>
> Yeah, I had never heard of it.
>
> Also, the whole metadata-scanning thing seems totally unnecessary: the
> webapp tries to load a class, and the ClassLoader figures it out. The
> fact that the metadata exists doesn't really help much.
>
> I haven't looked at the validation code, though, so it's possible that
> the container is supposed to refuse to deploy the webapp if an
> appropriate extension isn't available.
>
> That obviously wasn't happening in Violeta's case because the
> deployment succeeded but then she got a CNFE.
>
> - -chris
> -BEGIN PGP SIGNATURE-
> Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
> Comment: GPGTools - http://gpgtools.org
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk8wGqYACgkQ9CaO5/Lv0PAxhQCfQ2NBq+vrLxIREvKp8mFROnw5
> mOUAn194PtKwYxvxKv1BJrTAkmnCksfu
> =X6VY
> -END PGP SIGNATURE-
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Clustering and https configuration

2012-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Riccardo,

On 2/6/12 8:10 AM, Riccardo Venittelli wrote:
> Now my test web app work fine but i'm unable to find a
> configuration for SingleSignOn in cluster.

Are you trying to set up a Cluster to communicate over SSL? I don't
believe  supports that. I have two recommendations (having
never done anything like this):

* stunnel (requires that you know in advance which ports will be used)

That's probably either non-ideal or not actually possible due to the
multicast nature of the  capabilities.

* Use a secure VPN with multicast enabled on that interface

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8wHBQACgkQ9CaO5/Lv0PBhigCgiegd0D7r8dLapzbK5/ZqOooA
Ti8AnR4lAkhjuWXLRBIDXqgUV0ocsWca
=jVBu
-END PGP SIGNATURE-

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



Re: Dependencies on extensions functionality

2012-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Pid,

On 2/6/12 6:48 AM, Pid wrote:
> On 06/02/2012 11:08, Violeta Georgieva wrote:
>>> I was going to ask you why you were using it!  So is your
>>> interest purely academic?
>> I have existing applications that are moving to Tomcat from
>> another application server. As "dependencies on extensions" is a
>> standard mechanism for shared libraries, they use it in order to
>> be independent from the application servers.
> 
> I see - in my experience this mechanism is rarely used in web 
> applications.  Interesting.

Yeah, I had never heard of it.

Also, the whole metadata-scanning thing seems totally unnecessary: the
webapp tries to load a class, and the ClassLoader figures it out. The
fact that the metadata exists doesn't really help much.

I haven't looked at the validation code, though, so it's possible that
the container is supposed to refuse to deploy the webapp if an
appropriate extension isn't available.

That obviously wasn't happening in Violeta's case because the
deployment succeeded but then she got a CNFE.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8wGqYACgkQ9CaO5/Lv0PAxhQCfQ2NBq+vrLxIREvKp8mFROnw5
mOUAn194PtKwYxvxKv1BJrTAkmnCksfu
=X6VY
-END PGP SIGNATURE-

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



Re: [OT] Dependencies on extensions functionality

2012-02-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Casper,

On 2/6/12 2:27 AM, Casper Wandahl Schmidt wrote:
> I was just saying what others use to say whenever someone attaches 
> something :) (eg. Pid is normally on the spot and tell people to
> post xml-files inline instead attaching)

Fair enough.

I actually would prefer that people attach things (and keep them small)
rather than posting a link to dropbox or whatever. Attachments go into
the archives and are readable at a later date. Stuff in dropbox
eventually expires and so someone looking through the archives might
not be able to see some important information (e.g. "I posted my
working configuration here: [dropbox link]. Thanks for the help!").

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk8wGgcACgkQ9CaO5/Lv0PBxsgCfc6BnecoHAxulYWhbwYiGUML/
19UAoKXOEeme8S9RSIjr05R/V6ySPQHm
=tl6r
-END PGP SIGNATURE-

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



Re: starting connectors after the tomcat startup

2012-02-06 Thread Pradeep Fernando
Hi,

Let me explain my scenario. I'm running tomcat inside an OSGi
environment. There I create http.service out of tomcat. I do that in a
servlet init method and set the loadOnStartup to '1' for that
servlet.

Now during the server startup my http.service get exposed and other
bundles make use of that service. Since the starting order of my
bundles depends on the OSGi service dependencies, my application is
ready to process request only when all the bundles are ready. At that
point i want start the connectors.

The problems is, When I call Tomcat.start() it starts connectors as
well. If I call Tomcat.init(), it does not initiate my servlet which,
in-turn registers the http.service.


thanks,
--Pradeep

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



RE: Client Authentication--getting certificate information on the server side

2012-02-06 Thread Sanjeev Sharma
Thanks so much.  I was just dumping session in psi-probe.  I didn't think to 
look in the request.  I get exactly what I need when I us 
request.getAttribute(org.apache.catalina.Globals.CERTIFICATES_ATTR).  Thanks 
again!

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Monday, February 06, 2012 12:20 PM
To: Tomcat Users List
Subject: Re: Client Authentication--getting certificate information on the 
server side

On 06/02/2012 17:01, Sanjeev Sharma wrote:
> Hello,
> 
> I'm trying to configure client authentication in Tomcat 7 on Windows 7.  I 
> have the following connector in the server.xml:
> 
> protocol="HTTP/1.1"
>SSLEnabled="true"
>maxThreads="150"
>scheme="https"
>secure="true"
>keystoreFile="d:\certs\server_cert.jks"
>keystorePass="changeit"
>truststoreFile="d:\certs\truststore.jks"
>truststorePass="changeit"
>clientAuth="true"
>sslProtocol="TLS" />
> 
> In my web.xml I have the following :
> 
> 
> CLIENT-CERT
> PKI Enabled App
> 
> 
> This forces client authentication when I try to access the app using a 
> browser and when I provide a trusted certificate, I'm able get authenticated. 
>  After the authentication I was expecting to get the client certificate 
> information in the session, but I get nothing.  How do I pass the Common Name 
> from the subject line of the client certificate to the server during 
> authentication so that I can access it from a struts action?
> 
> Thanks in advance.

There are a number of variables (javax.servlet.request.ssl*) available in the 
*request* rather than the session.  Which ones are you trying to access?

There's a list of various relevant things here:

http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/Globals.java


p





-- 

[key:62590808]



Re: Client Authentication--getting certificate information on the server side

2012-02-06 Thread Pid
On 06/02/2012 17:01, Sanjeev Sharma wrote:
> Hello,
> 
> I'm trying to configure client authentication in Tomcat 7 on Windows 7.  I 
> have the following connector in the server.xml:
> 
> protocol="HTTP/1.1"
>SSLEnabled="true"
>maxThreads="150"
>scheme="https"
>secure="true"
>keystoreFile="d:\certs\server_cert.jks"
>keystorePass="changeit"
>truststoreFile="d:\certs\truststore.jks"
>truststorePass="changeit"
>clientAuth="true"
>sslProtocol="TLS" />
> 
> In my web.xml I have the following :
> 
> 
> CLIENT-CERT
> PKI Enabled App
> 
> 
> This forces client authentication when I try to access the app using a 
> browser and when I provide a trusted certificate, I'm able get authenticated. 
>  After the authentication I was expecting to get the client certificate 
> information in the session, but I get nothing.  How do I pass the Common Name 
> from the subject line of the client certificate to the server during 
> authentication so that I can access it from a struts action?
> 
> Thanks in advance.

There are a number of variables (javax.servlet.request.ssl*) available
in the *request* rather than the session.  Which ones are you trying to
access?

There's a list of various relevant things here:

http://svn.apache.org/repos/asf/tomcat/trunk/java/org/apache/catalina/Globals.java


p





-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Client Authentication--getting certificate information on the server side

2012-02-06 Thread Sanjeev Sharma
Hello,

I'm trying to configure client authentication in Tomcat 7 on Windows 7.  I have 
the following connector in the server.xml:



In my web.xml I have the following :


CLIENT-CERT
PKI Enabled App


This forces client authentication when I try to access the app using a browser 
and when I provide a trusted certificate, I'm able get authenticated.  After 
the authentication I was expecting to get the client certificate information in 
the session, but I get nothing.  How do I pass the Common Name from the subject 
line of the client certificate to the server during authentication so that I 
can access it from a struts action?

Thanks in advance.



RE: archived mailing list activity

2012-02-06 Thread Caldarale, Charles R
> From: Sanjeev Sharma [mailto:sanjeev.sha...@buchanan-edwards.com] 
> Subject: archived mailing list activity

> Does anyone know if the messages on this mailing list are 
> archived anywhere?

The archives for each mailing list are documented here:

http://tomcat.apache.org/lists.html

 - 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



archived mailing list activity

2012-02-06 Thread Sanjeev Sharma
Does anyone know if the messages on this mailing list are archived anywhere?  I 
sent a question to the mailing list last night, but was not able to sign up for 
the mailing list from my Yahoo email account.  I am signed up using my work 
email address, but don't know if anyone answered my question.  I would rather 
not annoy people by re-posting my question.

Thanks.


Re: starting connectors after the tomcat startup

2012-02-06 Thread Domenico Briganti
Hi Fernando, 
open HTTP/AJP il the last step that tomcat do when it starts. Why don't
you put your initializzations on webapp's context initialize and wait
the ready of your resource that?

Regards
Domenico


Il giorno lun, 06/02/2012 alle 21.51 +0530, Pradeep Fernando ha scritto:
> Hi all,
> 
> I'm using embedded tomcat within my application. I configured the
> org.apache.catalina.startup.Tomcat class using the server.xml found in
> tomcat distribution.
> But i want to start my connectors after some requirement are met (The
> necessary resources being initialized).
> 
> My approach was to set the connector param,
> 
> bindOnInit = "false"
> 
> and then start the connectors at a later stage using connector.start();
> 
> 
> but it looks like my connectors are in the "STARTED" life-cycle stage
> once i do the Tomcat.start() call. - means they are already started
> Am i missing something. How can i achieve my requirement.?
> 
> thanks
> --Pradeep
> 
> -
> 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



starting connectors after the tomcat startup

2012-02-06 Thread Pradeep Fernando
Hi all,

I'm using embedded tomcat within my application. I configured the
org.apache.catalina.startup.Tomcat class using the server.xml found in
tomcat distribution.
But i want to start my connectors after some requirement are met (The
necessary resources being initialized).

My approach was to set the connector param,

bindOnInit = "false"

and then start the connectors at a later stage using connector.start();


but it looks like my connectors are in the "STARTED" life-cycle stage
once i do the Tomcat.start() call. - means they are already started
Am i missing something. How can i achieve my requirement.?

thanks
--Pradeep

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



Re: Frequently Getting Service Temporaily availbale message from backend tomcat servers

2012-02-06 Thread André Warnier

Amol Puglia wrote:

Hi,

Thanks for the information.


Is it advisable to use worker mpm or prefork mpm?


The Apache httpd on-line documentation or support mailing list would be a better place for 
that question.
Without guarantees, what I remember : the prefork mpm is very stable, and the worker mpm 
was said (a while ago) to be rather experimental and not recommended for production sites.

(But that's old info and it may have changed since).
Check it with the on-line documentation for your version.

The worker mpm is supposed to be more scalable for very large loads, because it uses 
threads versus children processes, so its memory and resource usage is probably less.




If i use worker mpm will it resolve this issue?

It is not possible to answer that without knowing what your issue really is.
Pid sent some comments on your configuration.  Read them and try them out first.

Do not start changing the basics of your setup, because then you'll never know what your 
problem was and what fixed it.





Please let me know what shall i do if i have to use worker mpm.


I would not do that.  Resolve the current issue first.
You can later try with the worker mpm, to see if in your case it works better.

You have not told us what kind of load (number of requests per second, average time to 
process one request) you expect your server to be submitted to, so it's hard to say more 
right now.


In simple cases, the basic rule is : for each request that is being processed /at the same 
time/ by your front-end Apache httpd, there will be one active AJP connection to a Tomcat 
back-end, and a Tomcat thread active to process that request.
If your front-end is a prefork type, then the number of requests being processed at the 
same time is limited by the number of Apache children (MaxClients).
If all front-end requests result in a call to a back-end Tomcat (or several Tomcats), then 
the (total) number of threads available in all the Tomcat(s) should not be lower than the 
MaxClients on your front-end server. (In a simple Tomcat configuration, that would be the 
total of all the maxThreads of all your AJP Connectors).


Of course, the total number of Apache children and Tomcat threads that can be active at 
the same time, depends on the resources of your host(s), and on your application.


I find that a simple picture often helps :

browser --> HTTP --> Apache httpd --> AJP --> Tomcat Connector --> thread
browser (child)   --> AJP --> Tomcat Connector --> thread
browser   --> AJP --> Tomcat Connector --> thread
...

One browser request results in one HTTP connection to Apache httpd, and one AJP connection 
from httpd to a Tomcat Connector, which fires one thread to handle the request.  The 
request takes a certain time to be processed and answered, during which time other browser 
requests arrive at the front-end.
The point is to balance all these elements. If one of them is too large, you are wasting 
resources; if one of them is too small, you are creating a bottleneck.



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



RE: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Caldarale, Charles R
> From: Lev A KARATUN [mailto:lev.kara...@raiffeisen.ru] 
> Subject: RE: How can I access tomcat's logs using my jsp?

> when I'm copypasting the default servlet block to 
> $CATALINA_BASE/logs/WEB-INF/web.xml, the application
> no longer works.

There's an additional step required for Tomcat 6 that's not necessary for 
Tomcat 7.  So either upgrade, or do the following:

Change the name of the DefaultServlet in logs/WEB-INF/web.xml to logsdefault 
(or some other unique label):

logsdefault

and add a  for it:


logsdefault
/


Tomcat 6 does not allow you to override the  settings in the 
global conf/web.xml, but Tomcat 7 does.

> And one more question - if myapp's docBase is set to $CATALINA_BASE/logs , 
> does it matter what is in the webapps/myapp folder?

Assuming the "myapp" you're referring to is the one for accessing Tomcat's 
logs, you should not risk problems by also having a webapps/myapp.  It 
shouldn't hurt, but...

And, as usual, ignore Martin G's irrelevant ramblings.

 - 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: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Pid
On 06/02/2012 13:14, André Warnier wrote:
> Pid wrote:
>> On 06/02/2012 11:53, Lev A KARATUN wrote:
>>
>>> And one more question - if myapp's docBase is set to
>>> $CATALINA_BASE/logs , does it matter what is in the webapps/myapp
>>> folder?
>>
>> No.
>>
> Wait..
> If the myapp application is deployed via a context file under
> conf/Catalina/[hostName]/myapp.xml
> AND there exists a webapps/myapp directory,
> isn't that going to cause a double deployment ?

Not if the paths of the context xml file and the application directory
are the same.  The context defined in tomcat/conf/Catalina/host takes
precedence.


p


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


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


Re: Clustering and https configuration

2012-02-06 Thread Daniel Mikusa
On Mon, 2012-02-06 at 05:10 -0800, Riccardo Venittelli wrote:
> Hi Daniel,
> 
> i've configured my apache 2.2 server in https an my tomcat nodes with ajp.
> Now my test web app work fine

Glad to see that you got this working!

>  but i'm unable to find a configuration for
> SingleSignOn in cluster.

Please start a new thread as this is a completely different topic.  

Dan


> 
> Please help me :-)
> 
> Thanks a lot.
> > On Tue, 2012-01-31 at 09:52 -0800, Riccardo Venittelli wrote:
> >> Hy,
> >>
> >> I download tomcat 7.0.22 and apache server 2.2 on windows xp
> >> professional
> >> 32 bit.
> >> I have made a cluster configuration with 2 server(tomcat) and a load
> >> balancer (apache) and everithing works fine.
> >
> >> Now i need to use https protocol over clustering,
> >
> > I'm not exactly sure what you mean by this.  Can you elaborate?
> >
> > If you are referring to accepting incoming HTTP requests via HTTPS,
> > there is nothing special that needs to be done.
> >
> > You would just configure Apache HTTPD to accept incoming HTTPS requests.
> > It would handle the encryption and then proxy the requests to the
> > appropriate node in your cluster.
> >
> > Ex (ASCII graphic, hope it displays OK):
> >
> >  > Tomcat Node 1
> > (HTTPS)  |
> >  Client --> Apache HTTPD > Tomcat Node 2
> >  |
> >  > Tomcat Node N
> > Dan
> >
> >
> >> but i'm unable to find
> >> any documentation about clustering and https.
> >>
> >> Thanks a lot.
> >>
> >> Riccardo Venittelli
> >>
> >>
> >
> 
> 


Re: How can I access tomcat's logs using my jsp?

2012-02-06 Thread André Warnier

Pid wrote:

On 06/02/2012 11:53, Lev A KARATUN wrote:

And one more question - if myapp's docBase is set to $CATALINA_BASE/logs , 
does it matter what is in the webapps/myapp folder?


No.


Wait..
If the myapp application is deployed via a context file under 
conf/Catalina/[hostName]/myapp.xml

AND there exists a webapps/myapp directory,
isn't that going to cause a double deployment ?


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



Re: Clustering and https configuration

2012-02-06 Thread Riccardo Venittelli
Hi Daniel,

i've configured my apache 2.2 server in https an my tomcat nodes with ajp.
Now my test web app work fine but i'm unable to find a configuration for
SingleSignOn in cluster.

Please help me :-)

Thanks a lot.
> On Tue, 2012-01-31 at 09:52 -0800, Riccardo Venittelli wrote:
>> Hy,
>>
>> I download tomcat 7.0.22 and apache server 2.2 on windows xp
>> professional
>> 32 bit.
>> I have made a cluster configuration with 2 server(tomcat) and a load
>> balancer (apache) and everithing works fine.
>
>> Now i need to use https protocol over clustering,
>
> I'm not exactly sure what you mean by this.  Can you elaborate?
>
> If you are referring to accepting incoming HTTP requests via HTTPS,
> there is nothing special that needs to be done.
>
> You would just configure Apache HTTPD to accept incoming HTTPS requests.
> It would handle the encryption and then proxy the requests to the
> appropriate node in your cluster.
>
> Ex (ASCII graphic, hope it displays OK):
>
>  > Tomcat Node 1
> (HTTPS)  |
>  Client --> Apache HTTPD > Tomcat Node 2
>  |
>  > Tomcat Node N
> Dan
>
>
>> but i'm unable to find
>> any documentation about clustering and https.
>>
>> Thanks a lot.
>>
>> Riccardo Venittelli
>>
>>
>


-- 
Riccardo Venittelli

ObjectWay S.p.A.
Via Flavio Domiziano, 10 - 00145 Roma
Tel: +39 0659604235
Fax: +39 0659605107
e-mail: riccardo.venitte...@objectway.it
http://www.objectway.it


Chi riceve il presente messaggio e' tenuto a verificare se lo stesso non gli
sia pervenuto per errore. In tal caso e' pregato di avvisare immediatamente
il mittente e, tenuto conto delle responsabilita' connesse all'indebito
utilizzo e/o divulgazione del messaggio e/o delle informazioni in esso
contenute, voglia cancellare l'originale e distruggere le varie copie o
stampe.

The receiver of this message is required to check if he/she has received it
erroneously. If so, the receiver is requested to immediately inform the
sender and - in consideration of the responsibilities arising from undue use
and/or disclosure of the message and/or the information contained therein -
destroy the original message and any copy or printout thereof. 


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



Re: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Pid
On 06/02/2012 11:53, Lev A KARATUN wrote:
> Charles,
> 
> thank for your explanation.
> 
> Now everything (exept one thing) seems to work fine.
> 
> The only problem left is - when I'm copypasting the default servlet block 
> to $CATALINA_BASE/logs/WEB-INF/web.xml , the application no longer works.

What are the other symptoms?  Log messages, etc?

> Without it everything works fine (but I can't disable the directory 
> listings general setting because I need it swithed on for the /logs dir).
> 
> The block that I copy is :
> 
> 
> default
>  
> org.apache.catalina.servlets.DefaultServlet
> 
> debug
> 0
> 
> 
> listings
> true
> 
> 1
>  
> 
> (I place it inside the  section)

Have you also copied the servlet-mapping block?

> And one more question - if myapp's docBase is set to $CATALINA_BASE/logs , 
> does it matter what is in the webapps/myapp folder?

No.


p

> Thanks in advance.
> 
> 
> "Caldarale, Charles R"  wrote on 04.02.2012 
> 01:44:08:
> 
>> "Caldarale, Charles R"  
>> 04.02.2012 01:45
>>
>> Please respond to
>> "Tomcat Users List" 
>>
>> To
>>
>> Tomcat Users List 
>>
>> cc
>>
>> Subject
>>
>> RE: How can I access tomcat's logs using my jsp?
>>
>>> From: André Warnier [mailto:a...@ice-sa.com] 
>>> Subject: Re: How can I access tomcat's logs using my jsp?
>>
>>> - you can create a webapp named "tomcat-logs" (or whatever), just by 
>>> creating a new directory "tomcat-logs" (or whatever) under webapps.
>>
>> Nope.
>>
>>> - to protect access to it, you'll need a WEB-INF/web.xml, with some 
>>> security/auth constraints, just like any other protected application.
>>
>> That is needed.  However, this WEB-INF directory and consequently 
>> the WEB-INF/web.xml file must be placed in Tomcat's log directory.
>>
>>> - you will need a META-INF/context.xml, specifying as docBase, the 
>>> directory where the logs really are.
>>
>> Nope, that won't work; docBase is not allowed when the webapp is 
>> inside the  appBase directory.  The  element must be 
>> placed in conf/Catalina/[hostName]/[appName].xml, with the docBase 
>> pointing to the location of the logs directory.
>>
>>> - and you will need to specify somewhere, that for this directory, 
>>> Tomcat is allowed to generate a page with an index to the files.
>>
>> That's done by enabling the listings parameter for the 
>> DefaultServlet.  The OP will need to copy the  tag and its 
>> sub-tags for the DefaultServlet from conf/web.xml to the log 
>> webapp's WEB-INF/web.xml and set the listings parameter to true. 
>> You do not want to enable the listings parameter in the global conf/
>> web.xml for what should be obvious reasons.
>>
>>  - 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
>>
> 
> 
> 
> ---
> This message and any attachment are confidential and may be privileged or 
> otherwise protected from disclosure. If you are not the intended recipient 
> any use, distribution, copying or disclosure is strictly prohibited. If you 
> have received this message in error, please notify the sender immediately 
> either by telephone or by e-mail and delete this message and any attachment 
> from your system. Correspondence via e-mail is for information purposes only. 
> ZAO Raiffeisenbank neither makes nor accepts legally binding statements by 
> e-mail unless otherwise agreed. 
> ---


-- 

[key:62590808]



signature.asc
Description: OpenPGP digital signature


RE: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Martin Gainty

The catalina logger has exclusive access for writing but
you can try RandomAccessFile with read only mode for a quick peek at the 
loghttp://docs.oracle.com/javase/6/docs/api/java/io/RandomAccessFile.html#RandomAccessFile(java.io.File,
 java.lang.String) Saludos Cordiales
Martin 
__ 
Porfavor..no altere esta communicacion..Gracias

 > To: users@tomcat.apache.org
> Subject: RE: How can I access tomcat's logs using my jsp?
> From: lev.kara...@raiffeisen.ru
> Date: Mon, 6 Feb 2012 15:53:11 +0400
> 
> Charles,
> 
> thank for your explanation.
> 
> Now everything (exept one thing) seems to work fine.
> 
> The only problem left is - when I'm copypasting the default servlet block 
> to $CATALINA_BASE/logs/WEB-INF/web.xml , the application no longer works.
> Without it everything works fine (but I can't disable the directory 
> listings general setting because I need it swithed on for the /logs dir).
> 
> The block that I copy is :
> 
> 
> default
>  
> org.apache.catalina.servlets.DefaultServlet
> 
> debug
> 0
> 
> 
> listings
> true
> 
> 1
>  
> 
> (I place it inside the  section)
> 
> 
> And one more question - if myapp's docBase is set to $CATALINA_BASE/logs , 
> does it matter what is in the webapps/myapp folder?
> 
> 
> Thanks in advance.
> 
> 
> "Caldarale, Charles R"  wrote on 04.02.2012 
> 01:44:08:
> 
> > "Caldarale, Charles R"  
> > 04.02.2012 01:45
> > 
> > Please respond to
> > "Tomcat Users List" 
> > 
> > To
> > 
> > Tomcat Users List 
> > 
> > cc
> > 
> > Subject
> > 
> > RE: How can I access tomcat's logs using my jsp?
> > 
> > > From: André Warnier [mailto:a...@ice-sa.com] 
> > > Subject: Re: How can I access tomcat's logs using my jsp?
> > 
> > > - you can create a webapp named "tomcat-logs" (or whatever), just by 
> > > creating a new directory "tomcat-logs" (or whatever) under webapps.
> > 
> > Nope.
> > 
> > > - to protect access to it, you'll need a WEB-INF/web.xml, with some 
> > > security/auth constraints, just like any other protected application.
> > 
> > That is needed.  However, this WEB-INF directory and consequently 
> > the WEB-INF/web.xml file must be placed in Tomcat's log directory.
> > 
> > > - you will need a META-INF/context.xml, specifying as docBase, the 
> > > directory where the logs really are.
> > 
> > Nope, that won't work; docBase is not allowed when the webapp is 
> > inside the  appBase directory.  The  element must be 
> > placed in conf/Catalina/[hostName]/[appName].xml, with the docBase 
> > pointing to the location of the logs directory.
> > 
> > > - and you will need to specify somewhere, that for this directory, 
> > > Tomcat is allowed to generate a page with an index to the files.
> > 
> > That's done by enabling the listings parameter for the 
> > DefaultServlet.  The OP will need to copy the  tag and its 
> > sub-tags for the DefaultServlet from conf/web.xml to the log 
> > webapp's WEB-INF/web.xml and set the listings parameter to true. 
> > You do not want to enable the listings parameter in the global conf/
> > web.xml for what should be obvious reasons.
> > 
> >  - 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
> > 
> 
> 
> 
> ---
> This message and any attachment are confidential and may be privileged or 
> otherwise protected from disclosure. If you are not the intended recipient 
> any use, distribution, copying or disclosure is strictly prohibited. If you 
> have received this message in error, please notify the sender immediately 
> either by telephone or by e-mail and delete this message and any attachment 
> from your system. Correspondence via e-mail is for information purposes only. 
> ZAO Raiffeisenbank neither makes nor accepts legally binding statements by 
> e-mail unless otherwise agreed. 
> ---
  

Re: Frequently Getting Service Temporaily availbale message from backend tomcat servers

2012-02-06 Thread Amol Puglia
Hi,

Thanks for the information.


Is it advisable to use worker mpm or prefork mpm?

If i use worker mpm will it resolve this issue?


Please let me know what shall i do if i have to use worker mpm.

kindly Let me know your inputs.






 From: André Warnier 
To: Tomcat Users List  
Sent: Monday, February 6, 2012 4:17 PM
Subject: Re: Frequently Getting Service Temporaily availbale message from 
backend tomcat servers
 
Hi.

Amol Puglia wrote:
> Hello ,
> 
> Thanks for the response.
> 
> I am using following worker and no of threads.
> 
> Worker is Prefork and 
> ThreadsPerChild     25
> 

In the context of a pre-fork Apache, ThreadsPerChild has no meaning and is not 
used.


> Below is the details for the same.
> 
> 
> Server version: Apache/2.2.16 (Unix)
> Server built:   Sep 27 2010 12:48:44
> Server's Module Magic Number: 20051115:24
> Server loaded:  APR 1.4.2, APR-Util 1.3.9
> Compiled using: APR 1.4.2, APR-Util 1.3.9
> Architecture:   32-bit
> Server MPM:     Prefork
>   threaded:     no
>     forked:     yes (variable process count)
> 

The following configuration section will be ignored, because the MPM is not 
"worker", it is "Prefork".  So you need to look at the section , not the one below.

> 
> StartServers         2
> MaxClients         250
> MinSpareThreads     25
> MaxSpareThreads     75
> ThreadsPerChild     25
> MaxRequestsPerChild  0
> 
> 

The following look ok and resonable.

> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> HostnameLookups Off
> 

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

RE: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Lev A KARATUN
Charles,

thank for your explanation.

Now everything (exept one thing) seems to work fine.

The only problem left is - when I'm copypasting the default servlet block 
to $CATALINA_BASE/logs/WEB-INF/web.xml , the application no longer works.
Without it everything works fine (but I can't disable the directory 
listings general setting because I need it swithed on for the /logs dir).

The block that I copy is :


default
 
org.apache.catalina.servlets.DefaultServlet

debug
0


listings
true

1
 

(I place it inside the  section)


And one more question - if myapp's docBase is set to $CATALINA_BASE/logs , 
does it matter what is in the webapps/myapp folder?


Thanks in advance.


"Caldarale, Charles R"  wrote on 04.02.2012 
01:44:08:

> "Caldarale, Charles R"  
> 04.02.2012 01:45
> 
> Please respond to
> "Tomcat Users List" 
> 
> To
> 
> Tomcat Users List 
> 
> cc
> 
> Subject
> 
> RE: How can I access tomcat's logs using my jsp?
> 
> > From: André Warnier [mailto:a...@ice-sa.com] 
> > Subject: Re: How can I access tomcat's logs using my jsp?
> 
> > - you can create a webapp named "tomcat-logs" (or whatever), just by 
> > creating a new directory "tomcat-logs" (or whatever) under webapps.
> 
> Nope.
> 
> > - to protect access to it, you'll need a WEB-INF/web.xml, with some 
> > security/auth constraints, just like any other protected application.
> 
> That is needed.  However, this WEB-INF directory and consequently 
> the WEB-INF/web.xml file must be placed in Tomcat's log directory.
> 
> > - you will need a META-INF/context.xml, specifying as docBase, the 
> > directory where the logs really are.
> 
> Nope, that won't work; docBase is not allowed when the webapp is 
> inside the  appBase directory.  The  element must be 
> placed in conf/Catalina/[hostName]/[appName].xml, with the docBase 
> pointing to the location of the logs directory.
> 
> > - and you will need to specify somewhere, that for this directory, 
> > Tomcat is allowed to generate a page with an index to the files.
> 
> That's done by enabling the listings parameter for the 
> DefaultServlet.  The OP will need to copy the  tag and its 
> sub-tags for the DefaultServlet from conf/web.xml to the log 
> webapp's WEB-INF/web.xml and set the listings parameter to true. 
> You do not want to enable the listings parameter in the global conf/
> web.xml for what should be obvious reasons.
> 
>  - 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
> 



---
This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient any 
use, distribution, copying or disclosure is strictly prohibited. If you have 
received this message in error, please notify the sender immediately either by 
telephone or by e-mail and delete this message and any attachment from your 
system. Correspondence via e-mail is for information purposes only. ZAO 
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail 
unless otherwise agreed. 
---

Re: Dependencies on extensions functionality

2012-02-06 Thread Pid
On 06/02/2012 11:08, Violeta Georgieva wrote:
>> I was going to ask you why you were using it!  So is your interest
>> purely academic?
> I have existing applications that are moving to Tomcat from another
> application server.
> As "dependencies on extensions" is a standard mechanism for shared
> libraries, they use it in order to be independent from the application
> servers.

I see - in my experience this mechanism is rarely used in web
applications.  Interesting.


p

> 2012/2/6 Pid 
> 
>> On 05/02/2012 15:03, Violeta Georgieva wrote:
>>> Hi,
>>>
>>> As I wrote I'm placing the extension jar in
>> "C:\apache-tomcat-7.0.25\ext".
>>> I tried the following: I specified "C:\apache-tomcat-7.0.25\lib" as value
>>> for "catalina.ext.dirs" property and now the web application is working.
>>>
>>> But then I have two questions:
>>>
>>> - Do we need "catalina.ext.dirs" at all if we can use only Tomcat's
>>> classpath dirs? Let's look through them instead of introducing additional
>>> property.
>>
>> I was going to ask you why you were using it!  So is your interest
>> purely academic?
>>
>>
>>> - Does this mean that we can use only Tomcat's classpath dirs and we
>> cannot
>>> specify a custom directory for these extensions?
>>
>> It should work.  (As per Konstantin's message)
>>
>>
>> p
>>
>>
>>> Thanks
>>> Violeta
>>>
>>> 2012/2/5 Pid 
>>>
 On 04/02/2012 21:02, Violeta Georgieva wrote:
> Hi,
>
> Here is how one can reproduce the scenario:
>
> 1. Start Tomcat
> 2. Put attached war in webapps folder
> 3. In the console the following error message is printed:

 In the example above, where have you placed the extension?  Is it in one
 of Tomcat's classpath directories?


 p

> INFO: Deploying web application archive
> C:\apache-tomcat-7.0.25\webapps\test-web-app.war
> Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
> validateManifestResources
> INFO: ExtensionValidator[/test-web-app][Web Application Manifest]:
> Required extension [test-jar] not found.
> Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
> validateManifestResources
> INFO: ExtensionValidator[/test-web-app]: Failure to find [1] required
> extension(s).
> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Error getConfigured
> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
> startInternal
> SEVERE: Context [/test-web-app] startup failed due to previous errors
>
> 4. Stop Tomcat
> 5. Create folder - C:\apache-tomcat-7.0.25\ext
> 6. Put the attached jar file in the folder created on step 5
> 7. Start Tomcat with additional VM argument
> -Dcatalina.ext.dirs=C:/apache-tomcat-7.0.25/ext
> 8. This time the application is deployed successfully.
> 9. Request http://localhost:8080/test-web-app/TestServlet
> 10. Internal Server Error is returned with the following Exception:
>
>
> java.lang.ClassNotFoundException: test.TestExtension
>

>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
>

>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
>   test.TestServlet.doGet(TestServlet.java:28)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>
> I did not change any other Tomcat configuration so it is running with
> defaults.
>
> The scenario is that TestServlet (in war file) instantiates
> TestExtension (in jar file, placed in the ext directory).
>
> Regards
> Violeta
> 2012/2/4 Christopher Schultz  >
>
> Violetta,
>
> On 2/3/12 8:25 AM, Violeta Georgieva wrote:
>> I have a web application that specifies in the Manifest that wants
>> to use an extension.
>
>> I specify "catalina.ext.dirs" to point to the directory where I
>> placed my extensions jar files.
>
> What is the value of the catalina.ext.dirs system property? Where did
> you set it? Can you verify that it is set when the JVM actually starts?
>
> What files are in the directory or directories specified by
> catalina.ext.dir?
>
>> Unfortunately when I request my application I'm receiving
>> "ClassNotFoundException".
>
> What class cannot be found? Is it found in any of the JAR files you
> have in your catalina.ext.dir (which is, of course, the whole point of
> the feature)?
>
>> I verified that
>
>> ExtensionValidator.validateApplication() succeeded to find the
>> extension jar file.
>
> How did you verify this? Are there logs that suggest your JAR file is
> being scanned? Please provide them.
>
>> What could be the problem? May be I'm missing some config

Re: Dependencies on extensions functionality

2012-02-06 Thread Violeta Georgieva
>I was going to ask you why you were using it!  So is your interest
>purely academic?
I have existing applications that are moving to Tomcat from another
application server.
As "dependencies on extensions" is a standard mechanism for shared
libraries, they use it in order to be independent from the application
servers.

2012/2/6 Pid 

> On 05/02/2012 15:03, Violeta Georgieva wrote:
> > Hi,
> >
> > As I wrote I'm placing the extension jar in
> "C:\apache-tomcat-7.0.25\ext".
> > I tried the following: I specified "C:\apache-tomcat-7.0.25\lib" as value
> > for "catalina.ext.dirs" property and now the web application is working.
> >
> > But then I have two questions:
> >
> > - Do we need "catalina.ext.dirs" at all if we can use only Tomcat's
> > classpath dirs? Let's look through them instead of introducing additional
> > property.
>
> I was going to ask you why you were using it!  So is your interest
> purely academic?
>
>
> > - Does this mean that we can use only Tomcat's classpath dirs and we
> cannot
> > specify a custom directory for these extensions?
>
> It should work.  (As per Konstantin's message)
>
>
> p
>
>
> > Thanks
> > Violeta
> >
> > 2012/2/5 Pid 
> >
> >> On 04/02/2012 21:02, Violeta Georgieva wrote:
> >>> Hi,
> >>>
> >>> Here is how one can reproduce the scenario:
> >>>
> >>> 1. Start Tomcat
> >>> 2. Put attached war in webapps folder
> >>> 3. In the console the following error message is printed:
> >>
> >> In the example above, where have you placed the extension?  Is it in one
> >> of Tomcat's classpath directories?
> >>
> >>
> >> p
> >>
> >>> INFO: Deploying web application archive
> >>> C:\apache-tomcat-7.0.25\webapps\test-web-app.war
> >>> Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
> >>> validateManifestResources
> >>> INFO: ExtensionValidator[/test-web-app][Web Application Manifest]:
> >>> Required extension [test-jar] not found.
> >>> Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
> >>> validateManifestResources
> >>> INFO: ExtensionValidator[/test-web-app]: Failure to find [1] required
> >>> extension(s).
> >>> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
> >>> startInternal
> >>> SEVERE: Error getConfigured
> >>> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
> >>> startInternal
> >>> SEVERE: Context [/test-web-app] startup failed due to previous errors
> >>>
> >>> 4. Stop Tomcat
> >>> 5. Create folder - C:\apache-tomcat-7.0.25\ext
> >>> 6. Put the attached jar file in the folder created on step 5
> >>> 7. Start Tomcat with additional VM argument
> >>> -Dcatalina.ext.dirs=C:/apache-tomcat-7.0.25/ext
> >>> 8. This time the application is deployed successfully.
> >>> 9. Request http://localhost:8080/test-web-app/TestServlet
> >>> 10. Internal Server Error is returned with the following Exception:
> >>>
> >>>
> >>> java.lang.ClassNotFoundException: test.TestExtension
> >>>
> >>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
> >>>
> >>
> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
> >>>   test.TestServlet.doGet(TestServlet.java:28)
> >>>   javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> >>>   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
> >>>
> >>> I did not change any other Tomcat configuration so it is running with
> >>> defaults.
> >>>
> >>> The scenario is that TestServlet (in war file) instantiates
> >>> TestExtension (in jar file, placed in the ext directory).
> >>>
> >>> Regards
> >>> Violeta
> >>> 2012/2/4 Christopher Schultz  >>> >
> >>>
> >>> Violetta,
> >>>
> >>> On 2/3/12 8:25 AM, Violeta Georgieva wrote:
>  I have a web application that specifies in the Manifest that wants
>  to use an extension.
> >>>
>  I specify "catalina.ext.dirs" to point to the directory where I
>  placed my extensions jar files.
> >>>
> >>> What is the value of the catalina.ext.dirs system property? Where did
> >>> you set it? Can you verify that it is set when the JVM actually starts?
> >>>
> >>> What files are in the directory or directories specified by
> >>> catalina.ext.dir?
> >>>
>  Unfortunately when I request my application I'm receiving
>  "ClassNotFoundException".
> >>>
> >>> What class cannot be found? Is it found in any of the JAR files you
> >>> have in your catalina.ext.dir (which is, of course, the whole point of
> >>> the feature)?
> >>>
>  I verified that
> >>>
>  ExtensionValidator.validateApplication() succeeded to find the
>  extension jar file.
> >>>
> >>> How did you verify this? Are there logs that suggest your JAR file is
> >>> being scanned? Please provide them.
> >>>
>  What could be the problem? May be I'm missing some configuration?
> >>>
> >>> You might be, but you haven't provided any configuration to us, so we
> >>> don't know if you're missing something. Clearly, something is
> >>> misconfigur

Re: Frequently Getting Service Temporaily availbale message from backend tomcat servers

2012-02-06 Thread Pid
On 06/02/2012 10:26, Amol Puglia wrote:
> Hello ,
> 
> Thanks for the response.
> 
> I am using following worker and no of threads.
> 
> Worker is Prefork and 
> 
> ThreadsPerChild 25
> 
> Below is the details for the same.

Please post your reply below the relevant part of the previous email.
In most email clients this is a case of scrolling down a bit.  Not doing
so leads to 'top-posting' which makes following the conversation flow
harder.

> Server version: Apache/2.2.16 (Unix)
> Server built:   Sep 27 2010 12:48:44
> Server's Module Magic Number: 20051115:24
> Server loaded:  APR 1.4.2, APR-Util 1.3.9
> Compiled using: APR 1.4.2, APR-Util 1.3.9
> Architecture:   32-bit
> Server MPM: Prefork
>   threaded: no
> forked: yes (variable process count)
> 
> 
> StartServers 2
> MaxClients 250
> MinSpareThreads 25
> MaxSpareThreads 75
> ThreadsPerChild 25
> MaxRequestsPerChild  0
> 

Please post prefork.c instead, as that's what you're using.


p


> Timeout 300
> KeepAlive On
> MaxKeepAliveRequests 100
> KeepAliveTimeout 15
> HostnameLookups Off



> 
>  From: Pid 
> To: Tomcat Users List  
> Sent: Monday, February 6, 2012 3:44 PM
> Subject: Re: Frequently Getting Service Temporaily availbale message from 
> backend tomcat servers
>  
> On 06/02/2012 08:58, Amol Puglia wrote:
>> Hello Team,
>>
>> I have configured apache to load balanced six tomcat instances in the 
>> backend using mod_proxy_balance and mod_proxy_ajp modules.
>>
>> I am frequently getting service temporary unavailable message and following 
>> error in the apache error logs.
>>
>> [Mon Feb 06 09:07:28 2012] [error] proxy: BALANCER: (balancer://cluster). 
>> All workers are in error state for route (marsprod_rmiserver_3)
>> [Mon Feb 06 09:07:32 2012] [error] proxy: BALANCER: (balancer://cluster). 
>> All workers are in error state for route (marsprod_rmiserver_3)
>> [Mon Feb 06 09:07:36 2012] [error] proxy: BALANCER: (balancer://cluster). 
>> All workers are in error state for route (marsprod_rmiserver_3)
>> [Mon Feb 06 09:07:37 2012] [error] proxy: BALANCER: (balancer://cluster). 
>> All workers are in error state for route (marsprod_rmiserver_3)
>> [Mon Feb 06 09:07:42 2012] [error] proxy: BALANCER: (balancer://cluster). 
>> All workers are in error state for route (marsprod_rmiserver_3)
>> [Mon Feb 06 09:07:45 2012] [error] proxy: BALANCER: (balancer://cluster). 
>> All workers are in error state for route (marsprod_rmiserver_3)
>> [Mon Feb 06 09:08:02 2012] [error] proxy: BALANCER: (balancer://cluster). 
>> All workers are in error state for route (marsprod_rmiserver_3)
>>
>>
>> I am using following version of apache and tomcat.
>>
>> Apache version :- Apache/2.2.16
>>
>> Tomcat :- 6.0.26
>>
>> Jdk :-1.6.0_24
> 
> Thanks for providing the information above.  You should plan an upgrade
> of each of those ASAP.
> 
> 
>> Below is the configuration of my apache and tomcat.
>>
>> # Port 80
>> Listen server_name:80
>> 
>> 
>>ServerName server_name
>>ServerAlias server_name
>>  ServerAlias server_name
>> 
>>
>> 
>>
>>  Order deny,allow
>>
>>  Deny from all
>>
>>  Allow from 153.88.251.174 153.88.251.160 153.88.251.165 
>> 153.88.251.170 153.88.251.212 153.88.251.199
>>
>>
>>
>>Timeout 1800
>>ProxyTimeout 1800
>>ProxyRequests Off
>>
>>
>> ProxyPass /eMatrix balancer://cluster 
>> stickysession=JSESSIONID|jsessionid nofailover=On
> 
> OK - here is your balancer definition, you'll need to change it to:
> 
> ProxyPass /eMatrix balancer://cluster/eMatrix
> stickysession=JSESSIONID|jsessionid nofailover=On
> 
>> #ProxyPass /eMatrix balancer://cluster stickysession=JSESSIONID 
>> nofailover=On
>>
>> ProxyPreserveHost On
>>
>>
>> ProxyPass /eMatrix ajp://server_name:8009/eMatrix
>>
>> ProxyPass /eMatrix ajp://server_name:8010/eMatrix
>>
>>ProxyPass /eMatrix ajp://server_name:8011/eMatrix
>>
>>ProxyPass /eMatrix ajp://server_name:9009/eMatrix
>>
>>ProxyPass /eMatrix ajp://server_name:9010/eMatrix
>>
>>ProxyPass /eMatrix ajp://server_name:9011/eMatrix
> 
> If you have these lines, they will each override the one above.  So your
> balancer is overridden.
> 
> 
>> ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
>>
>> ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
>>
>> ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix
>>
>> ProxyPassReverse /eMatrix ajp://server_name:9009/eMatrix
>>
>> ProxyPassReverse /eMatrix ajp://server_name:9010/eMatrix
>>
>> ProxyPassReverse /eMatrix ajp://server_name:9011/eMatrix
> 
> The ProxyPassReverse won't be needed.
> 
>> 
>>   BalancerMember ajp://server_name:8009/eMatrix 
>> route=marsprod_rmiserver_1 loadfactor=33 retry=60
>>   BalancerMember ajp://server_name:8010/eMatrix 
>> route

Re: Frequently Getting Service Temporaily availbale message from backend tomcat servers

2012-02-06 Thread André Warnier

Hi.

Amol Puglia wrote:

Hello ,

Thanks for the response.

I am using following worker and no of threads.

Worker is Prefork and 


ThreadsPerChild 25



In the context of a pre-fork Apache, ThreadsPerChild has no meaning and is not 
used.



Below is the details for the same.


Server version: Apache/2.2.16 (Unix)
Server built:   Sep 27 2010 12:48:44
Server's Module Magic Number: 20051115:24
Server loaded:  APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture:   32-bit
Server MPM: Prefork
  threaded: no
forked: yes (variable process count)



The following configuration section will be ignored, because the MPM is not "worker", it 
is "Prefork".  So you need to look at the section , not the one below.




StartServers 2
MaxClients 250
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild  0




The following look ok and resonable.


Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
HostnameLookups Off



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



Re: Frequently Getting Service Temporaily availbale message from backend tomcat servers

2012-02-06 Thread Amol Puglia
Hello ,

Thanks for the response.

I am using following worker and no of threads.

Worker is Prefork and 

ThreadsPerChild 25

Below is the details for the same.


Server version: Apache/2.2.16 (Unix)
Server built:   Sep 27 2010 12:48:44
Server's Module Magic Number: 20051115:24
Server loaded:  APR 1.4.2, APR-Util 1.3.9
Compiled using: APR 1.4.2, APR-Util 1.3.9
Architecture:   32-bit
Server MPM: Prefork
  threaded: no
    forked: yes (variable process count)


StartServers 2
MaxClients 250
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild  0


Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
HostnameLookups Off





 From: Pid 
To: Tomcat Users List  
Sent: Monday, February 6, 2012 3:44 PM
Subject: Re: Frequently Getting Service Temporaily availbale message from 
backend tomcat servers
 
On 06/02/2012 08:58, Amol Puglia wrote:
> Hello Team,
> 
> I have configured apache to load balanced six tomcat instances in the backend 
> using mod_proxy_balance and mod_proxy_ajp modules.
> 
> I am frequently getting service temporary unavailable message and following 
> error in the apache error logs.
> 
> [Mon Feb 06 09:07:28 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:32 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:36 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:37 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:42 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:45 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:08:02 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> 
> 
> I am using following version of apache and tomcat.
> 
> Apache version :- Apache/2.2.16
> 
> Tomcat :- 6.0.26
> 
> Jdk :-1.6.0_24

Thanks for providing the information above.  You should plan an upgrade
of each of those ASAP.


> Below is the configuration of my apache and tomcat.
> 
> # Port 80
>    Listen server_name:80
>    
>    
>       ServerName server_name
>       ServerAlias server_name
>         ServerAlias server_name
>        
> 
> 
> 
>         Order deny,allow
> 
>         Deny from all
> 
>         Allow from 153.88.251.174 153.88.251.160 153.88.251.165 
>153.88.251.170 153.88.251.212 153.88.251.199
> 
>       
> 
>       Timeout 1800
>       ProxyTimeout 1800
>       ProxyRequests Off
> 
> 
>        ProxyPass /eMatrix balancer://cluster 
>stickysession=JSESSIONID|jsessionid nofailover=On

OK - here is your balancer definition, you'll need to change it to:

ProxyPass /eMatrix balancer://cluster/eMatrix
stickysession=JSESSIONID|jsessionid nofailover=On

>        #ProxyPass /eMatrix balancer://cluster stickysession=JSESSIONID 
>nofailover=On
> 
>        ProxyPreserveHost On
> 
> 
>        ProxyPass /eMatrix ajp://server_name:8009/eMatrix
> 
>        ProxyPass /eMatrix ajp://server_name:8010/eMatrix
> 
>       ProxyPass /eMatrix ajp://server_name:8011/eMatrix
> 
>       ProxyPass /eMatrix ajp://server_name:9009/eMatrix
> 
>       ProxyPass /eMatrix ajp://server_name:9010/eMatrix
> 
>       ProxyPass /eMatrix ajp://server_name:9011/eMatrix

If you have these lines, they will each override the one above.  So your
balancer is overridden.


>        ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
> 
>        ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
> 
>        ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix
> 
>        ProxyPassReverse /eMatrix ajp://server_name:9009/eMatrix
> 
>        ProxyPassReverse /eMatrix ajp://server_name:9010/eMatrix
> 
>        ProxyPassReverse /eMatrix ajp://server_name:9011/eMatrix

The ProxyPassReverse won't be needed.

>        
>          BalancerMember ajp://server_name:8009/eMatrix 
>route=marsprod_rmiserver_1 loadfactor=33 retry=60
>          BalancerMember ajp://server_name:8010/eMatrix 
>route=marsprod_rmiserver_2 loadfactor=33 retry=60
>          BalancerMember ajp://server_name:8011/eMatrix 
>route=marsprod_rmiserver_3 loadfactor=33 retry=60
>          BalancerMember ajp://server_name:9009/eMatrix 
>route=marsprod_rmiserver_4 loadfactor=33 retry=60
>          BalancerMember ajp://server_name:9010/eMatrix 
>route=marsprod_rmiserver_5 loadfactor=33 retry=60

Remove the app path from the balancer members:

BalancerMember ajp://server_name:9010 route=marsprod_rmiserver_5
loadfactor=33 retry=60


>          #load balancing performed 

Re: Frequently Getting Service Temporaily availbale message from backend tomcat servers

2012-02-06 Thread Pid
On 06/02/2012 08:58, Amol Puglia wrote:
> Hello Team,
> 
> I have configured apache to load balanced six tomcat instances in the backend 
> using mod_proxy_balance and mod_proxy_ajp modules.
> 
> I am frequently getting service temporary unavailable message and following 
> error in the apache error logs.
> 
> [Mon Feb 06 09:07:28 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:32 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:36 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:37 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:42 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:07:45 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> [Mon Feb 06 09:08:02 2012] [error] proxy: BALANCER: (balancer://cluster). All 
> workers are in error state for route (marsprod_rmiserver_3)
> 
> 
> I am using following version of apache and tomcat.
> 
> Apache version :- Apache/2.2.16
> 
> Tomcat :- 6.0.26
> 
> Jdk :-1.6.0_24

Thanks for providing the information above.  You should plan an upgrade
of each of those ASAP.


> Below is the configuration of my apache and tomcat.
> 
> # Port 80
>Listen server_name:80
>
>
>   ServerName server_name
>   ServerAlias server_name
> ServerAlias server_name
>
> 
> 
> 
> Order deny,allow
> 
> Deny from all
> 
> Allow from 153.88.251.174 153.88.251.160 153.88.251.165 
> 153.88.251.170 153.88.251.212 153.88.251.199
> 
>   
> 
>   Timeout 1800
>   ProxyTimeout 1800
>   ProxyRequests Off
> 
> 
>ProxyPass /eMatrix balancer://cluster 
> stickysession=JSESSIONID|jsessionid nofailover=On

OK - here is your balancer definition, you'll need to change it to:

 ProxyPass /eMatrix balancer://cluster/eMatrix
stickysession=JSESSIONID|jsessionid nofailover=On

>#ProxyPass /eMatrix balancer://cluster stickysession=JSESSIONID 
> nofailover=On
> 
>ProxyPreserveHost On
> 
> 
>ProxyPass /eMatrix ajp://server_name:8009/eMatrix
> 
>ProxyPass /eMatrix ajp://server_name:8010/eMatrix
> 
>   ProxyPass /eMatrix ajp://server_name:8011/eMatrix
> 
>   ProxyPass /eMatrix ajp://server_name:9009/eMatrix
> 
>   ProxyPass /eMatrix ajp://server_name:9010/eMatrix
> 
>   ProxyPass /eMatrix ajp://server_name:9011/eMatrix

If you have these lines, they will each override the one above.  So your
balancer is overridden.


>ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix
> 
>ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix
> 
>ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix
> 
>ProxyPassReverse /eMatrix ajp://server_name:9009/eMatrix
> 
>ProxyPassReverse /eMatrix ajp://server_name:9010/eMatrix
> 
>ProxyPassReverse /eMatrix ajp://server_name:9011/eMatrix

The ProxyPassReverse won't be needed.

>
>  BalancerMember ajp://server_name:8009/eMatrix 
> route=marsprod_rmiserver_1 loadfactor=33 retry=60
>  BalancerMember ajp://server_name:8010/eMatrix 
> route=marsprod_rmiserver_2 loadfactor=33 retry=60
>  BalancerMember ajp://server_name:8011/eMatrix 
> route=marsprod_rmiserver_3 loadfactor=33 retry=60
>  BalancerMember ajp://server_name:9009/eMatrix 
> route=marsprod_rmiserver_4 loadfactor=33 retry=60
>  BalancerMember ajp://server_name:9010/eMatrix 
> route=marsprod_rmiserver_5 loadfactor=33 retry=60

Remove the app path from the balancer members:

 BalancerMember ajp://server_name:9010 route=marsprod_rmiserver_5
loadfactor=33 retry=60


>  #load balancing performed based on number of user requests
>  #ProxySet lbmethod=byrequests
>  # Report server is for Report purpose only so balancing is required 
> now.
>  BalancerMember ajp://server_name:9011/eMatrix 
> route=marsprod_rmiserver_6 loadfactor=33 retry=60
>  ProxySet lbmethod=byrequests
>
> 
>#Status page for balancer
> 
>
>SetHandler balancer-manager
>Order Deny,Allow
>Deny from all
>Allow from all
>   
> 
>   ProxyStatus On
> 
>   
>   SetHandler server-status
>   Order Deny,Allow
>   Deny from all
>   Allow from all
>   
> 
>   ErrorLog /opt/web/apache/app/mxora/logs/error.log
> 
>  
> 
> 
> Tomcat Configuration Server.xml
> 
> 
>  protocol="org.apache.coyote.http11.Http11AprProtocol"
> maxHttpHeaderSize="8192"
> maxThreads="60"
> maxPostSize="0"
> 

Re: Dependencies on extensions functionality

2012-02-06 Thread Pid
On 05/02/2012 15:03, Violeta Georgieva wrote:
> Hi,
> 
> As I wrote I'm placing the extension jar in "C:\apache-tomcat-7.0.25\ext".
> I tried the following: I specified "C:\apache-tomcat-7.0.25\lib" as value
> for "catalina.ext.dirs" property and now the web application is working.
> 
> But then I have two questions:
> 
> - Do we need "catalina.ext.dirs" at all if we can use only Tomcat's
> classpath dirs? Let's look through them instead of introducing additional
> property.

I was going to ask you why you were using it!  So is your interest
purely academic?


> - Does this mean that we can use only Tomcat's classpath dirs and we cannot
> specify a custom directory for these extensions?

It should work.  (As per Konstantin's message)


p


> Thanks
> Violeta
> 
> 2012/2/5 Pid 
> 
>> On 04/02/2012 21:02, Violeta Georgieva wrote:
>>> Hi,
>>>
>>> Here is how one can reproduce the scenario:
>>>
>>> 1. Start Tomcat
>>> 2. Put attached war in webapps folder
>>> 3. In the console the following error message is printed:
>>
>> In the example above, where have you placed the extension?  Is it in one
>> of Tomcat's classpath directories?
>>
>>
>> p
>>
>>> INFO: Deploying web application archive
>>> C:\apache-tomcat-7.0.25\webapps\test-web-app.war
>>> Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
>>> validateManifestResources
>>> INFO: ExtensionValidator[/test-web-app][Web Application Manifest]:
>>> Required extension [test-jar] not found.
>>> Feb 4, 2012 10:41:44 PM org.apache.catalina.util.ExtensionValidator
>>> validateManifestResources
>>> INFO: ExtensionValidator[/test-web-app]: Failure to find [1] required
>>> extension(s).
>>> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
>>> startInternal
>>> SEVERE: Error getConfigured
>>> Feb 4, 2012 10:41:44 PM org.apache.catalina.core.StandardContext
>>> startInternal
>>> SEVERE: Context [/test-web-app] startup failed due to previous errors
>>>
>>> 4. Stop Tomcat
>>> 5. Create folder - C:\apache-tomcat-7.0.25\ext
>>> 6. Put the attached jar file in the folder created on step 5
>>> 7. Start Tomcat with additional VM argument
>>> -Dcatalina.ext.dirs=C:/apache-tomcat-7.0.25/ext
>>> 8. This time the application is deployed successfully.
>>> 9. Request http://localhost:8080/test-web-app/TestServlet
>>> 10. Internal Server Error is returned with the following Exception:
>>>
>>>
>>> java.lang.ClassNotFoundException: test.TestExtension
>>>
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1701)
>>>
>> org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1546)
>>>   test.TestServlet.doGet(TestServlet.java:28)
>>>   javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>>>   javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
>>>
>>> I did not change any other Tomcat configuration so it is running with
>>> defaults.
>>>
>>> The scenario is that TestServlet (in war file) instantiates
>>> TestExtension (in jar file, placed in the ext directory).
>>>
>>> Regards
>>> Violeta
>>> 2012/2/4 Christopher Schultz >> >
>>>
>>> Violetta,
>>>
>>> On 2/3/12 8:25 AM, Violeta Georgieva wrote:
 I have a web application that specifies in the Manifest that wants
 to use an extension.
>>>
 I specify "catalina.ext.dirs" to point to the directory where I
 placed my extensions jar files.
>>>
>>> What is the value of the catalina.ext.dirs system property? Where did
>>> you set it? Can you verify that it is set when the JVM actually starts?
>>>
>>> What files are in the directory or directories specified by
>>> catalina.ext.dir?
>>>
 Unfortunately when I request my application I'm receiving
 "ClassNotFoundException".
>>>
>>> What class cannot be found? Is it found in any of the JAR files you
>>> have in your catalina.ext.dir (which is, of course, the whole point of
>>> the feature)?
>>>
 I verified that
>>>
 ExtensionValidator.validateApplication() succeeded to find the
 extension jar file.
>>>
>>> How did you verify this? Are there logs that suggest your JAR file is
>>> being scanned? Please provide them.
>>>
 What could be the problem? May be I'm missing some configuration?
>>>
>>> You might be, but you haven't provided any configuration to us, so we
>>> don't know if you're missing something. Clearly, something is
>>> misconfigured.
>>>
>>> -chris
>>>
>>> -
>>> 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
>>
>> --
>>
>> [key:6259

Re: [OT] problems with performance with IIS 7.5 and Tomcat Connector

2012-02-06 Thread Pid
On 05/02/2012 19:59, Bilal S wrote:
> On Thu, Feb 2, 2012 at 3:38 PM, Mark Thomas  wrote:
> 
>> On 02/02/2012 20:19, Bilal S wrote:
>>> I am willing to learn but finding the Apache related processes
>>> singularly difficult to deal with. We are working with mailing list,
>>> in the age of websites and social media.
>>
>> Correct. This is deliberate. Mailing lists are the lowest common
>> denominator and allow the widest possible participation. Not everyone
>> has an always on internet connection with high bandwidth.
> 
> è Thanks for clarifying. Is the goal to design for the lowest common
> dominator? This would mean that if 99% of  the user base had access to
> better tools and 1% did not you would design for the 1%?

So you would prefer to exclude the minority?

Are you saying that every time a new toolset or medium comes along, the
ASF should wholesale move it's communications (and archive) to the new
platform?


> If so, this would be a disservice to the user community, wouldn’t it?

No, because it's based on a false premise.


> There are more improved design principles that have found use on the web
> for the last decade and have proven to serve their user base better. For
> example, either graceful degradation or progressive enhancement would be
> able to help the whole population without sacrifice. Why not adopt one at
> the ASF?

'Design principles' don't serve 'user bases'.

You are just, rather verbosely, leading up to saying that you think that
web forums are better than mailing lists.

There are any number of public websites that already integrate with the
ASF mailing lists, providing that experience for those who prefer it.

The ASF does not have unlimited resources to run additional services.

There are none, zero, not one widely used forum software that is a)
free* and b) can be installed by the ASF that has 'graceful degradation'
or 'progressive enhancement' out of the box.

NB  StackExchange** wrote a whole new platform* because of this and
other reasons of dissatisfaction with the state of forum type software.

If you wish to start a new forum project with this goal, write a
proposal for the Apache Incubator.



*   Or likely to be free to the ASF

**  I occasionally drop into the Tomcat questions area of StackExchange
and am put off by the endless series of inaccurate and misleading
answers. Pus, I don't like the ranking schemes in most forums.


>> For those
>> folks with bandwidth to spare that prefer a forum interface, there are
>> third parties that provide it. I love that the tools we use at the ASF
>> work just as well when I (or anyone else) is at the end of a very slow
>> mobile data connection in the middle of almost nowhere even though
>> trying to view a web page from the same place is pretty much impossible
>> these days.
> 
> è
> 
> Also not sure that the issue of better and easier to use tools and
> communication is a bandwidth problem alone, and thus, concluding that
> people with low bandwidth would prefer email as lone mechanism of
> communication does not follow automatically. There are rich experiences
> possible for people with low bandwidth connections. Apps running in
> browsers making use of partial connections, local storage and enhanced
> programmability have blown this boundary a while ago. Similarly, on the
> mobile side, there are smart apps aware of connectivity. There are many
> examples, but I would like to point at Google for example implementations.
> A quick tour of google mobile apps and google groups online shows well
> designed interaction for any bandwidth. Why can’t this be a goal at ASF?

You can't possibly be claiming that browser local storage - a technology
that is patchily, variably and incompabitibly supported at best - is
somehow a solution to the vague problem you seem to be describing?


Also, I really don't know why you are directing generic questions about
the ASF to the Tomcat Users mailing list.

It's easy to criticise, but have you really taken the trouble to
understand the history of the ASF, how it works, or what you're asking?

 http://apache.org/foundation/how-it-works.html


>>> There is no easy to find contact form anywhere on the Apache
>>> websites.
>>
>> Also correct. The primary form of communication within Apache
>> communities are the mailing lists and these should be obviously linked
>> from each project's home page. In Tomcat's case, you'll find the forum
>> based interfaces linked from the same place.
>>
>> è
> Thanks for clarifying. Thus, I am challenging ASF to be more open and do
> better than mailing list. Why would running users to a gauntlet to be able
> to talk someone be considered effective or desirable for an organization
> promoting openness? It may reduce email volumes but wouldn't hide the true
> issues?

More open than a public mailing list?

How is joining a public mailing list 'running the gauntlet'?

How is it worse than being required to fill in a membership form?

I have no idea how or why anyone woul

Frequently Getting Service Temporaily availbale message from backend tomcat servers

2012-02-06 Thread Amol Puglia
Hello Team,

I have configured apache to load balanced six tomcat instances in the backend 
using mod_proxy_balance and mod_proxy_ajp modules.

I am frequently getting service temporary unavailable message and following 
error in the apache error logs.

[Mon Feb 06 09:07:28 2012] [error] proxy: BALANCER: (balancer://cluster). All 
workers are in error state for route (marsprod_rmiserver_3)
[Mon Feb 06 09:07:32 2012] [error] proxy: BALANCER: (balancer://cluster). All 
workers are in error state for route (marsprod_rmiserver_3)
[Mon Feb 06 09:07:36 2012] [error] proxy: BALANCER: (balancer://cluster). All 
workers are in error state for route (marsprod_rmiserver_3)
[Mon Feb 06 09:07:37 2012] [error] proxy: BALANCER: (balancer://cluster). All 
workers are in error state for route (marsprod_rmiserver_3)
[Mon Feb 06 09:07:42 2012] [error] proxy: BALANCER: (balancer://cluster). All 
workers are in error state for route (marsprod_rmiserver_3)
[Mon Feb 06 09:07:45 2012] [error] proxy: BALANCER: (balancer://cluster). All 
workers are in error state for route (marsprod_rmiserver_3)
[Mon Feb 06 09:08:02 2012] [error] proxy: BALANCER: (balancer://cluster). All 
workers are in error state for route (marsprod_rmiserver_3)


I am using following version of apache and tomcat.

Apache version :- Apache/2.2.16

Tomcat :- 6.0.26

Jdk :-1.6.0_24

Below is the configuration of my apache and tomcat.

# Port 80
   Listen server_name:80
   
   
  ServerName server_name
  ServerAlias server_name
    ServerAlias server_name
   



    Order deny,allow

    Deny from all

    Allow from 153.88.251.174 153.88.251.160 153.88.251.165 153.88.251.170 
153.88.251.212 153.88.251.199

  

  Timeout 1800
  ProxyTimeout 1800
  ProxyRequests Off


   ProxyPass /eMatrix balancer://cluster 
stickysession=JSESSIONID|jsessionid nofailover=On
   #ProxyPass /eMatrix balancer://cluster stickysession=JSESSIONID 
nofailover=On

   ProxyPreserveHost On


   ProxyPass /eMatrix ajp://server_name:8009/eMatrix

   ProxyPass /eMatrix ajp://server_name:8010/eMatrix

  ProxyPass /eMatrix ajp://server_name:8011/eMatrix

  ProxyPass /eMatrix ajp://server_name:9009/eMatrix

  ProxyPass /eMatrix ajp://server_name:9010/eMatrix

  ProxyPass /eMatrix ajp://server_name:9011/eMatrix

   ProxyPassReverse /eMatrix ajp://server_name:8009/eMatrix

   ProxyPassReverse /eMatrix ajp://server_name:8010/eMatrix

   ProxyPassReverse /eMatrix ajp://server_name:8011/eMatrix

   ProxyPassReverse /eMatrix ajp://server_name:9009/eMatrix

   ProxyPassReverse /eMatrix ajp://server_name:9010/eMatrix

   ProxyPassReverse /eMatrix ajp://server_name:9011/eMatrix

   
 BalancerMember ajp://server_name:8009/eMatrix 
route=marsprod_rmiserver_1 loadfactor=33 retry=60
 BalancerMember ajp://server_name:8010/eMatrix 
route=marsprod_rmiserver_2 loadfactor=33 retry=60
 BalancerMember ajp://server_name:8011/eMatrix 
route=marsprod_rmiserver_3 loadfactor=33 retry=60
 BalancerMember ajp://server_name:9009/eMatrix 
route=marsprod_rmiserver_4 loadfactor=33 retry=60
 BalancerMember ajp://server_name:9010/eMatrix 
route=marsprod_rmiserver_5 loadfactor=33 retry=60
 #load balancing performed based on number of user requests
 #ProxySet lbmethod=byrequests
 # Report server is for Report purpose only so balancing is required 
now.
 BalancerMember ajp://server_name:9011/eMatrix 
route=marsprod_rmiserver_6 loadfactor=33 retry=60
 ProxySet lbmethod=byrequests
   

   #Status page for balancer

   
   SetHandler balancer-manager
   Order Deny,Allow
   Deny from all
   Allow from all
  

  ProxyStatus On

  
  SetHandler server-status
  Order Deny,Allow
  Deny from all
  Allow from all
  

  ErrorLog /opt/web/apache/app/mxora/logs/error.log

 


Tomcat Configuration Server.xml


    


    
    



Kindly help me to trobleshoot the issue.

Re: tomcat 7.0.25 - tomcat7 //US//.... ++jmvOptions broken ??

2012-02-06 Thread Mark Thomas
On 06/02/2012 04:53, Caldarale, Charles R wrote:
>> From: Dan Tran [mailto:dant...@gmail.com] 
>> Subject: Re: tomcat 7.0.25 - tomcat7 //US// ++jmvOptions broken ??
> 
>> it seems procrun already fixed this issue at its end.
> 
> Only in SVN, no new commons-daemon releases yet.
> 
>> does tomcat team has a tentative schedule date for 7.0.26?
> 
> Usually about once a month, and the last one was 21 January.  You can apply 
> the workaround here while you're waiting:
> 
> https://issues.apache.org/bugzilla/show_bug.cgi?id=52548

I've been a little slower on the releases the last few months. The aim
is still once a month but I don't always make it.

Mladen has proposed a Commons Daemon release later this week. Once that
completes I'll pull it into 7.0.x and start looking at a 7.0.x release.

Mark

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



Re: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Lev A KARATUN
John,

unfortunately, I can't neither open symlinks via my browser (404) nor see 
them in the file list.


John Renne  wrote on 03.02.2012 18:54:37:

> John Renne  
> 03.02.2012 18:55
> 
> Please respond to
> "Tomcat Users List" 
> 
> To
> 
> "Tomcat Users List" 
> 
> cc
> 
> Subject
> 
> Re: How can I access tomcat's logs using my jsp?
> 
> I've done this before but always used the apache in front of tomcat 
> to serve the logfiles. 
> 
> If you're sure you want to let tomcat do the fileserving, I'ld 
> suggest making a symlink in one of the application folders to the 
> logsdirectory. That should do the trick. 
> 
> John
> 
> On Feb 3, 2012, at 2:53 PM, Lev A KARATUN wrote:
> 
> > Hello!
> > 
> > I'm administering an application running on Tomcat 6.0.0.29. OS is AIX 

> > 5.3. 
> > 
> > I'm trying to write a simple jsp to make some superusers able to 
download 
> > tomcat logs via browser after entering a password. (In my organization 

> > it's not permitted to give anyone the "manager" role)
> > I've already managed to get a list log-files' names (just copied 
someone's 
> > part of code and made some adjustments), but when I'm trying to make 
> > download links, I don't know how can I specify the path to 
> > /$CATALINA_BASE/logs via my web-browser. As far as I can see, I can 
reach 
> > only folders like /$CATALINA_BASE/webapps/myapp upon entering the link 

> > http://myhost:port/myapp.
> > 
> > So, the question is - how can I access tomcat's logs using my jsp?
> > 
> > 
> > Thanks in advance.
> > 
> > Best Regards, 
> > Karatun Lev
> > 
> > 
> > ---
> > This message and any attachment are confidential and may be 
> privileged or otherwise protected from disclosure. If you are not 
> the intended recipient any use, distribution, copying or disclosure 
> is strictly prohibited. If you have received this message in error, 
> please notify the sender immediately either by telephone or by e-
> mail and delete this message and any attachment from your system. 
> Correspondence via e-mail is for information purposes only. ZAO 
> Raiffeisenbank neither makes nor accepts legally binding statements 
> by e-mail unless otherwise agreed. 
> > ---
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 



---
This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient any 
use, distribution, copying or disclosure is strictly prohibited. If you have 
received this message in error, please notify the sender immediately either by 
telephone or by e-mail and delete this message and any attachment from your 
system. Correspondence via e-mail is for information purposes only. ZAO 
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail 
unless otherwise agreed. 
---

Re: How can I access tomcat's logs using my jsp?

2012-02-06 Thread Lev A KARATUN
Andre,

thanks for precaution, I'll check the docs.

Best Regards, 
Karatun Lev,
RBRU IT Application Support ,
(495) 5464



André Warnier  
06.02.2012 12:04
Please respond to
"Tomcat Users List" 


To
Tomcat Users List 
cc

Subject
Re: How can I access tomcat's logs using my jsp?






Lev A KARATUN wrote:
> Andre,
> 
> but if a symbolic link is deleted, its target remains unaffected. Are 
you 
> sure that undeployment can damage my logs somehow?
> 
I'd have to dig through the documentation (which you can also do).  But I 
am pretty sure 
that up to some version, Tomcat by default first deleted the *content* of 
whatever was 
pointed to by the symbolic link (in this case, the log directory), then 
the symbolic link 
itself.
As I recall, this behaviour was changed at some point, but maybe only when 
some parameter 
is specified.
The "Deployment" section of the Tomcat on-line documentation would be the 
place to start.

Anyway, the way (or a way) to go to do this properly has been indicated in 
a previous 
message by Chuck (the one where he rectified my own sloppy scenario).

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





---
This message and any attachment are confidential and may be privileged or 
otherwise protected from disclosure. If you are not the intended recipient any 
use, distribution, copying or disclosure is strictly prohibited. If you have 
received this message in error, please notify the sender immediately either by 
telephone or by e-mail and delete this message and any attachment from your 
system. Correspondence via e-mail is for information purposes only. ZAO 
Raiffeisenbank neither makes nor accepts legally binding statements by e-mail 
unless otherwise agreed. 
---

Re: How can I access tomcat's logs using my jsp?

2012-02-06 Thread André Warnier

Lev A KARATUN wrote:

Andre,

but if a symbolic link is deleted, its target remains unaffected. Are you 
sure that undeployment can damage my logs somehow?


I'd have to dig through the documentation (which you can also do).  But I am pretty sure 
that up to some version, Tomcat by default first deleted the *content* of whatever was 
pointed to by the symbolic link (in this case, the log directory), then the symbolic link 
itself.
As I recall, this behaviour was changed at some point, but maybe only when some parameter 
is specified.

The "Deployment" section of the Tomcat on-line documentation would be the place 
to start.

Anyway, the way (or a way) to go to do this properly has been indicated in a previous 
message by Chuck (the one where he rectified my own sloppy scenario).


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