Java Mailing List Archive

http://www.junlu.com/

Home » users-digest.tomcat »

users Digest 7 Feb 2012 17:14:41 -0000 Issue 10794

users-digest-help

2012-02-07


Author LoginPost Reply

users Digest 7 Feb 2012 17:14:41 -0000 Issue 10794

Topics (messages 231841 through 231865):

Re: Client Authentication--getting certificate information on the server side
 231841 by: Pid
 231842 by: Sanjeev Sharma
 231848 by: Christopher Schultz

Re: starting connectors after the tomcat startup
 231843 by: Pradeep Fernando

Re: [OT] Dependencies on extensions functionality
 231844 by: Christopher Schultz

Re: Dependencies on extensions functionality
 231845 by: Christopher Schultz
 231847 by: Violeta Georgieva
 231850 by: Christopher Schultz
 231851 by: Violeta Georgieva

Re: Clustering and https configuration
 231846 by: Christopher Schultz
 231852 by: Pid

Odd interface binding observations
 231849 by: Christopher Schultz
 231853 by: Konstantin Kolinko

Web app calls JMS over SSL - certificates
 231854 by: Peter Kleczka
 231857 by: Pid
 231863 by: Peter Kleczka
 231864 by: Caldarale, Charles R

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

Re: How can I access tomcat's logs using my jsp?
 231856 by: Lev A KARATUN
 231858 by: André Warnier
 231859 by: Pid
 231860 by: André Warnier
 231861 by: André Warnier

All-in-One Toolbar (TV, Radio, Games, BlogNews, Tools, etc.) and FREE!
 231862 by: yupibar

Running Tomcat on Port 80 with Fedora 16 without IP tables redirect
 231865 by: Ole Ersoy

Administrivia:

---------------------------------------------------------------------
To post to the list, e-mail: users@(protected)
To unsubscribe, e-mail: users-digest-unsubscribe@(protected)
For additional commands, e-mail: users-digest-help@(protected)

----------------------------------------------------------------------


Attachment: users_231841.ezm (zipped)
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:
>
> <Connector port="443"
>        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 :
>
>   <login-config>
>      <auth-method>CLIENT-CERT</auth-method>
>      <realm-name>PKI Enabled App</realm-name>
>   </login-config>
>
> 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]


Attachment: signature.asc (zipped)
Attachment: users_231842.ezm (zipped)
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:pid@(protected)]
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:
>
> <Connector port="443"
>        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 :
>
>   <login-config>
>      <auth-method>CLIENT-CERT</auth-method>
>      <realm-name>PKI Enabled App</realm-name>
>   </login-config>
>
> 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]


Attachment: users_231848.ezm (zipped)
-----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-----


Attachment: users_231843.ezm (zipped)
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


Attachment: users_231844.ezm (zipped)
-----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-----


Attachment: users_231845.ezm (zipped)
-----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-----


Attachment: users_231847.ezm (zipped)
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 <chris@(protected)>

> -----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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_231850.ezm (zipped)
-----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-----


Attachment: users_231851.ezm (zipped)
>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 <chris@(protected)>

> -----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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_231846.ezm (zipped)
-----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 <Cluster> 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 <Cluster> 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-----


Attachment: users_231852.ezm (zipped)
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 <Cluster> 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 <Cluster> capabilities.
>
> * Use a secure VPN with multicast enabled on that interface
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>

--

[key:62590808]


Attachment: signature.asc (zipped)
Attachment: users_231849.ezm (zipped)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

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

  <Connector port="8187"
         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 ::ffff:127.0.0.1:8187  :::*
LISTEN   2737/java

Also:

$ host localhost
localhost.chadis.com  A  [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-----


Attachment: users_231853.ezm (zipped)
2012/2/6 Christopher Schultz <chris@(protected)>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> All,
>
> During a recent production deployment (Debian Linux), we added a
> localhost-only connector like this:
>
>    <Connector port="8187"
>               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 ::ffff:127.0.0.1:8187   :::*

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

> 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


Attachment: users_231854.ezm (zipped)
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?

Thanks kindly in advance.

Attachment: users_231857.ezm (zipped)
On 6 Feb 2012, at 23:10, Peter Kleczka <pkleczka@(protected):

> 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.


Attachment: users_231863.ezm (zipped)
I am using ActiveMQ and its activemq.xml file has a section where the
keystore and truststore point to those files. So I assume that means that
there is a way to set these at runtime. Still leaves me with the question
of whether I can set these at runtime from my app on Tomcat.

On Mon, Feb 6, 2012 at 11:50 PM, Pid * <pid@(protected):

> On 6 Feb 2012, at 23:10, Peter Kleczka <pkleczka@(protected):
>
> > 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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>
>

Attachment: users_231864.ezm (zipped)
> From: Peter Kleczka [mailto:pkleczka@(protected)]
> Subject: Re: Web app calls JMS over SSL - certificates

> I am using ActiveMQ and its activemq.xml file has a section where the
> keystore and truststore point to those files. So I assume that means that
> there is a way to set these at runtime.

That would be a topic for the ActiveMQ group; nothing to do with Tomcat.

- 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.



Attachment: users_231855.ezm (zipped)
> 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


Attachment: users_231856.ezm (zipped)
Charles,

I made the adjustments and it works now.

Thank you!

Best Regards,
Karatun Lev,


"Caldarale, Charles R" <Chuck.Caldarale@(protected)
18:41:18:

> "Caldarale, Charles R" <Chuck.Caldarale@(protected)>
> 06.02.2012 18:42
>
> Please respond to
> "Tomcat Users List" <users@(protected)>
>
> To
>
> Tomcat Users List <users@(protected)>
>
> cc
>
> Subject
>
> RE: How can I access tomcat's logs using my jsp?
>
> > From: Lev A KARATUN [mailto:Lev.KARATUN@(protected)]
> > 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):
>
>      <servlet-name>logsdefault</servlet-name>
>
> and add a <servlet-mapping> for it:
>
>   <servlet-mapping>
>      <servlet-name>logsdefault</servlet-name>
>      <url-pattern>/</url-pattern>
>   </servlet-mapping>
>
> Tomcat 6 does not allow you to override the <servlet-name> 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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>



-----------------------------------
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.
-----------------------------------

Attachment: users_231858.ezm (zipped)
For once, it may be best to top-post.

Anyone feels like making a FAQ out of this thread ?
It looks like a generic-enough question and answer.



Lev A KARATUN wrote:
> Charles,
>
> I made the adjustments and it works now.
>
> Thank you!
>
> Best Regards,
> Karatun Lev,
>
>
> "Caldarale, Charles R" <Chuck.Caldarale@(protected)
> 18:41:18:
>
>> "Caldarale, Charles R" <Chuck.Caldarale@(protected)>
>> 06.02.2012 18:42
>>
>> Please respond to
>> "Tomcat Users List" <users@(protected)>
>>
>> To
>>
>> Tomcat Users List <users@(protected)>
>>
>> cc
>>
>> Subject
>>
>> RE: How can I access tomcat's logs using my jsp?
>>
>>> From: Lev A KARATUN [mailto:Lev.KARATUN@(protected)]
>>> 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):
>>
>>      <servlet-name>logsdefault</servlet-name>
>>
>> and add a <servlet-mapping> for it:
>>
>>   <servlet-mapping>
>>      <servlet-name>logsdefault</servlet-name>
>>      <url-pattern>/</url-pattern>
>>   </servlet-mapping>
>>
>> Tomcat 6 does not allow you to override the <servlet-name> 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-unsubscribe@(protected)
>> For additional commands, e-mail: users-help@(protected)
>>
>
>
>
> -----------------------------------
> 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.
> -----------------------------------



Attachment: users_231859.ezm (zipped)
On 07/02/2012 09:07, André Warnier wrote:
> For once, it may be best to top-post.
>
> Anyone feels like making a FAQ out of this thread ?
> It looks like a generic-enough question and answer.

I don't think I want to encourage publishing logs via the same
container. I've seen all sorts of private data published in log files.


p

> Lev A KARATUN wrote:
>> Charles,
>>
>> I made the adjustments and it works now.
>>
>> Thank you!
>>
>> Best Regards, Karatun Lev,
>>
>>
>> "Caldarale, Charles R" <Chuck.Caldarale@(protected)
>> 06.02.2012 18:41:18:
>>
>>> "Caldarale, Charles R" <Chuck.Caldarale@(protected)
>>>
>>> Please respond to
>>> "Tomcat Users List" <users@(protected)>
>>>
>>> To
>>>
>>> Tomcat Users List <users@(protected)>
>>>
>>> cc
>>>
>>> Subject
>>>
>>> RE: How can I access tomcat's logs using my jsp?
>>>
>>>> From: Lev A KARATUN [mailto:Lev.KARATUN@(protected):
>>>> 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):
>>>
>>>      <servlet-name>logsdefault</servlet-name>
>>>
>>> and add a <servlet-mapping> for it:
>>>
>>>   <servlet-mapping>
>>>      <servlet-name>logsdefault</servlet-name>
>>>      <url-pattern>/</url-pattern>
>>>   </servlet-mapping>
>>>
>>> Tomcat 6 does not allow you to override the <servlet-name> 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-unsubscribe@(protected)
>>> For additional commands, e-mail: users-help@(protected)
>>>
>>
>>
>>
>> -----------------------------------
>> 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-unsubscribe@(protected)
> For additional commands, e-mail: users-help@(protected)
>


--

[key:62590808]


Attachment: signature.asc (zipped)
Attachment: users_231860.ezm (zipped)
Pid wrote:
> On 07/02/2012 09:07, André Warnier wrote:
>> For once, it may be best to top-post.
>>
>> Anyone feels like making a FAQ out of this thread ?
>> It looks like a generic-enough question and answer.
>
> I don't think I want to encourage publishing logs via the same
> container. I've seen all sorts of private data published in log files.
>
I wasn't talking about "logs" per se (I agree on that one).
What I meant was more like :

How-To : create a simple "webapp" which publishes the content of an arbitrary directory
containing static documents, without having to write a special-purpose JSP page or
servlet, and without compromising security.

At the same time, it is almost a book-perfect example of what can be done with the normal
webapp deployment rules, where to put a context file, what the default servlet does, etc..




Attachment: users_231861.ezm (zipped)
André Warnier wrote:
> Pid wrote:
>> On 07/02/2012 09:07, André Warnier wrote:
>>> For once, it may be best to top-post.
>>>
>>> Anyone feels like making a FAQ out of this thread ?
>>> It looks like a generic-enough question and answer.
>>
>> I don't think I want to encourage publishing logs via the same
>> container. I've seen all sorts of private data published in log files.
>>
> I wasn't talking about "logs" per se (I agree on that one).
> What I meant was more like :
>
> How-To : create a simple "webapp" which publishes the content of an
> arbitrary directory containing static documents, without having to write
> a special-purpose JSP page or servlet, and without compromising security.
>
> At the same time, it is almost a book-perfect example of what can be
> done with the normal webapp deployment rules, where to put a context
> file, what the default servlet does, etc..
>
>
Now one more question about this :
Suppose someone follows exactly the steps outlined by Chuck before.
And then suppose that through the Manager, one triggers an "un-deploy" of this application.
Will Tomcat then delete all the files inside that directory ?
And if yes, is there a way to prevent that ?


Attachment: users_231862.ezm (zipped)
Yupibar - When the global information becomes an easy task.


The most complete worldwide toolbar on the Internet is ready.
A press, information, recreational and productive tool for everyone.


2300+ World TV Channels
4500+ Radio Stations
1400+ Games Online
World Newspapers, Magazines
Blog News, Streaming News
Tools for each job (File Converters, Photo Editors, Translation, Dictionaries, Movie Subtitles, Software, and much more ...)
100% Safe! & FREE!


Homepage: http://yupibar.blogspot.com
Download: http://yupibar.ourtoolbar.com


SPREAD it to your friends, your blogs, social networks, EVERYWHERE.




If you believe that this mail message is annoying you can sent to us a message to unsubscribe from our mail list.


Attachment: users_231865.ezm (zipped)
Hi,

In the past I have been able to run tomcat on port 80 under a "tomcat" user. It seems like the latest versions of Fedora require that tomcat either be run as root or requests to 8080 have to be redirected using iptables.  Can anyone confirm this?

TIA,
- Ole

©2008 junlu.com - Jax Systems, LLC, U.S.A.