RE: 2 Way SSL integration with Webservices - Inbound connection not trusted

2017-08-15 Thread Macca, Diego
Hi,
I didn't know that clientauth is deprecated in 8.5. We still use the good 8.

I have understood that your tomcat receive connections, not act as a client.

If it a server you configure the truststore in tomcat itself (and we also 
configure it in the JVM but should not be needed), if it act as a client 
originating the connection then you need to configure the truststore at the JVM 
level in the Catalina options.


Best regards,
Diego Macca

From: Vinoth Raja <rbvdvin...@gmail.com<mailto:rbvdvin...@gmail.com>>
Date: Tuesday, 15. Aug 2017, 5:42 PM
To: Tomcat Users List <users@tomcat.apache.org<mailto:users@tomcat.apache.org>>
Subject: Re: 2 Way SSL integration with Webservices - Inbound connection not 
trusted

Hi Diego,

Thanks.
clientAuth="true" Is not valid attribute for connector in tomcat 8.5.15. I
have tried setting certificateVerifucation as required but application URL
is not reachable and it was complaining about certificate.

Can I set the truststore in SSLContext before making outbound call?.will it
trust the client request.

Let me enable SSL debug and check the log as well.


Thanks
Vinoth


On Tuesday, August 15, 2017, Macca, Diego <diego.ma...@ecb.int> wrote:

> Hi,
> You need to set clientAuth="true" in the connector or, for some reason
> unknown to me (probably something changed in Java from rel. 6/7 on), Tomcat
> will not enforce the 2 way ssl.
>
> You can see what is going on (certificates exchange) with an ssl debug.
>
> Kind Regards,
> Diego Macca
> Senior IT Specialist
>
> DG-IS/EDA - Executional Domain Applications
> EUROPEAN CENTRAL BANK
> Tel.: +49 (69) 1344 6991
> E-mail: diego.ma...@ecb.europa.eu <javascript:;>
> www.ecb.europa.eu<http://www.ecb.europa.eu>
> www.youtube.com/ecbeuro<http://www.youtube.com/ecbeuro>
> https://twitter.com/ecb
>
>
> -Original Message-
> From: Vinoth Raja [mailto:rbvdvin...@gmail.com <javascript:;>]
> Sent: 15 August 2017 10:50
> To: Tomcat Users List
> Subject: 2 Way SSL integration with Webservices - Inbound connection not
> trusted
>
> Hi,
>
> Please advise on the step to resolve the issue encountered in 2way SSL
>
> Tomcat version used : apache-tomcat-8.5.15 Java Version used: jdk1.8.0_131
>
> *Problem statement: *Tomcat doesn't trust the inbound connection.
>
> We have web application deployed in tomcat and it integrated with web
> services.
> 2 way SSL is enabled.
> Webservice client deployed in Tomcat send the certificate to webservices
> and it is trusted.
> Tomcat doesn't trust certificate sent by the webservices.
> It seems to ignore the client validation and allow the communication.
>
> *step followed to implement 2 way SSL from application*
>
> We set the keystore and trust store to be used for communication. so it
> takes the cert from key store for outbound and trust the cert for inbound
> connections.
>
>System.setProperty("javax.net.ssl.trustStoreType", "JKS");
> System.setProperty("javax.net.ssl.keyStoreType", "JKS");
> System.setProperty("javax.net.ssl.trustStore","TrustStore.jks");
> System.setProperty("javax.net.ssl.keyStore","KeyStore.jks");
> System.setProperty("javax.net.ssl.trustStorePassword","changeit");
> System.setProperty("javax.net.ssl.keyStorePassword","changeit");
>
> It sends the certificate for other system to trust but it doesn't trust
> the incoming connection.
>
>
> Please advise on the configuration to trust the incoming connection.
>
>
> Thanks
> Vinoth
> Any e-mail message from the European Central Bank (ECB) is sent in good
> faith, but shall neither be binding nor construed as constituting a
> commitment by the ECB except where provided for in a written agreement.
> This e-mail is intended only for the use of the recipient(s) named above.
> Any unauthorised disclosure, use or dissemination, either in whole or in
> part, is prohibited. If you have received this e-mail in error, please
> notify the sender immediately via e-mail and delete this e-mail from your
> system. The ECB processes personal data in line with Regulation (EC) No
> 45/2001 and Decision ECB/2007/1. For any further information you can
> consult the Data Protection Disclaimer on the ECB webpage. In case of
> queries, please contact the ECB Data Protection Officer (d...@ecb.europa.eu
> <javascript:;>). You may also contact the European Data Protection
> Supervisor.
>
Any e-mail message from the European Central Bank (ECB) is sent in good faith, 
but shall neither be binding nor construed as constituting a commitment by the 
ECB except where provided for in a written agreement. This e-ma

RE: 2 Way SSL integration with Webservices - Inbound connection not trusted

2017-08-15 Thread Macca, Diego
Hi,
You need to set clientAuth="true" in the connector or, for some reason unknown 
to me (probably something changed in Java from rel. 6/7 on), Tomcat will not 
enforce the 2 way ssl.

You can see what is going on (certificates exchange) with an ssl debug.

Kind Regards,
Diego Macca
Senior IT Specialist

DG-IS/EDA - Executional Domain Applications
EUROPEAN CENTRAL BANK
Tel.: +49 (69) 1344 6991
E-mail: diego.ma...@ecb.europa.eu
www.ecb.europa.eu
www.youtube.com/ecbeuro
https://twitter.com/ecb


-Original Message-
From: Vinoth Raja [mailto:rbvdvin...@gmail.com]
Sent: 15 August 2017 10:50
To: Tomcat Users List
Subject: 2 Way SSL integration with Webservices - Inbound connection not trusted

Hi,

Please advise on the step to resolve the issue encountered in 2way SSL

Tomcat version used : apache-tomcat-8.5.15 Java Version used: jdk1.8.0_131

*Problem statement: *Tomcat doesn't trust the inbound connection.

We have web application deployed in tomcat and it integrated with web services.
2 way SSL is enabled.
Webservice client deployed in Tomcat send the certificate to webservices and it 
is trusted.
Tomcat doesn't trust certificate sent by the webservices.
It seems to ignore the client validation and allow the communication.

*step followed to implement 2 way SSL from application*

We set the keystore and trust store to be used for communication. so it takes 
the cert from key store for outbound and trust the cert for inbound connections.

   System.setProperty("javax.net.ssl.trustStoreType", "JKS"); 
System.setProperty("javax.net.ssl.keyStoreType", "JKS"); 
System.setProperty("javax.net.ssl.trustStore","TrustStore.jks");
System.setProperty("javax.net.ssl.keyStore","KeyStore.jks");
System.setProperty("javax.net.ssl.trustStorePassword","changeit");
System.setProperty("javax.net.ssl.keyStorePassword","changeit");

It sends the certificate for other system to trust but it doesn't trust the 
incoming connection.


Please advise on the configuration to trust the incoming connection.


Thanks
Vinoth
Any e-mail message from the European Central Bank (ECB) is sent in good faith, 
but shall neither be binding nor construed as constituting a commitment by the 
ECB except where provided for in a written agreement. This e-mail is intended 
only for the use of the recipient(s) named above. Any unauthorised disclosure, 
use or dissemination, either in whole or in part, is prohibited. If you have 
received this e-mail in error, please notify the sender immediately via e-mail 
and delete this e-mail from your system. The ECB processes personal data in 
line with Regulation (EC) No 45/2001 and Decision ECB/2007/1. For any further 
information you can consult the Data Protection Disclaimer on the ECB webpage. 
In case of queries, please contact the ECB Data Protection Officer 
(d...@ecb.europa.eu). You may also contact the European Data Protection 
Supervisor.


Re: How to restrict access to specific webapp + denyStatus

2017-03-10 Thread Diego Gomes
Ohh, I see now! Thanks Mark and André!

I'll plan to upgrade it!

Diego

On 10 Mar 2017, at 07:10, André Warnier (tomcat) <a...@ice-sa.com> wrote:

> On 10.03.2017 11:04, Diego Gomes wrote:
> Thanks Mark!
> 
> In that link just say that is possible, but do not say how to get 404 and not 
> 403.

No, what that link says, it that the denyStatus feature was only introduced in 
a later version of tomcat 7, than the one you are using.
You should at least upgrade to the latest available tomcat 7 version, and 
preferably to the latest available tomcat version.
See here :
http://tomcat.apache.org/whichversion.html


> 
> Diego
> 
> On 10 Mar 2017, at 06:17, Mark Thomas <ma...@apache.org> wrote:
> 
> On 09/03/17 23:51, Diego Gomes wrote:
> 
> 
> 
>> My questions:
>> 
>> - For the first statement, that configuration I did (Student.xml) is
>> the correct way?
> 
> Yes.
> 
>> - Why the 404 denyStatus is not working?
>> 
>> I am running tomcat 7.0.11
> 
> http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?view=log
> 
> Search for "denyStatus"
> 
> Mark
> 
> 
> -
> 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
> 


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



Re: How to restrict access to specific webapp + denyStatus

2017-03-10 Thread Diego Gomes
Thanks Mark!

In that link just say that is possible, but do not say how to get 404 and not 
403.

Diego

On 10 Mar 2017, at 06:17, Mark Thomas <ma...@apache.org> wrote:

On 09/03/17 23:51, Diego Gomes wrote:



> My questions:
> 
> - For the first statement, that configuration I did (Student.xml) is
> the correct way?

Yes.

> - Why the 404 denyStatus is not working?
> 
> I am running tomcat 7.0.11

http://svn.apache.org/repos/asf/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?view=log

Search for "denyStatus"

Mark


-
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



How to restrict access to specific webapp + denyStatus

2017-03-09 Thread Diego Gomes
Hello guys!


inside of my "/opt/tomcat7/webapps/" folder, I have many apps over there


I would like to protect for instance, "Student" (/opt/tomcat7/webapps/Student) 
app to only allow specific IP address, so I did:


"# vi /opt/tomcat7/conf/Catalina/localhost/Student.xml" and addedd:



   


It is working, I am not able to access the https://server.domain.com/Student 
while I am not source = 127.0.0.1 []

But, My HTTP Status on Browser, does not show 404, always saying 403...

My questions:

 - For the first statement, that configuration I did (Student.xml) is the 
correct way?
 - Why the 404 denyStatus is not working?

I am running tomcat 7.0.11

Thanks!


Diego



Re: Different behavior on startup from version 6 and 7 to version 8, 8.5 and 9

2017-02-27 Thread Diego Urenia
Hello Mark,

Unfortunately, one of my tests was made using the simplest scenario
possible, but everything worked as expected and I wasn't able to reproduce
it this way.

Best regards,
Diego

On Mon, Feb 27, 2017 at 1:59 PM, Mark Thomas <ma...@apache.org> wrote:

> On 27/02/17 10:02, Diego Urenia wrote:
> > *UPDATE: *Making further tests while I was waiting for some answers I
> found
> > out that if I explode the war by myself (unziping the war file into the
> > webapps folder) I still experience the problem. So I think we can rule
> out
> > the assumption that the problem happens while the application is still
> > exploding the war file and that the file size affects it.
> >
> > Another info that might be useful:
> >
> > - I am creating this folder using java.io.File#mkdir();
> > - I am trying to check if this folder exist using
> > Class#getResources("/folder");
>
> You need to create the simplest possible test case that demonstrates the
> problem (e.g. a single servlet) and then show us the code.
>
> Mark
>
>
> >
> > Best regards,
> > Diego Urneia
> >
> > On Mon, Feb 27, 2017 at 10:09 AM, Diego Urenia <dru...@gmail.com> wrote:
> >
> >> Hello all,
> >>
> >> My application creates a folder to store the config files at the first
> >> startup and immediately after that the application tries to access this
> >> folder in order to save some information.
> >>
> >> Using Tomcat 6 and 7 everything works fine.
> >> Using Tomcat 8, 8.5, and 9 the application experiences a weird behavior
> >> and here are some tests I made which made me think it was a war
> explosion
> >> related problem:
> >>
> >> - The problem doesn't happen when I am running the application using
> >> Intellij IDEA, because I use an exploded artifact;
> >>
> >> - I've created a dummy application to simulate only the creation and
> first
> >> access to this config folder (the same way I am doing in the real
> >> application) at startup and everything worked fine, which led me to
> believe
> >> the size of my application can be what revealed the problem (bigger .war
> >> file takes longer to be exploded);
> >>
> >> - Another test I made in my application was adding a Thread.sleep(5000);
> >> after creating the folder, which then makes the access to the folder
> >> possible (maybe because Tomcat had enough time to explode the war file);
> >>
> >> It was my belief before having this problem that Tomcat exploded the war
> >> before it even starts the application, but now I have my doubts.
> >>
> >> Three questions:
> >>
> >> - Does Tomcat really explode the war before starting the application?
> >>
> >> - If it doesn't, how does it work? (pointing the right piece of
> >> documentation, which I couldn't find is as good as an explanation)
> >>
> >> - Can anyone tell me what has changed in this regard from version 6 and
> >> 7 and the newer ones that led me to this problem?
> >>
> >> Best regards,
> >> Diego Urenia
> >>
> >>
> >>
> >
>
>
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>


Re: Different behavior on startup from version 6 and 7 to version 8, 8.5 and 9

2017-02-27 Thread Diego Urenia
*UPDATE: *Making further tests while I was waiting for some answers I found
out that if I explode the war by myself (unziping the war file into the
webapps folder) I still experience the problem. So I think we can rule out
the assumption that the problem happens while the application is still
exploding the war file and that the file size affects it.

Another info that might be useful:

- I am creating this folder using java.io.File#mkdir();
- I am trying to check if this folder exist using
Class#getResources("/folder");

Best regards,
Diego Urneia

On Mon, Feb 27, 2017 at 10:09 AM, Diego Urenia <dru...@gmail.com> wrote:

> Hello all,
>
> My application creates a folder to store the config files at the first
> startup and immediately after that the application tries to access this
> folder in order to save some information.
>
> Using Tomcat 6 and 7 everything works fine.
> Using Tomcat 8, 8.5, and 9 the application experiences a weird behavior
> and here are some tests I made which made me think it was a war explosion
> related problem:
>
> - The problem doesn't happen when I am running the application using
> Intellij IDEA, because I use an exploded artifact;
>
> - I've created a dummy application to simulate only the creation and first
> access to this config folder (the same way I am doing in the real
> application) at startup and everything worked fine, which led me to believe
> the size of my application can be what revealed the problem (bigger .war
> file takes longer to be exploded);
>
> - Another test I made in my application was adding a Thread.sleep(5000);
> after creating the folder, which then makes the access to the folder
> possible (maybe because Tomcat had enough time to explode the war file);
>
> It was my belief before having this problem that Tomcat exploded the war
> before it even starts the application, but now I have my doubts.
>
> Three questions:
>
> - Does Tomcat really explode the war before starting the application?
>
> - If it doesn't, how does it work? (pointing the right piece of
> documentation, which I couldn't find is as good as an explanation)
>
> - Can anyone tell me what has changed in this regard from version 6 and
> 7 and the newer ones that led me to this problem?
>
> Best regards,
> Diego Urenia
>
>
>


Different behavior on startup from version 6 and 7 to version 8, 8.5 and 9

2017-02-27 Thread Diego Urenia
Hello all,

My application creates a folder to store the config files at the first
startup and immediately after that the application tries to access this
folder in order to save some information.

Using Tomcat 6 and 7 everything works fine.
Using Tomcat 8, 8.5, and 9 the application experiences a weird behavior and
here are some tests I made which made me think it was a war explosion
related problem:

- The problem doesn't happen when I am running the application using
Intellij IDEA, because I use an exploded artifact;

- I've created a dummy application to simulate only the creation and first
access to this config folder (the same way I am doing in the real
application) at startup and everything worked fine, which led me to believe
the size of my application can be what revealed the problem (bigger .war
file takes longer to be exploded);

- Another test I made in my application was adding a Thread.sleep(5000);
after creating the folder, which then makes the access to the folder
possible (maybe because Tomcat had enough time to explode the war file);

It was my belief before having this problem that Tomcat exploded the war
before it even starts the application, but now I have my doubts.

Three questions:

- Does Tomcat really explode the war before starting the application?

- If it doesn't, how does it work? (pointing the right piece of
documentation, which I couldn't find is as good as an explanation)

- Can anyone tell me what has changed in this regard from version 6 and
7 and the newer ones that led me to this problem?

Best regards,
Diego Urenia


RE: Mutual certificate authentication between Tomcat and MS IIS

2017-01-25 Thread Macca, Diego
Thanks, we will try your suggestions. In the meantime we logged a request in 
Microsoft.
I'll keep you posted.


-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: 24 January 2017 22:46
To: Tomcat Users List
Subject: Re: Mutual certificate authentication between Tomcat and MS IIS

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Diago,

On 1/24/17 4:41 PM, Christopher Schultz wrote:
> Diago,
>
> On 1/24/17 11:40 AM, Macca, Diego wrote:
>> On 1/24/17 8:24 AM, Macca, Diego wrote:
>>>> Has somebody of you ever tried to configure certificate mutual
>>>> authentication between a MS IIS webserver and a Tomcat instance?
>
>>> You want IIS to present a client certificate to Tomcat? Tomcat
>>> shouldn't have a problem with that.
>
>> Yes, that's what I need. Tomcat does not have any problem and it
>> works well with Apache. It seems that IIS is not able to present the
>> certificate when I configure it as reverse proxy (so when it should
>> act as a client).
>
>>>> Does somebody know if this is even possible in IIS ?
>
>>> You'd have to configure IIS's HTTP proxy to use a client
>>> certificate.
>
>> Do you know how to configure it ? I mean, IIS does the reverse proxy
>> things but I need it also to send the present to Tomcat.
>
> I don't know at all how to configure it, unfortunately.
>
> Do you need to have IIS *forward* the actual client's certificate to
> Tomcat, or do you want to use a static client cert just from IIS? If
> you want to forward the cert, you might find this useful:
> https://blogs.msdn.microsoft.com/asiatech/2014/01/27/configuring-arr-w
it
>
>
h-client-certificate/

If you want to install a single certificate into the reverse-proxy, perhaps 
this can help:
https://blogs.msdn.microsoft.com/benjaminperkins/2014/06/02/configure-ap
plication-request-routing-arr-with-client-certificates/

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYh8sEAAoJEBzwKT+lPKRYV2sQAJ5dSq7UkrBeaiipMS9VCuPm
1925yNm22ewsPnwNAZ5Vo9koRXbYAg/AVMAHgf1Ge8umrTYAByfno2gtTcuBtJEb
DBHlm+9uPI+UZdbTs+GsdfW11nCYFc2DFy0cwDewO+N57h26Ji8MLtbd0SwVtYWG
LxwA3chdX6pFc1Q1SlEF0XUT89TNZHL1OJUk5QgY4IxwQHOjqKq+dBv5SmgrEeSp
rGkkzL+hL6AGjt4JmT1z+lnSiCZryO1Sn8gEuD8b+bob8t9S4Gmsg2/clVYNdvwL
nfvpQYTkuZNawaUQCLmMfGoiLf3c6e3expTB09mtOKZA43c6hLXG9lKaI1/A/kOy
Z34S3Uriy+NZaFjyClrrY7AvjjgENS4hQoElDdXXk3PFqOQRz5mSUKQAi1ksM9aK
wyC8EYLaME2nO18KpIDcCrJCXTdwPBZCRWqu8QR26Vz0cLlqxd/B7WZLaiJgjzlN
1DZkAgVYdb0UFmbg/d012CVRlsMlMcs6tPaVoh8I8cB80wl/A6s6kQ6xCpGBDmto
yfA4rl7STfou/868kx5NZ2/msJvs2DD909RNBbZ625aYTtLash82ttwLX42uTiAp
JFJr/wnhGSCibfxmDjVEOoxMIbHTGm1PHF2yvi55aDTF9IyC32JSmlvncI5tedrI
l+TLRr57yPiAJ6tOh+5R
=ZSq/
-END PGP SIGNATURE-

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

Any e-mail message from the European Central Bank (ECB) is sent in good faith, 
but shall neither be binding nor construed as constituting a commitment by the 
ECB except where provided for in a written agreement. This e-mail is intended 
only for the use of the recipient(s) named above. Any unauthorised disclosure, 
use or dissemination, either in whole or in part, is prohibited. If you have 
received this e-mail in error, please notify the sender immediately via e-mail 
and delete this e-mail from your system. The ECB processes personal data in 
line with Regulation (EC) No 45/2001 and Decision ECB/2007/1. For any further 
information you can consult the Data Protection Disclaimer on the ECB webpage. 
In case of queries, please contact the ECB Data Protection Officer 
(d...@ecb.europa.eu). You may also contact the European Data Protection 
Supervisor.


RE: Mutual certificate authentication between Tomcat and MS IIS

2017-01-24 Thread Macca, Diego
Thanks Chris for your comments.

Kind Regards,

Diego Macca
Senior IT Specialist

DG-IS/EDA - Executional Domain Applications
EUROPEAN CENTRAL BANK
Tel.: +49 (69) 1344 6991
E-mail: diego.ma...@ecb.europa.eu
www.ecb.europa.eu
www.youtube.com/ecbeuro
https://twitter.com/ecb

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: 24 January 2017 17:06
To: Tomcat Users List
Subject: Re: Mutual certificate authentication between Tomcat and MS IIS

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Diego,

On 1/24/17 8:24 AM, Macca, Diego wrote:
> Has somebody of you ever tried to configure certificate mutual
> authentication between a MS IIS webserver and a Tomcat instance ?

>>You want IIS to present a client certificate to Tomcat? Tomcat shouldn't have 
>>a problem with that.

Yes, that's what I need. Tomcat does not have any problem and it works well 
with Apache. It seems that IIS is not able to present the certificate when I 
configure it as reverse proxy (so when it should act as a client).

> Does somebody know if this is even possible in IIS ?

>>You'd have to configure IIS's HTTP proxy to use a client certificate.

Do you know how to configure it ? I mean, IIS does the reverse proxy things but 
I need it also to send the present to Tomcat.

> I usually do it very well with Apache but this time I'm requested to
> put in front of Tomcat an IIS webserver.

>>I'm sorry I can't help with this, but I'd be interested in hearing the 
>>solution. There are a number of people here who with with IIS. If nobody 
>>answers after a while, I'll see if I can find someone through $work who might 
>>be able to answer.

Thanks a lot.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYh3t2AAoJEBzwKT+lPKRYQFoQAK6G8aCrFTtwiWun0BJZawDy
7ZYTjT2l6gcyAFLfJCShLeY0QpvE4QS9UL2hvHFZyn99UnXmKSzEf81xaN8JX7Pp
rkWRnk1H1vdxb0KxRB6lDVsESqFOd3Pzq/+aJzvHrPbjYH6uFf8to0hmhG2A0uUe
SQepkh0CZUHAzzSeJD5NBl3vLhSuaPZEp/oY/SW4E9RSsbPaaWtAXePWXS2R8OpH
PqdE/MLvUG9vr8MCT/0SGzziiMwAQz/+l3sqPZzsCD/5iyOk/v0vvtQrioBSiO1R
69y+bC8FeVqZWjDGPv6MVD8wm9ii4UOuQaWun4mrUq3e3s3GGW/opd1sJVBlZG9I
cMvpg8NvrA19HJ9Xy57uKQSpM4TDfzPPPuhNInrPLXalBKz3AzxdocQYoT4b3EiW
HiJ+ynal0VPA+93aDUS/ZepGsI1WG6nB77Yfon1sn6LBPVKGoFIu4GRWZMTadbp0
L5+jVvqprFejGsJpepnleF+hOBkMJbJgjF/C2Np2JPV49uHODfz8m/SbPFXKepht
mV6N9ws10LEaoKdEVul4zTm/gZgqTKJtotR0BQ57hW/Mt0pFlAILxH3X4q1f32hB
kTHRTnotcULMAxUAs7tzcqFCeZ9Lzh5ijB8C755QyxLNqHsrYkgl4QjF4aHobkag
V+J+K3ayq6WaiYAE9m4O
=Q7UB
-END PGP SIGNATURE-

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

Any e-mail message from the European Central Bank (ECB) is sent in good faith, 
but shall neither be binding nor construed as constituting a commitment by the 
ECB except where provided for in a written agreement. This e-mail is intended 
only for the use of the recipient(s) named above. Any unauthorised disclosure, 
use or dissemination, either in whole or in part, is prohibited. If you have 
received this e-mail in error, please notify the sender immediately via e-mail 
and delete this e-mail from your system. The ECB processes personal data in 
line with Regulation (EC) No 45/2001 and Decision ECB/2007/1. For any further 
information you can consult the Data Protection Disclaimer on the ECB webpage. 
In case of queries, please contact the ECB Data Protection Officer 
(d...@ecb.europa.eu). You may also contact the European Data Protection 
Supervisor.

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



Mutual certificate authentication between Tomcat and MS IIS

2017-01-24 Thread Macca, Diego
Dears,
Has somebody of you ever tried to configure certificate mutual authentication 
between a MS IIS webserver and a Tomcat instance ?
Does somebody know if this is even possible in IIS ?

I usually do it very well with Apache but this time I'm requested to put in 
front of Tomcat an IIS webserver.

Thanks in advance.

Kind Regards,

Diego Macca
Senior IT Specialist

DG-IS/EDA - Executional Domain Applications
EUROPEAN CENTRAL BANK
Tel.: +49 (69) 1344 6991
E-mail: diego.ma...@ecb.europa.eu<mailto:diego.ma...@ecb.europa.eu>
www.ecb.europa.eu<http://www.ecb.europa.eu/>
www.youtube.com/ecbeuro<http://www.youtube.com/ecbeuro>
https://twitter.com/ecb

Any e-mail message from the European Central Bank (ECB) is sent in good faith, 
but shall neither be binding nor construed as constituting a commitment by the 
ECB except where provided for in a written agreement. This e-mail is intended 
only for the use of the recipient(s) named above. Any unauthorised disclosure, 
use or dissemination, either in whole or in part, is prohibited. If you have 
received this e-mail in error, please notify the sender immediately via e-mail 
and delete this e-mail from your system. The ECB processes personal data in 
line with Regulation (EC) No 45/2001 and Decision ECB/2007/1. For any further 
information you can consult the Data Protection Disclaimer on the ECB webpage. 
In case of queries, please contact the ECB Data Protection Officer 
(d...@ecb.europa.eu). You may also contact the European Data Protection 
Supervisor.


RE: Two Way SSL - SSL Offloading at load balancer

2016-12-05 Thread Macca, Diego
Hi all,
Probably the FW can be configured to not terminate the SSL connection. It 
should act as a pass-through.

But since few months we noticed that Tomcat is not requesting the client 
certificate anymore (Tomcat to Tomcat, the browsers always receive a 
certificate request). It complete the handshake so the SSL communication is 
established but no certificate is sent.  If I got this right is because 
something has been changed in a later revision in Java 8.
To force Tomcat to request the client certificate we had to set clientAuth to 
true.

Just my 2 cents.

Kind Regards,

Diego Macca
Senior IT Specialist

DG-IS/EDA - Executional Domain Applications
EUROPEAN CENTRAL BANK
Tel.: +49 (69) 1344 6991
E-mail: diego.ma...@ecb.europa.eu
www.ecb.europa.eu
www.youtube.com/ecbeuro
https://twitter.com/ecb

-Original Message-
From: Christopher Schultz [mailto:ch...@christopherschultz.net]
Sent: 02 December 2016 17:09
To: Tomcat Users List
Subject: Re: Two Way SSL - SSL Offloading at load balancer

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Bipin,

On 12/2/16 7:27 AM, Bipin Jethwani wrote:
> We use Spring security and want to use Two Way SSL for a few Jersey
> based REST APIs exposed for mobile devices. SSL is offloaded at
> load-balancer or apache level.
>
> Can we still get access to client certificate at web app level?

That depends.

How are you connecting your load-balancer to Tomcat. Can you configure the 
load-balancer to forward the TLS details to Tomcat? With httpd, both mod_jk and 
mod_proxy_ajp can do it natively. Using mod_proxy_httpd, you just have to make 
sure that the certificates are forwarded as HTTP request headers, and you'll 
need to configure the RemoteIPValve to unpack that information and put it into 
the HttpServletRequest object in a place your application might expect it to be.

> On second thought we can live without having access to client cert but
> can we have load-balancer or apache configured to request for client
> cert only for a specific urls?

No. Only the component terminating TLS can request a certificate from the 
client. If there is a way for you to signal to the load-balancer that you want 
to request a certificate, then the load-balancer can request a TLS 
renegotiation and ask for a client certificate at that point.

> Is there a standard for this?

None that I know of.

- -chris
-BEGIN PGP SIGNATURE-
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJYQZySAAoJEBzwKT+lPKRYD3kP/00panFQA1oqLeU6NvAySvwc
gHyxLLt4PKSRJrlrczk/ftw8czjepDQx3Z4Rk4bQ3x4EwFNcqv+DnvfBuRv0f3W8
15fzIQhRcULvkdhJ+AHWW73y3wsoRl0U1f6nAAma6nevZgbmXy3efUIWeIFZy7RY
o8qLBfTy5krcPft9GMMEjGVtkWOB54NFoRe3Sp8iE1CR3jw8oGyzE2i3WdJKhsxE
iFoJcnNJH65sBKwL2LtpahgaZ6YeRGa7SLcYgTkcldyfqEEd1zZYlBQTZFQh6Zy0
BEUTWz99r5klMaU0Zn7QiYfFrWkA0pF4agdFnsWElj2ZsJ2YAC+ckAsZ7Rj2oHwD
s4ehb6zCGeTE/bToD4nlb1iizZuWTIlFCzhZ3d/iYNHVCnICOdt0IyPAV/cVl9iL
r9htFbB6hzd05ALP5MfLzqluhP5sGhuKhBK5glda3prLP2L7b14IxbfuOGTYbgPV
q7fTfLfim7veQYpZWoRIdUjqkQM9BN43AkX3HyGF15SirL9U0NEXQkiipHR0Fi3E
FR3JmDcsphMV+bvHnzHeVbMEzNrai1GZhZ6Y+6IW2iRGwgWcfO4nCU10ZPGDh50H
2sW0R27nZviNHocLGgSJsmGFO98rrUHlHYXpPCn+NTFAF+zwE0S5d6qf5RFKtGWr
8xiy+1gtF7s/tSQhVlap
=83a5
-END PGP SIGNATURE-

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

Any e-mail message from the European Central Bank (ECB) is sent in good faith, 
but shall neither be binding nor construed as constituting a commitment by the 
ECB except where provided for in a written agreement. This e-mail is intended 
only for the use of the recipient(s) named above. Any unauthorised disclosure, 
use or dissemination, either in whole or in part, is prohibited. If you have 
received this e-mail in error, please notify the sender immediately via e-mail 
and delete this e-mail from your system. The ECB processes personal data in 
line with Regulation (EC) No 45/2001 and Decision ECB/2007/1. For any further 
information you can consult the Data Protection Disclaimer on the ECB webpage. 
In case of queries, please contact the ECB Data Protection Officer 
(d...@ecb.europa.eu). You may also contact the European Data Protection 
Supervisor.


Protect Management

2016-08-19 Thread Diego Gomes
Hi all!!!

I would like to know if is possible to protect/prevent access to 
https://server.com:PORT/manager from the Internet. I need to keep my webapp 
working for ANY but the management. server status, etc... just for 
192.168.0.0/24 for instance. Is this possible?

Another question is, to prevent brute force, there is a LockOutRealm, right? 
Where should I implement it and how?

I am running Tomcat 7.0.70

Thanks!

Diego


Tomcat Connection Security

2015-09-21 Thread Diego Maciel Gomes
Hello guys!

I need your help regarding tomcat connection configuration to a database, so 
please!

I have Tomcat and Weblogic here.
I have an Oracle Database here.

My tomcat and weblogic connect into my oracle database.

For tomcat, in the context.xml file, we can see the username and password of 
the connection.

For weblogic, it is configured different, like encrypted.

So, is there any way to protect this configuration/file for Tomcat?

Thanks,

Diego
  

Session lost in Tomcat 5.5.36

2014-09-30 Thread Diego Ruotolo
Hi everybody,



Working on my company webapp I notice the following problem: sometimes the
jsession cookie is lost, and therefore my whole http session is lost.



The context is:

- Tomcat v. 5.5.36

   - JDK 1.5.0

- O.S. Windows

- Client: Internet Explorer 8



Here is my use case:

-  I made a POST request to a servlet of my webapp

-  While processing this request, I create a new http session

-  Processing of the request will process a velocity template
as last step

-  This velocity template contains 3 calls to 3 different
servlets of my webapp, these 3 calls are made through an HTTP GET

-  While processing one of these 3 requests, Tomcat does not
append jsessionid parameter to the requested URL: I have debugged Tomcat
classes therefore I am sure of this



This problem does not occur always, but just sometimes. While debugging
Tomcat classes, I noticed that Tomcat starts 3 threads to manage the 3 GET
requests of the velocity template, so maybe it is a concurrency problem.

Finally, I noticed that this problem does not happen if I set the Windows
registry key HKCU\Software\Microsoft\Internet Explorer\Main – TabProcGrowth
to 0 or 1, which forces Internet Explorer to use one process for all tabs,
not one process for single tab (which is the default).



Do I miss some configuration settings? Do I have to set some particular
parameter / cookie in the first response (or in the velocity template) ?

If you need more details please tell me.



Thanks in advice,



Kind regards



Diego


R: Session lost in Tomcat 5.5.36

2014-09-30 Thread Diego Ruotolo
Thanks Daniel,

best regards

Diego

 -Messaggio originale-
 Da: Daniel Mikusa [mailto:dmik...@pivotal.io]
 Inviato: martedì 30 settembre 2014 15:33
 A: Tomcat Users List
 Oggetto: Re: Session lost in Tomcat 5.5.36

 On Tue, Sep 30, 2014 at 6:56 AM, Diego Ruotolo druot...@noemalife.com
 wrote:

  Hi everybody,
 
 
 
  Working on my company webapp I notice the following problem:
 sometimes
  the jsession cookie is lost, and therefore my whole http session is
  lost.
 
 
 
  The context is:
 
  - Tomcat v. 5.5.36
 
 - JDK 1.5.0
 

 Both of these pieces of software are very old and no longer supported.
 There are very likely bugs and security issues in them which will never
 get
 fixed.  You should consider upgrading ASAP.  As a bonus, upgrading may
 solve the problem you're having.

   http://tomcat.apache.org/tomcat-55-eol.html

 Dan


 
  - O.S. Windows
 
  - Client: Internet Explorer 8
 
 
 
  Here is my use case:
 
  -  I made a POST request to a servlet of my webapp
 
  -  While processing this request, I create a new http
  session
 
  -  Processing of the request will process a velocity
  template
  as last step
 
  -  This velocity template contains 3 calls to 3 different
  servlets of my webapp, these 3 calls are made through an HTTP GET
 
  -  While processing one of these 3 requests, Tomcat does not
  append jsessionid parameter to the requested URL: I have debugged
  Tomcat classes therefore I am sure of this
 
 
 
  This problem does not occur always, but just sometimes. While
  debugging Tomcat classes, I noticed that Tomcat starts 3 threads to
  manage the 3 GET requests of the velocity template, so maybe it is a
 concurrency problem.
 
  Finally, I noticed that this problem does not happen if I set the
  Windows registry key HKCU\Software\Microsoft\Internet Explorer\Main –
  TabProcGrowth to 0 or 1, which forces Internet Explorer to use one
  process for all tabs, not one process for single tab (which is the
  default).
 
 
 
  Do I miss some configuration settings? Do I have to set some
  particular parameter / cookie in the first response (or in the velocity
 template) ?
 
  If you need more details please tell me.
 
 
 
  Thanks in advice,
 
 
 
  Kind regards
 
 
 
  Diego
 

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



Re: Tomcat 5.5.27, session lost, cookies

2011-06-01 Thread Diego Ruotolo
Hi Chris,

as I said in one of my previous mail, I'm not able to reproduce the
error anymore. I'm trying to figuring out what's changed (some commit
made by someone of our team), and next week I'll test it on some other
test environments. I'm trying to collect all the details to send you
accurate info, but I need to reproduce the error to do so.

BTW, in my previous mails I tell you about the architecture used in our
webapp, I send you the HTTP logs as returned by the access log valve and
I said we use 3 cookies:

- JSESSIONID, with value of generated session id
- jsessionid, same as before, just the name in lower case
- I18N, containing value generation_timei18n , s.a.: 1234567890IT_it

When I'll have more details about this issue, I'll send you as soon as
possible.

I would like to thank you for your precious help and support,

best regards

Il 31/05/2011 21.18, Christopher Schultz ha scritto:
 Diego,

 You should send us an example. It looks like you have done a lot of
 investigation into the issue, but you won't give us any details. Please
 provide some.

 -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



Re: Tomcat 5.5.27, session lost, cookies

2011-06-01 Thread Diego Ruotolo
Hi Chris,

many thanks for your suggestion. Next week I will try to remove the
cookie in excess and I'll tell you the result.

Best regards

Il 01/06/2011 16.29, Christopher Schultz ha scritto:
 Diego,

 On 6/1/2011 6:27 AM, Diego Ruotolo wrote:
  BTW, in my previous mails I tell you about the architecture used in our
  webapp, I send you the HTTP logs as returned by the access log valve and

 The logs are not useful, since they don't contain headers.

  I said we use 3 cookies:

  - JSESSIONID, with value of generated session id
  - jsessionid, same as before, just the name in lower case

 Cookie names are case-insensitive, so using JSESSIONID as well as
 jsessionid is going to cause problems.

 http://www.ietf.org/rfc/rfc2109.txt

 See sections 4.1 (specifically the definition of attr and the comment
 following it) and 4.2.2 where NAME is defined to be an attr.

 -chris

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




-- 
Diego Ruotolo - NoemaLife S.p.A.

Ing. Diego Ruotolo
Software developer

NoemaLife S.p.A.
Via Gobetti, 52
40129 Bologna - ITALY
T +39 051 70.98.249
F +39 051 41.93.900
www.noemalife.com



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



Re: Tomcat 5.5.27, session lost, cookies

2011-05-27 Thread Diego Ruotolo
Hi everybody !

Thanks to all of you for your replies. Unfortunately (or fortunately) I
spent the whole morning trying to reproduce the problem but everything
works fine today!

@Filippo: Ciao! There are no strange or blank character on cookie
value, it's just the JSESSIONID as is. It's a value generated by
Tomcat, isn't it?

@Marcos: I have no logs... I tried to log this morning using log4j at
DEBUG level, but, as I said in the beginning, everything works fine today...

@Christopher: here's the access logs, with all the HTTP calls
(everything's fine, these are NOT the logs of the fail scenario):

127.0.0.1 - - [27/May/2011:11:29:41 +0200] POST
/servlet/it.dianoema.dnweb.library.servlets.Automation HTTP/1.1 200 2070
127.0.0.1 - - [27/May/2011:11:29:41 +0200] POST
/servlet/it.dianoema.dnweb.library.servlets.ConsoleServlet HTTP/1.1 200
1698
127.0.0.1 - - [27/May/2011:11:29:41 +0200] GET
/servlet/it.dianoema.dnweb.dnlis.servlets.StampaEtichette?azione=PRINTstampante_autom=falseprinter=Etichette
HTTP/1.1 200 6066
127.0.0.1 - - [27/May/2011:11:29:45 +0200] POST
/servlet/it.dianoema.dnweb.dnlis.servlets.AzioniSuRichieste HTTP/1.1 200 7
127.0.0.1 - - [27/May/2011:11:30:12 +0200] POST
/servlet/it.dianoema.dnweb.dnlis.servlets.GetSkel HTTP/1.1 200 7
127.0.0.1 - - [27/May/2011:11:30:12 +0200] GET
/servlet/it.dianoema.dnweb.dnlis.servlets.StampaEtichette?azione=VOID
HTTP/1.1 200 582
127.0.0.1 - - [27/May/2011:11:30:12 +0200] GET
/servlet/it.dianoema.dnweb.dnlis.servlets.GetFiltro?TEMPLATE=templates/gsp/head.template
HTTP/1.1 200 5489
127.0.0.1 - - [27/May/2011:11:30:12 +0200] GET
/servlet/it.dianoema.dnweb.dngsp.ShowQuery?TEMPLATE=templates%2Fgsp%2Flist.templateELENCO=PazientiSESSION_REM=ALLQUERY=PazientiGSPFIELD_Reparto=noe_dnwebFIELD_ExtCodice=FIELD_Codice=FIELD_CodiceRicovero=FIELD_Cognome=FIELD_Nome=FIELD_00_DataUltimaRichiesta=FIELD_01_DataUltimaRichiesta=COND_Cognome=+LIKE+COND_Nome=+LIKE+COND_00_DataUltimaRichiesta=SHORT_DATE%3E%3DCOND_01_DataUltimaRichiesta=SHORT_DATE%3C%3DSORTS=AGG_REP=yesREP_IN=yes
HTTP/1.1 200 4
127.0.0.1 - - [27/May/2011:11:30:12 +0200] GET
/servlet/it.dianoema.dnweb.dnlis.servlets.GetSkel?SKEL=/dnlis/templates/gsp/tail.templateGSP=ONAMB=OFF
HTTP/1.1 200 2280
127.0.0.1 - - [27/May/2011:11:30:12 +0200] GET
/servlet/it.dianoema.dnweb.dnlis.servlets.Context HTTP/1.1 200 2565


I'll explain you our flow:
we call the servlet Automation that starts a thread who sequentially
calls all the other servlets, when the thread has finished the control
is returned to Automation servlet.
Not all servlet are called by thread: lots of them are invoked because
the previous servlet returned an HTML page containing frames that have a
servlet URL in the src attribute. Let's make an example:

Automation -- Thread started -- Call servlet 1 -- HTML is returned
-- Call servlet 2 (it's in the HTML page) -- Thread end -- Automation

Usually the problem occours when invoking servlet from the HTML page
(servlet 2 in the example above, servlet called GetFiltro in the access
logs).

Things I've tried to do:
- increase size of connector input stream buffer, from 2048 to 4096,
using bufferSize attribute
- force the Set-Cookie attribute in every response, forcing the
JSESSIONID cookie

If you want I have the entire HTTP headers of request/response.

I'll try again to reproduce the problem, I will send you more details
when it will occour again.

Thanks everybody!

Best regards


Il 27/05/2011 10.33, Filippo Machi ha scritto:
 Ciao!
 Please read my comment inline..

 On Fri, May 27, 2011 at 12:12 AM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 Filippo,

 On 5/26/2011 10:50 AM, Filippo Machi wrote:
  One of our legacy (non java) server was used to put a blank (' ')
 character
  as value of a cookie.

 The value itself is blank, or the value /contains/ a blank?


  the value contains a blank



 Please give us an example of a Cooke: header from your client and
 maybe we can suggest a solution (a few come to mind, but I'm unwilling
 to describe them until I see an example).


  here it's an example, I used firebug to grab the cookie header
 contained in
  the request:

 
 AA=01*49qmsEhufMY7I6g/OnGT2tN3ThrCZH6vJ342kTDsssuRgEhlqwftbRTaikwi9I3HIx5yoK1ng4tY
  5JuIUe3x9o0Jptimu3uvVgeQAKc5htM=;
  __utma=125866390.1346069185.1295258223.1306326749.1306484681.40;
  __utmz=125866390.1306326795.39.29.utmcsr=


  as you can see there are different cookies, the first one (AA) it's the
  guilty. It has a blank here

  ...4tY 5Ju...

  thanks
  Fil



 -chris

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



-- 
Diego Ruotolo - NoemaLife S.p.A.

Ing. Diego Ruotolo
Software developer

NoemaLife S.p.A.
Via Gobetti, 52
40129 Bologna - ITALY
T +39 051 70.98.249
F +39 051 41.93.900
www.noemalife.com




Re: Tomcat 5.5.27, session lost, cookies

2011-05-27 Thread Diego Ruotolo
Il 27/05/2011 15.04, Filippo Machi ha scritto:
 @Filippo: Ciao! There are no strange or blank character on cookie
 value, it's just the JSESSIONID as is. It's a value generated by
 Tomcat, isn't it?

 Ciao Diego,
 I meant, maybe there's ANOTHER cookie in the incoming request that contains
 one or
 more not valid characters and it causes tomcat to fail the parsing of all
 other cookies,
 included the JSESSIONID one.
 ciao
 Fil
Mmm... no. There are just 2 cookies: JSESSIONID and I18n cookie : the
latter contains just values like IT_it . Sometimes ALSO a dup
JSESSIONID is set, or a jsessionid (in lower case) : that's part of
our webapp, maybe I should fix it... :-)
Thanks,

ciao
-- 

Ing. Diego Ruotolo
Software developer




Re: Tomcat 5.5.27, session lost, cookies

2011-05-26 Thread Diego Ruotolo
Hi,

any suggestion for this problem?

Thanks,

best regards

Il 25/05/2011 10.34, Diego Ruotolo ha scritto:
 Hi,

 this is my first post to this list. Maybe it's a post more related to
 the developers list, if so please tell me so and I will send it to that
 list.

 Working with my company's webapp, I noticed a strange behaviour:
 sometimes http session, managed through JSESSIONID cookie, is lost. We
 use Tomcat 5.5.27 on Windows.
 Debugging Tomcat classes using the Eclipse debugger, I noticed that this
 happens because cookies are not correctly parsed, in fact:

 * Cookies (class org.apache.tomcat.util.http.Cookies) are instantiated
 when a new Request (class org.apache.coyote.Request) is created.
 * Constructor of class Cookies accept a MimeHeaders as argument.
 * Cookies are parsed using the method  getCookieCount(): this method
 sets the boolean variable unprocessed to false and call the method
 processCookies() for processing cookis from the header (that is the
 argument of the Cookies class constructor)

 Everything works fine, but sometimes it happens that even if cookies are
 correctly inserted in the request header (I can see it!) and
 unprocessed variable of class Cookies is set to false (== cookies
 parsed) , the cookies are NOT parsed: in fact the ServerCookie array is
 empty!
 It seems that is a time-related issue: IMHO the problem is that
 sometimes cookies are parsed BEFORE header is parsed.

 Hope I've been clear...

 Is this a known problem? Any suggestions? Maybe there is some
 configuration tricks I can use to avoid this problem?

 Thanks in advice,

 best regards


-- 

Ing. Diego Ruotolo
Software developer

NoemaLife S.p.A.
Via Gobetti, 52
40129 Bologna - ITALY
T +39 051 70.98.249
F +39 051 41.93.900
www.noemalife.com



Tomcat 5.5.27, session lost, cookies

2011-05-25 Thread Diego Ruotolo
Hi,

this is my first post to this list. Maybe it's a post more related to
the developers list, if so please tell me so and I will send it to that
list.

Working with my company's webapp, I noticed a strange behaviour:
sometimes http session, managed through JSESSIONID cookie, is lost. We
use Tomcat 5.5.27 on Windows.
Debugging Tomcat classes using the Eclipse debugger, I noticed that this
happens because cookies are not correctly parsed, in fact:

* Cookies (class org.apache.tomcat.util.http.Cookies) are instantiated
when a new Request (class org.apache.coyote.Request) is created.
* Constructor of class Cookies accept a MimeHeaders as argument.
* Cookies are parsed using the method  getCookieCount(): this method
sets the boolean variable unprocessed to false and call the method
processCookies() for processing cookis from the header (that is the
argument of the Cookies class constructor)

Everything works fine, but sometimes it happens that even if cookies are
correctly inserted in the request header (I can see it!) and
unprocessed variable of class Cookies is set to false (== cookies
parsed) , the cookies are NOT parsed: in fact the ServerCookie array is
empty!
It seems that is a time-related issue: IMHO the problem is that
sometimes cookies are parsed BEFORE header is parsed.

Hope I've been clear...

Is this a known problem? Any suggestions? Maybe there is some
configuration tricks I can use to avoid this problem?

Thanks in advice,

best regards
-- 

Ing. Diego Ruotolo
Software developer


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



cookies and webservice

2011-01-19 Thread Diego Monni
Hi,
I have to use a webservice (tomcat 7.0.0. + axis2 1.5 + jdk 6.0.21)
installed in load balancing configuration. I need implement session affinity
but in the response there isn't the jsessionid. In the application context
the flag  cookies is set to true and when I browse the application page the
jsessionid works fine.
What is wrong?

Thanks in advance

diego


Re: cookies and webservice

2011-01-19 Thread Diego Monni
Thanks for the response.
I mean that my application contains jsp pages and webservices. When I call a
jsp page the jsessionid is present. When I invoke a service method in the
response header jsessionid is not present.

diego

2011/1/19 Caldarale, Charles R chuck.caldar...@unisys.com

  From: Diego Monni [mailto:diego.mo...@gmail.com]
  Subject: cookies and webservice

  I have to use a webservice (tomcat 7.0.0. + axis2 1.5 + jdk 6.0.21)

 Try it again on a stable version of Tomcat (7.0.6).

  but in the response there isn't the jsessionid. In the application
 context
  the flag cookies is set to true and when I browse the application page
 the
  jsessionid works fine.

 Your statements are contradictory: first you say jsessionid isn't in the
 response, then you say it works fine.  What should we believe?

  - 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: cookies and webservice

2011-01-19 Thread Diego Monni
I use whireshark in order to snif the transaction because de the proxy class
return null

MessageContext inMsgCtx1 =
stub1._getServiceClient().getLastOperationContext().getMessageContexts().get(Out);
String incomingCookie1 =
(String)inMsgCtx.getServiceContext().getProperty(HTTPConstants.COOKIE_STRING);

The web service client use an application authentication (service with login
method) and it doesn't perform any other autentication.

diego

2011/1/19 Christopher Schultz ch...@christopherschultz.net

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Diego,

 On 1/19/2011 9:48 AM, Diego Monni wrote:
  Thanks for the response.
  I mean that my application contains jsp pages and webservices. When I
 call a
  jsp page the jsessionid is present. When I invoke a service method in the
  response header jsessionid is not present.

 How are you checking for the response header?

 Is your web service client authenticating with the server? If a session
 isn't created, then a cookie will never be returned. A session will be
 created if you use FORM authentication or if your code explicitly
 creates a session.

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

 iEYEARECAAYFAk03FpsACgkQ9CaO5/Lv0PCrPgCggPmyCzwBKjkgvT/cyMDLMnVw
 D1IAoKb+OcFyZRgISMwrN54PJyA553ln
 =ELsa
 -END PGP SIGNATURE-

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




mod_jk, missing uri map

2009-06-11 Thread Diego Figueroa
Hi,

I'm having issues using mod_jk 1.2.28 with Tomcat 6.0.18 and Apache 2.2. 
Whenever I call one of the mount points defined on my apache2.conf file I 
get the same message in the log file (below). I am including what I 
believe are the relevant portions of my config files. Thanks!

I call the URL:

https://localhost/ceo/servlet/ceo

My mod_jk.log shows:

[Thu Jun 11 11:34:58 2009] [10331:3075028768] [debug] 
jk_child_init::mod_jk.c (3068): Initialized mod_jk/1.2.28
[Thu Jun 11 11:35:07 2009] [10075:3075028768] [debug] 
jk_translate::mod_jk.c (3419): missing uri map for 
localhost:/ceo/servlet/ceo
[Thu Jun 11 11:35:07 2009] [10075:3075028768] [debug] 
jk_map_to_storage::mod_jk.c (3579): missing uri map for 
localhost:/ceo/servlet/ceo

My apache2.conf has:

--- apache2.conf ---
LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
JkLogLevel debug
JkShmFile /var/log/apache2/jk.shm
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkRequestLogFormat %w %V %T
JkMount /ceo/* ajp13
--- apache2.conf ---

My worker.properties file:

--- workers.properties ---
workers.tomcat_home=/home/dfiguero/testbed/apache-tomcat-6.0.18
workers.java_home=/usr/lib/jvm/java-6-sun
ps=/

worker.list=ajp13,jkstatus

# defaults
worker.ajp13.port=8009
worker.ajp13.host=localhost
worker.ajp13.type=ajp13
worker.ajp13.lbfactor=1
worker.ajp13.socket_keepalive=true
worker.ajp13.connect_timeout=6

# status
worker.jkstatus.type=status
--- workers.properties ---

Finally my server.xml file has (shared among several instances):

--- server.xml ---
?xml version='1.0' encoding='utf-8'?
Server port=${shutdown.port} shutdown=SHUTDOWN

  Listener className=org.apache.catalina.core.AprLifecycleListener 
SSLEngine=on /
  Listener className=org.apache.catalina.core.JasperListener /
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener 
/
  Listener 
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /


  GlobalNamingResources
Resource name=UserDatabase auth=Container
  type=org.apache.catalina.UserDatabase
  description=User database that can be updated and saved 
factory=org.apache.catalina.users.MemoryUserDatabaseFactory
  pathname=${catalina.base}/../shared/conf/tomcat-users.xml 
/
  /GlobalNamingResources

  Service name=Catalina
 
Connector port=${http.port} protocol=HTTP/1.1 
   connectionTimeout=6 enableLookups=true
   redirectPort=8443 /

Connector port=8009 protocol=AJP/1.3 redirectPort=8443 
enableLookups=true /

Engine name=Catalina defaultHost=localhost

  Realm className=org.apache.catalina.realm.UserDatabaseRealm 
resourceName=UserDatabase/

  Host name=localhost  appBase=webapps
unpackWARs=true autoDeploy=true
xmlValidation=false xmlNamespaceAware=false
  /Host
/Engine
  /Service
/Server
--- server.xml ---

Re: mod_jk, missing uri map

2009-06-11 Thread Diego Figueroa
Hi André,

Thanks for your input. I added JkMountCopy On to both the default and 
SSL VirtualHosts and it started working.

Diego.





André Warnier a...@ice-sa.com 
2009/06/11 01:03 PM
Please respond to
Tomcat Users List users@tomcat.apache.org


To
Tomcat Users List users@tomcat.apache.org
cc

Subject
Re: mod_jk, missing uri map






Hi.

Good points for providing all relevant information.

By any chance, are you using VirtualHost's ?
(Unlikely with HTTPS, but nevertheless)
If yes, make sure to look up the JkMountCopy directive.
JkMount is not automatically inherited by VirtualHosts, from the main 
configuration.

A couple more things below

Diego Figueroa wrote:
 Hi,
 
 I'm having issues using mod_jk 1.2.28 with Tomcat 6.0.18 and Apache 2.2. 

 Whenever I call one of the mount points defined on my apache2.conf file 
I 
 get the same message in the log file (below). I am including what I 
 believe are the relevant portions of my config files. Thanks!
 
 I call the URL:
 
 https://localhost/ceo/servlet/ceo
 
 My mod_jk.log shows:
 
 [Thu Jun 11 11:34:58 2009] [10331:3075028768] [debug] 
 jk_child_init::mod_jk.c (3068): Initialized mod_jk/1.2.28
 [Thu Jun 11 11:35:07 2009] [10075:3075028768] [debug] 
 jk_translate::mod_jk.c (3419): missing uri map for 
 localhost:/ceo/servlet/ceo
 [Thu Jun 11 11:35:07 2009] [10075:3075028768] [debug] 
 jk_map_to_storage::mod_jk.c (3579): missing uri map for 
 localhost:/ceo/servlet/ceo
 
 My apache2.conf has:
 
 --- apache2.conf ---
 LoadModule jk_module /usr/lib/apache2/modules/mod_jk.so
 JkWorkersFile /etc/apache2/workers.properties
 JkLogFile /var/log/apache2/mod_jk.log
 JkLogLevel debug
 JkShmFile /var/log/apache2/jk.shm
 JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
 JkRequestLogFormat %w %V %T
 JkMount /ceo/* ajp13

The above all looks ok to me.
Just in case : maybe you also want to add a
JkMount /ceo ajp 13
(only if /ceo has to be proxied to Tomcat also.)


 --- apache2.conf ---
 
 My worker.properties file:
 
 --- workers.properties ---
 workers.tomcat_home=/home/dfiguero/testbed/apache-tomcat-6.0.18
 workers.java_home=/usr/lib/jvm/java-6-sun

I believe the preceding 2 lines are obsolete, no longer used by mod_jk 
since a long time.
But that's not the cause of your problem.

 ps=/
 
 worker.list=ajp13,jkstatus
 
 # defaults
 worker.ajp13.port=8009
 worker.ajp13.host=localhost
 worker.ajp13.type=ajp13
 worker.ajp13.lbfactor=1
 worker.ajp13.socket_keepalive=true
 worker.ajp13.connect_timeout=6
 
 # status
 worker.jkstatus.type=status
 --- workers.properties ---
 
 Finally my server.xml file has (shared among several instances):
 
 --- server.xml ---
 ?xml version='1.0' encoding='utf-8'?
 Server port=${shutdown.port} shutdown=SHUTDOWN
 
   Listener className=org.apache.catalina.core.AprLifecycleListener 
 SSLEngine=on /
   Listener className=org.apache.catalina.core.JasperListener /
   Listener 
className=org.apache.catalina.mbeans.ServerLifecycleListener 
 /
   Listener 
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener 
/
 
 
   GlobalNamingResources
 Resource name=UserDatabase auth=Container
   type=org.apache.catalina.UserDatabase
   description=User database that can be updated and saved 
 factory=org.apache.catalina.users.MemoryUserDatabaseFactory
 pathname=${catalina.base}/../shared/conf/tomcat-users.xml 
 /
   /GlobalNamingResources
 
   Service name=Catalina
 
 Connector port=${http.port} protocol=HTTP/1.1 
connectionTimeout=6 enableLookups=true
redirectPort=8443 /
 
 Connector port=8009 protocol=AJP/1.3 redirectPort=8443 
 enableLookups=true /
 
I guess this is the only instance which has an AJP connector then ?


 Engine name=Catalina defaultHost=localhost
 
   Realm className=org.apache.catalina.realm.UserDatabaseRealm 
 resourceName=UserDatabase/
 
   Host name=localhost  appBase=webapps
 unpackWARs=true autoDeploy=true
 xmlValidation=false xmlNamespaceAware=false
   /Host
 /Engine
   /Service
 /Server
 --- server.xml ---

Basically, everything /looks/ ok.
But the logfile does indicate that mod_jk is called to examine the URL, 
but does not find a JkMount that matches the /ceo/servlet/ceo URL.
So either it is the VirtualHost thing, or else I don't know.

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




Problems retrieving client certificates with mod_jk

2009-06-02 Thread Diego Manilla Suárez
Hi. I'm using client certificates in certain parts of my webapp. When I 
was using mod_proxy_ajp I could retrieve the client certificates from a 
request attribute:


request.getAttribute(javax.servlet.request.X509Certificate);

But now I've switched to mod_jk and I always get null. This is my 
current config in Apache 2.2:


##
LoadModule jk_module modules/mod_jk.so
JkWorkersFile workers.properties
JkShmFile logs/mod_jk.shm
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardSSLCertChain

VirtualHost _default_:8443
JkMount /WSindex worker1
JkMount /WSindex/* worker1
SSLVerifyClient require
SSLVerifyDepth  10
# More irrelevant SSL configuration...
/VirtualHost
##

In Tomcat 5.5.26:

##
Connector port=8009 enableLookups=false protocol=AJP/1.3 
URIEncoding=UTF-8 connectionTimeout=60 /

##

workers.properties:

##
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.connection_pool_timeout=600
worker.worker1.socket_timeout=60
worker.worker1.socket_keepalive=1
##

Any idea?

Thanks in advance.


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



Re: Problems retrieving client certificates with mod_jk

2009-06-02 Thread Diego Manilla Suárez

OK, problem solved. I added

SSLOptions +ExportCertData

and now it's working again.

Regards,
Diego

Diego Manilla Suárez escribió:
Hi. I'm using client certificates in certain parts of my webapp. When 
I was using mod_proxy_ajp I could retrieve the client certificates 
from a request attribute:


request.getAttribute(javax.servlet.request.X509Certificate);

But now I've switched to mod_jk and I always get null. This is my 
current config in Apache 2.2:


##
LoadModule jk_module modules/mod_jk.so
JkWorkersFile workers.properties
JkShmFile logs/mod_jk.shm
JkLogFile logs/mod_jk.log
JkLogLevel info
JkLogStampFormat [%a %b %d %H:%M:%S %Y] 
JkOptions +ForwardSSLCertChain

VirtualHost _default_:8443
JkMount /WSindex worker1
JkMount /WSindex/* worker1
SSLVerifyClient require
SSLVerifyDepth  10
# More irrelevant SSL configuration...
/VirtualHost
##

In Tomcat 5.5.26:

##
Connector port=8009 enableLookups=false protocol=AJP/1.3 
URIEncoding=UTF-8 connectionTimeout=60 /

##

workers.properties:

##
worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.connection_pool_timeout=600
worker.worker1.socket_timeout=60
worker.worker1.socket_keepalive=1
##

Any idea?

Thanks in advance.


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








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



RE: Tomcat does not respond

2009-05-28 Thread Diego Castorina
I use the ServletOutputStream because I need to write binary directly in the 
response while with the PrintWriter I can only write character text to the 
client.
I don't understand the reason for this exception since I don't use the JsonView 
class for the requests that return a binary as output. 

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: giovedì 28 maggio 2009 15.15
To: Tomcat Users List
Subject: RE: Tomcat does not respond

 From: Diego Castorina [mailto:di...@quince.nl]
 Subject: RE: Tomcat does not respond
 
 SEVERE: Servlet.service() for servlet springapp threw exception
 java.lang.IllegalStateException: getOutputStream() has already been
 called for this response
 at org.apache.catalina.connector.Response.getWriter(Response.java:604)
 at 
 org.apache.catalina.connector.ResponseFacade.getWriter(ResponseFacade.java:198)
 at 
 org.springframework.web.servlet.view.json.JsonView.renderMergedOutputModel(JsonView.java:60)

It would seem like the first thing you need to do is fix your webapp so it 
doesn't provoke the above error.  If Spring intends to use the Writer 
associated with the Response object, you cannot use the OutputStream (and vice 
versa).  Fix the other parts of your webapp to use Response.getWriter(), not 
Response.getOutputStream().

 - 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



Diego Castorina | quince
--
mobile  
e-mail  di...@quince.nl
web www.quince.nl
--
assumburg 73
1081 gb amsterdam
the netherlands
tel: +31 (0)20 3471000
fax:+31 (0)20 3471005

P Please consider the environment before printing this email

Nederlands:
Dit bericht kan vertrouwelijke informatie bevatten. Indien u niet de 
geadresseerde van dit bericht bent, verzoeken wij u dit bericht te vernietigen 
zonder van de inhoud kennis te nemen en de inhoud ervan niet te gebruiken, niet 
te kopiëren en niet onder derden te verspreiden. Quince is een handelsnaam die 
wordt gevoerd door Quince B.V. te Amsterdam. Op alle werkzaamheden zijn de 
algemene voorwaarden en de algemene inkoopvoorwaarden van Quince B.V. van 
toepassing. In artikel 11 van de algemene voorwaarden en in artikel 9 van de 
algemene inkoopvoorwaarden is een beperking van aansprakelijkheid opgenomen. De 
voorwaarden zijn ook na te lezen op www.quince.nl/algemenevoorwaarden en 
www.quince.nl/inkoopvoorwaarden 

English:
This message may contain information that is privileged or confidential. If you 
are not the named addressee of this message, please destroy it without reading, 
using, copying or disclosing its contents to any other person. Quince is a 
trade name of Quince B.V. with its office in Amsterdam. All services are 
governed by the general terms and conditions and purchase terms and conditions 
of Quince B.V. . Article 11 of the general terms and conditions and article 9 
of the purchase terms and conditions contain a limitation of liability. A free 
copy of the general terms and conditions will be provided upon request. The 
conditions can also be read on www.quince.nl/termsandconditions and 
www.quince.nl/purchasetermsandconditions 



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



RE: Tomcat does not respond

2009-05-28 Thread Diego Castorina
Thanks for the tip.
How can I write this wrapper?
I can have different kind of client so I cannot encode the binary as string and 
decoding it on the client side.

-Original Message-
From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] 
Sent: giovedì 28 maggio 2009 16.12
To: Tomcat Users List
Subject: RE: Tomcat does not respond

 From: Diego Castorina [mailto:di...@quince.nl]
 Subject: RE: Tomcat does not respond
 
 I use the ServletOutputStream because I need to write binary directly
 in the response while with the PrintWriter I can only write character
 text to the client.

Then you may need to resort to your own wrapper for the Response object, and it 
can coordinate the use of the Writer with the OutputStream.

 I don't understand the reason for this exception since I don't use the
 JsonView class for the requests that return a binary as output.

The stack trace clearly shows you're mistaken.  You may not use it explicitly, 
but something you're using in Spring obviously does.

 - 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



Diego Castorina | quince
--
mobile  
e-mail  di...@quince.nl
web www.quince.nl
--
assumburg 73
1081 gb amsterdam
the netherlands
tel: +31 (0)20 3471000
fax:+31 (0)20 3471005

P Please consider the environment before printing this email

Nederlands:
Dit bericht kan vertrouwelijke informatie bevatten. Indien u niet de 
geadresseerde van dit bericht bent, verzoeken wij u dit bericht te vernietigen 
zonder van de inhoud kennis te nemen en de inhoud ervan niet te gebruiken, niet 
te kopiëren en niet onder derden te verspreiden. Quince is een handelsnaam die 
wordt gevoerd door Quince B.V. te Amsterdam. Op alle werkzaamheden zijn de 
algemene voorwaarden en de algemene inkoopvoorwaarden van Quince B.V. van 
toepassing. In artikel 11 van de algemene voorwaarden en in artikel 9 van de 
algemene inkoopvoorwaarden is een beperking van aansprakelijkheid opgenomen. De 
voorwaarden zijn ook na te lezen op www.quince.nl/algemenevoorwaarden en 
www.quince.nl/inkoopvoorwaarden 

English:
This message may contain information that is privileged or confidential. If you 
are not the named addressee of this message, please destroy it without reading, 
using, copying or disclosing its contents to any other person. Quince is a 
trade name of Quince B.V. with its office in Amsterdam. All services are 
governed by the general terms and conditions and purchase terms and conditions 
of Quince B.V. . Article 11 of the general terms and conditions and article 9 
of the purchase terms and conditions contain a limitation of liability. A free 
copy of the general terms and conditions will be provided upon request. The 
conditions can also be read on www.quince.nl/termsandconditions and 
www.quince.nl/purchasetermsandconditions 



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



Tomcat does not respond

2009-05-27 Thread Diego Castorina
Hi everyone,

 

We are currently running Tomcat 6.0.14 on a Ubuntu Server 8.04 and Java
1.6.

Two applications are running: 

-  One of them uses Spring MVC and Jackrabbit providing RESTful
API

-  The second is a client of the former with no database but it
is a Grails application 

 

The server completely stop responding around 2 times a day but nothing
emerges from the logs.

It hangs on every request, even on the index.htm containing a Hello
World

 

Any clues?



Diego Castorina | quince
--
mobile  
e-mail  di...@quince.nl
web www.quince.nl
--
assumburg 73
1081 gb amsterdam
the netherlands
tel: +31 (0)20 3471000
fax:+31 (0)20 3471005

P Please consider the environment before printing this email

Nederlands:
Dit bericht kan vertrouwelijke informatie bevatten. Indien u niet de 
geadresseerde van dit bericht bent, verzoeken wij u dit bericht te vernietigen 
zonder van de inhoud kennis te nemen en de inhoud ervan niet te gebruiken, niet 
te kopieren en niet onder derden te verspreiden. Quince is een handelsnaam die 
wordt gevoerd door Quince B.V. te Amsterdam. Op alle werkzaamheden zijn de 
algemene voorwaarden en de algemene inkoopvoorwaarden van Quince B.V. van 
toepassing. In artikel 11 van de algemene voorwaarden en in artikel 9 van de 
algemene inkoopvoorwaarden is een beperking van aansprakelijkheid opgenomen. De 
voorwaarden zijn ook na te lezen op www.quince.nl/algemenevoorwaarden en 
www.quince.nl/inkoopvoorwaarden 

English:
This message may contain information that is privileged or confidential. If you 
are not the named addressee of this message, please destroy it without reading, 
using, copying or disclosing its contents to any other person. Quince is a 
trade name of Quince B.V. with its office in Amsterdam. All services are 
governed by the general terms and conditions and purchase terms and conditions 
of Quince B.V. . Article 11 of the general terms and conditions and article 9 
of the purchase terms and conditions contain a limitation of liability. A free 
copy of the general terms and conditions will be provided upon request. The 
conditions can also be read on www.quince.nl/termsandconditions and 
www.quince.nl/purchasetermsandconditions 




Tomcat hangs due to socket reads?

2009-03-18 Thread Diego Manilla Suárez
Hi everyone. I'm running Tomcat 5.0.30 + Apache 2.2.3 on a SuSE EL 10. 
After a few days running, the CPU load increases, until Tomcat is eating 
99% of it, and I need to restart. The last time this happened, I 
executed jstack on the Tomcat VM, and I saw most of threads stacks are 
like this:


##
Thread 26701: (state = IN_NATIVE)
- java.net.SocketInputStream.socketRead0(java.io.FileDescriptor, 
byte[], int, int, int) @bci=0 (Compiled frame; information may be imprecise)
- java.net.SocketInputStream.read(byte[], int, int) @bci=84, line=129 
(Compiled frame)

- java.io.BufferedInputStream.fill() @bci=175, line=218 (Compiled frame)
- java.io.BufferedInputStream.read1(byte[], int, int) @bci=44, line=256 
(Compiled frame)
- java.io.BufferedInputStream.read(byte[], int, int) @bci=49, line=313 
(Compiled frame)
- 
org.apache.jk.common.ChannelSocket.read(org.apache.jk.core.MsgContext, 
byte[], int, int) @bci=32, line=598 (Compiled frame)
- org.apache.jk.common.ChannelSocket.receive(org.apache.jk.core.Msg, 
org.apache.jk.core.MsgContext) @bci=38, line=535 (Compiled frame)
- 
org.apache.jk.common.ChannelSocket.processConnection(org.apache.jk.core.MsgContext) 
@bci=28, line=663 (Compiled frame)
- org.apache.jk.common.SocketConnection.runIt(java.lang.Object[]) 
@bci=8, line=866 (Interpreted frame)
- org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run() 
@bci=167, line=684 (Interpreted frame)

- java.lang.Thread.run() @bci=11, line=595 (Interpreted frame)
##

This makes me think there is some issues with Apache - Tomcat connection 
or maybe some SO configuration, because the number of requests is not 
that high.


This is the configuration of the AJP connector on server.xml:

##
Connector port=8080
  maxThreads=10 minSpareThreads=1 maxSpareThreads=1
  enableLookups=false acceptCount=100
  debug=0
  disableUploadTimeout=true /
##

And the forwarding in Apache is done through mod_proxy_ajp, like this:

##
ProxyPass /frontdipuleon ajp://localhost:8009/myapp
ProxyPassReverse  /frontdipuleon ajp://localhost:8009/myapp
##

Any idea on what can be wrong? The only thing I tried now is setting a 
connectionTimeout on the AJP connector, but I think this wouldn't tell 
me the real cause of these problems. What else should I check?


Thanks in advance.



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



Re: Tomcat hangs due to socket reads?

2009-03-18 Thread Diego Manilla Suárez
Hi André. That was just an error when copying and pasting, I picked up 
the wrong connector. This is the right one:


##
Connector port=8009
   minProcessors=5 maxProcessors=150
   enableLookups=false redirectPort=443 debug=0
   protocol=AJP/1.3 /
##

Thanks for pointing that out.


André Warnier escribió:

Diego Manilla Suárez wrote:
[...]
Hi.
No idea about your problem, but in the information you provide, you 
are showing the Apache connecting to port 8009 of Tomcat, but for 
Tomcat you are showing the Connector that listens on port 8080.

That's probably not very helpful.

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










http-only cookies

2009-01-07 Thread Diego Armando Gusava
Http-Only is support Tomcat 6?

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



Re: j_security_check with https

2009-01-06 Thread Diego Armando Gusava
 i dont know how to request j_security_check on https!

 i attemped http://wiki.apache.org/tomcat/SSLWithFORMFallback but didnt work

 login-config
 !--auth-methodFORM/auth-method--
  form-login-config
  form-login-page/login.do/form-login-page
 form-error-page/login/loginError.jsp/form-error-page
  /form-login-config
 /login-config

 tomcat redirect to Http!

 cheers

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



Re: j_security_check with https

2009-01-06 Thread Diego Armando Gusava
let me explain

when i try to access mySecurePath for example, tomcat show me a login
page with https but after that i dont need for example be with https,
because i only need to send protected username and password.

i want to only need login.jsp with https!!



2009/1/6 Pid p...@pidster.com:
 Diego Armando Gusava wrote:
  i dont know how to request j_security_check on https!

  i attemped http://wiki.apache.org/tomcat/SSLWithFORMFallback but didnt work

 I think the above attempts to find an SSL cert, but falls back to FORM
 auth.  Which isn't perhaps what you want?

  login-config
  !--auth-methodFORM/auth-method--
   form-login-config
   form-login-page/login.do/form-login-page
  form-error-page/login/loginError.jsp/form-error-page
   /form-login-config
  /login-config

 Set transport-guaranteeCONFIDENTIAL/transport-guarantee in the
 security constraint section, as below.  Ensure that you have an SSL
 enabled connector and that the redirect port on the normal connector
 matches the SSL port.

  security-constraint
web-resource-collection
  web-resource-nameProtected Area/web-resource-name

  url-pattern/mySecurePath//url-pattern

  http-methodGET/http-method
...
  http-methodPOST/http-method
/web-resource-collection
auth-constraint
  role-namerolename/role-name
/auth-constraint
user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
  /security-constraint

 p


  tomcat redirect to Http!

  cheers

 -
 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



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



Re: j_security_check with https

2009-01-06 Thread Diego Armando Gusava
orm Based Authentication has the same lack of security as Basic
Authentication since the user password is transmitted as plain text
and the target
server is not authenticated. Again additional protection can alleviate
some of these
concerns: a secure transport mechanism (HTTPS).

i want  secure transport mechanism (HTTPS)

how can i do it?

2009/1/6 Diego Armando Gusava diegogus...@gmail.com:
 let me explain

 when i try to access mySecurePath for example, tomcat show me a login
 page with https but after that i dont need for example be with https,
 because i only need to send protected username and password.

 i want to only need login.jsp with https!!



 2009/1/6 Pid p...@pidster.com:
 Diego Armando Gusava wrote:
  i dont know how to request j_security_check on https!

  i attemped http://wiki.apache.org/tomcat/SSLWithFORMFallback but didnt work

 I think the above attempts to find an SSL cert, but falls back to FORM
 auth.  Which isn't perhaps what you want?

  login-config
  !--auth-methodFORM/auth-method--
   form-login-config
   form-login-page/login.do/form-login-page
  
 form-error-page/login/loginError.jsp/form-error-page
   /form-login-config
  /login-config

 Set transport-guaranteeCONFIDENTIAL/transport-guarantee in the
 security constraint section, as below.  Ensure that you have an SSL
 enabled connector and that the redirect port on the normal connector
 matches the SSL port.

  security-constraint
web-resource-collection
  web-resource-nameProtected Area/web-resource-name

  url-pattern/mySecurePath//url-pattern

  http-methodGET/http-method
...
  http-methodPOST/http-method
/web-resource-collection
auth-constraint
  role-namerolename/role-name
/auth-constraint
user-data-constraint
  transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint
  /security-constraint

 p


  tomcat redirect to Http!

  cheers

 -
 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




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



Re: j_security_check with https

2009-01-06 Thread Diego Armando Gusava
no man, example, email

when u login, your username and password will be transport https, but
after that, you are in http! u dont need https because, you are only
reading messages(emails)

2009/1/6 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Diego Armando Gusava [mailto:diegogus...@gmail.com]
 Subject: Re: j_security_check with https

 when i try to access mySecurePath for example, tomcat show me a login
 page with https but after that i dont need for example be with https,
 because i only need to send protected username and password.

 i want to only need login.jsp with https!!

 You cannot switch a secure (HTTPS) session to an insecure transport (HTTP) - 
 your login would be worthless if you could.  Once you log in via SSL, you'll 
 need to stay with HTTPS to utilize the session.

  - Chuck


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

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



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



Re: j_security_check with https

2009-01-06 Thread Diego Armando Gusava
this didnt work

security-constraint

web-resource-collection

web-resource-nameUsuario/web-resource-name  
url-pattern/login/*/url-pattern
http-methodPOST/http-method
http-methodGET/http-method  

/web-resource-collection
user-data-constraint

transport-guaranteeCONFIDENTIAL/transport-guarantee
/user-data-constraint

/security-constraint

if i try myAPP/login/login.jsp  work, but when i try an action and
has restrict access, and havent user logged, tomcat redirect to login
page with http !!!

2009/1/6 Caldarale, Charles R chuck.caldar...@unisys.com:
 From: Diego Armando Gusava [mailto:diegogus...@gmail.com]
 Subject: Re: j_security_check with https

 when u login, your username and password will be transport https, but
 after that, you are in http! u dont need https because, you are only
 reading messages(emails)

 And what does that have to do with the behavior of a servlet container?

  - Chuck


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

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



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



Re: j_security_check with https

2009-01-06 Thread Diego Armando Gusava
My question is how to combine the form based authentication, where we use
jsecuritycheck , jusername etc with https.
As far as I know if we use form based authentication username and
password will be authenticated by the container managed resource
called 'jsecuritycheck. But the data transfer from client browser to
tomcat will be still a plain text. i want to encrypt this and
obviously i need to use https.
So how to combine both  and how tomcat wil help me doping this??

2009/1/6 Mark Thomas ma...@apache.org:
 Gregor Schneider wrote:
 On Tue, Jan 6, 2009 at 9:13 PM, Diego Armando Gusava
 diegogus...@gmail.com wrote:
 no man, example, email

 when u login, your username and password will be transport https, but
 after that, you are in http! u dont need https because, you are only
 reading messages(emails)


 Then just phrase your url-pattern in your security-constraint-section
 accordingly - should work.

 It won't. Tomcat won't let a session created under HTTPS transition to HTTP as
 the session ID is effectively the password. If the password needed HTTPS then
 the session ID does too.

 Mark


 -
 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



From which stable version Tomcat uses java NIO

2008-08-26 Thread Diego Bolanos
From which stable version Tomcat uses java NIO

I spend 30 minutes on google looking for the first stable version of Tomcat
that make use of Java NIO package.

Since I didn't get good results I have to ask here.

Please advise and thanks



-- 
Luis Diego Bolaños Quiros


javax.servlet.ServletException: Cannot find bean usersList in scope request

2008-07-25 Thread Carlos Morales Diego


Hello everyone,


Could anyone help me, please?

I have this mistake and I don't kow how to fix it:




org.apache.jasper.JasperException: Exception in JSP: /web_adminContent.jsp:23

20: Users Name
21: Country
22: 
23: 
24: 
25: 
26: 


Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



causa raíz

javax.servlet.ServletException: Cannot find bean usersList in scope request

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:150)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



causa raíz

javax.servlet.jsp.JspException: Cannot find bean usersList in scope request
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)

org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)

org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:98)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



nota La traza completa de la causa de este error se encuentra en los archivos 
de diario de Apache Tomcat/5.5.16.


And sources are these:

//web_userContent.jsp





Normalization



 


-- Select -- 

Filtering


Menten
CBS


View Chromosomes
Heat Map


Compare Methods










Project(s)' Users Management page :


Click on IdProject to see all your chips which you have put on this project
Project Name is the Project's name
Number Arrays is the Analyzed Chips



IdProject
PROJECT NAME
Number Arrays






Create Project








//Web_UserAction.java

package com.genausal.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;


import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionServlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;

import com.genausal.databases.util.ConnectionPool;
import com.genausal.databases.UsersDAO;
import com.genausal.entity.Users;

/** 
 * MyEclipse Struts
 * Creation date: 06-26-2008
 * 
 * XDoclet definition:
 * @struts.action validate=true
 * @struts.action-forward name=success path=/web_admin.jsp
 */
public class Web_AdminAction extends Action {

// - Instance 
Variables
   private ConnectionPool pool;
// - Methods

/** 
 * Method execute
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return ActionForward
 */
 
 public Web_AdminAction(){
 pool=ConnectionPool.getInstance();
 }
   
   
public ActionForward perform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)throws 
IOException,ServletException {

Connection con=null;
try{
con=pool.getConnection();
UsersDAO usersDAO=new UsersDAO(con);
Collection col=usersDAO.findAll();

request.setAttribute(BeanNames.USER_LIST,col);

return  mapping.findForward(success);
}catch (SQLException e){
  

RE: javax.servlet.ServletException: Cannot find bean usersList in scope request

2008-07-25 Thread Carlos Morales Diego



The jsp file is this one:



I write in a comment because if not you can't see it


 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: javax.servlet.ServletException: Cannot find bean usersList in scope 
 request
 Date: Fri, 25 Jul 2008 17:40:53 +



 Hello everyone,


 Could anyone help me, please?

 I have this mistake and I don't kow how to fix it:




 org.apache.jasper.JasperException: Exception in JSP: /web_adminContent.jsp:23

 20: Users Name
 21: Country
 22:
 23:
 24:
 25: 
 26:


 Stacktrace:
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



 causa raíz

 javax.servlet.ServletException: Cannot find bean usersList in scope request
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
 org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:150)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



 causa raíz

 javax.servlet.jsp.JspException: Cannot find bean usersList in scope request
 org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
 org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
 org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:98)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



 nota La traza completa de la causa de este error se encuentra en los archivos 
 de diario de Apache Tomcat/5.5.16.


 And sources are these:

 //web_userContent.jsp





 Normalization






 -- Select --

 Filtering


 Menten
 CBS


 View Chromosomes
 Heat Map


 Compare Methods










 Project(s)' Users Management page :


 Click on IdProject to see all your chips which you have put on this project
 Project Name is the Project's name
 Number Arrays is the Analyzed Chips



 IdProject
 PROJECT NAME
 Number Arrays






 Create Project








 //Web_UserAction.java

 package com.genausal.actions;

 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.ServletException;


 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionServlet;

 import java.io.IOException;
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.Collection;

 import com.genausal.databases.util.ConnectionPool;
 import com.genausal.databases.UsersDAO;
 import com.genausal.entity.Users;

 /**
 * MyEclipse Struts
 * Creation date: 06-26-2008
 *
 * XDoclet definition:
 * @struts.action validate=true
 * @struts.action-forward name=success path=/web_admin.jsp
 */
 public class Web_AdminAction extends Action {

 // - Instance 
 Variables
 private ConnectionPool pool;
 // - Methods

 /**
 * Method execute
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return ActionForward
 */

 public Web_AdminAction(){
 pool=ConnectionPool.getInstance();
 }


 public ActionForward perform(
 ActionMapping mapping,
 ActionForm form,
 HttpServletRequest request,
 HttpServletResponse response)throws IOException,ServletException {

 Connection con=null;
 try{
 con=pool.getConnection();
 UsersDAO usersDAO=new UsersDAO(con);
 Collection col=usersDAO.findAll();

 request.setAttribute(BeanNames.USER_LIST,col);

 return mapping.findForward(success);
 }catch (SQLException e){
 e.printStackTrace();
 throw new RuntimeException(It's impossible to get the connection);
 }finally{
 try{
 if(con!=null)
 con.close();
 }catch(SQLException e){
 throw new RuntimeException(e.getMessage());
 }
 }

 }

 }

 //UsersDAO-findAll()

 

javax.mail.AuthenticationFailedException

2008-07-22 Thread Carlos Morales Diego


Hello all,

Could anyone help me, please?, I've been trying to solve this mistake but it's 
impossible and I don't know what I can do.

This is the mistake:

org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:25

22: 
23: Store store=s.getStore(pop3);
24: store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
25: Transport.send(message);
26: 
27: store.close();
28: %


Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz 

javax.servlet.ServletException

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:94)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz 

javax.mail.AuthenticationFailedException
javax.mail.Service.connect(Service.java:306)
javax.mail.Service.connect(Service.java:156)
javax.mail.Service.connect(Service.java:105)
javax.mail.Transport.send0(Transport.java:168)
javax.mail.Transport.send(Transport.java:98)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:71)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


And this the source:

Properties props=new Properties();
props.put(mail.smtp.host,smtp.correo.yahoo.es);
props.put(mail.smtp.port,25);
props.put(mail.smtps.port, 465); 
props.put(mail.smtp.auth, true);
Session s=Session.getInstance(props);
s.setDebug(true);


MimeMessage message=new MimeMessage(s);

InternetAddress from=new InternetAddress([EMAIL PROTECTED]);
message.setFrom(from);
InternetAddress to=new InternetAddress([EMAIL PROTECTED]);
message.addRecipient(Message.RecipientType.TO,to);

message.setSubject(Prueba de JavaMail);
message.setText(Saludo de JavaMail);

Store store=s.getStore(pop3);
store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
Transport.send(message);

store.close();


Where is my mistake?, Thanks a lot.

_
Hazte tu propia televisión a la carta. Música, noticias, estrenos, cine, humor 
y viajes en MSN Vídeo
http://video.msn.com/?mkt=es-es
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: javax.mail.AuthenticationFailedException

2008-07-22 Thread Carlos Morales Diego

The line which you say I have it. It's this one
 
store.connect(pop.correo.yahoo.es,chikichiki,bezos11); where chikichiki 
is the user name and bezos11 is the password.
 
 Date: Tue, 22 Jul 2008 14:38:19 -0400 From: [EMAIL PROTECTED] To: 
 users@tomcat.apache.org Subject: Re: 
 javax.mail.AuthenticationFailedException  I don't use Yahoo! email so take 
 this with a grain of salt, but this  error looks pretty clear cut to me. 
 Yahoo's SMTP server wants username  and password, but you aren't sending 
 any.  --David   Carlos Morales Diego wrote:  Hello all,   Could 
 anyone help me, please?, I've been trying to solve this mistake but it's 
 impossible and I don't know what I can do.   This is the mistake:   
 org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:25   
 22:   23: Store store=s.getStore(pop3);  24: 
 store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);  25: 
 Transport.send(message);  26:   27: store.close();  28: %
 Stacktrace:  
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
   
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)causa 
 raízjavax.servlet.ServletException  
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
   
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
   org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:94)  
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)  
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)  
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)causa 
 raízjavax.mail.AuthenticationFailedException  
 javax.mail.Service.connect(Service.java:306)  
 javax.mail.Service.connect(Service.java:156)  
 javax.mail.Service.connect(Service.java:105)  
 javax.mail.Transport.send0(Transport.java:168)  
 javax.mail.Transport.send(Transport.java:98)  
 org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:71)  
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)  
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)  
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314) 
  org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)  
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)And 
 this the source:   Properties props=new Properties();  
 props.put(mail.smtp.host,smtp.correo.yahoo.es);  
 props.put(mail.smtp.port,25);  props.put(mail.smtps.port, 465);   
 props.put(mail.smtp.auth, true);  Session 
 s=Session.getInstance(props);  s.setDebug(true);  MimeMessage 
 message=new MimeMessage(s);InternetAddress from=new 
 InternetAddress([EMAIL PROTECTED]);  message.setFrom(from);  
 InternetAddress to=new InternetAddress([EMAIL PROTECTED]);  
 message.addRecipient(Message.RecipientType.TO,to);
 message.setSubject(Prueba de JavaMail);  message.setText(Saludo de 
 JavaMail);Store store=s.getStore(pop3);  
 store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);  
 Transport.send(message);store.close();Where is my mistake?, 
 Thanks a lot.   
 _  Hazte tu 
 propia televisión a la carta. Música, noticias, estrenos, cine, humor y 
 viajes en MSN Vídeo  http://video.msn.com/?mkt=es-es  
 -  To 
 start a new topic, e-mail: users@tomcat.apache.org  To unsubscribe, e-mail: 
 [EMAIL PROTECTED]  For additional commands, e-mail: [EMAIL PROTECTED]   
- 
 To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, 
 e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL 
 PROTECTED] 
_
Hazte tu propia televisión a la carta. Música, noticias, estrenos, cine, humor 
y viajes en MSN Vídeo
http://video.msn.com/?mkt=es-es

RE: javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-17 Thread Carlos Morales Diego


Hello Jonas,


I still have the same mistake, so I don't know, this is my code

Properties props=new Properties();
props.put(correo.smtp.host,smtp.correo.yahoo.es);
props.put(correo.smtp.port,25);
props.put(correo.smtp.auth, true);
Session s=Session.getInstance(props);


MimeMessage message=new MimeMessage(s);

InternetAddress from=new InternetAddress([EMAIL PROTECTED]);
message.setFrom(from);
InternetAddress to=new InternetAddress([EMAIL PROTECTED]);
message.addRecipient(Message.RecipientType.TO,to);

message.setSubject(Prueba de JavaMail);
message.setText(Saludo de JavaMail);

Store store=s.getStore(pop3);
store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
Transport.send(message);

store.close();

And I don't know. Any advice?

Thanks so much

 Subject: RE: javax.servlet.ServletException: Could not connect to SMTP host: 
 localhost, port: 25
 Date: Mon, 14 Jul 2008 14:14:40 +0200
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org

 Hello,

 It looks to me as if you didn't configure any SMTP server. You need to
 do something like:
 Properties smtpProperties = new Properties();
 smtpProperties.put(mail.smtp.host, smtp.example.com);
 smtpProperties.put(mail.smtp.auth, true);

 // create the mime message

 Session session = Session.getDefaultInstance(smtpProperties);
 Transport transport = session.getTransport(smtp);
 transport.connect(smtpHost, smtpUser, smtpPasswd);
 mimeMessage.saveChanges();
 transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
 transport.close();

 I don't know JavaMail that well, so I cannot tell you how it's supposed
 to work with the static Transport::send() method, but you can probably
 set the SMTP server in a property file.

 org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22

 19: Store store=s.getStore(pop3);
 20:
 store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
 21:
 22: Transport.send(message);
 23:
 24: store.close();
 25: %

 I don't quite see what the store does in your code. Is this some sort of
 pop-before-smtp authentification?

 Greetings,
 Jonas

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


_
Herramientas para combatir la crisis. MSN Dinero
http://dinero.es.msn.com/
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-17 Thread Carlos Morales Diego


Hello,



I did it and now I have this one:


org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22

19: message.setText(Saludo de JavaMail);
20:
21: Store store=s.getStore(pop3);
22: store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
23: Transport.send(message);
24:
25: store.close();


Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



causa raíz

javax.servlet.ServletException: [IN-USE] maildrop busy.

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:91)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



causa raíz

javax.mail.AuthenticationFailedException: [IN-USE] maildrop busy.
com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:146)
javax.mail.Service.connect(Service.java:275)
javax.mail.Service.connect(Service.java:156)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)



 Date: Thu, 17 Jul 2008 12:47:40 +0300
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: Re: javax.servlet.ServletException: Could not connect to SMTP host: 
 localhost, port: 25

 try this ..
 props.put(mail.smtp.host,smtp.correo.yahoo.es);
 props.put(mail.smtp.port,25);
 props.put(mail.smtp.auth, true);


 On Thu, Jul 17, 2008 at 12:41 PM, Carlos Morales Diego 
 [EMAIL PROTECTED] wrote:



 Hello Jonas,


 I still have the same mistake, so I don't know, this is my code

 Properties props=new Properties();
 props.put(mail.smtp.host,smtp.correo.yahoo.es);
 props.put(mail.smtp.port,25);
 props.put(mail.smtp.auth, true);
 Session s=Session.getInstance(props);


 MimeMessage message=new MimeMessage(s);

 InternetAddress from=new InternetAddress([EMAIL PROTECTED]);
 message.setFrom(from);
 InternetAddress to=new InternetAddress([EMAIL PROTECTED]);
 message.addRecipient(Message.RecipientType.TO,to);

 message.setSubject(Prueba de JavaMail);
 message.setText(Saludo de JavaMail);

 Store store=s.getStore(pop3);
 store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED]
 ,bezos11);
 Transport.send(message);

 store.close();

 And I don't know. Any advice?

 Thanks so much

 Subject: RE: javax.servlet.ServletException: Could not connect to SMTP
 host: localhost, port: 25
 Date: Mon, 14 Jul 2008 14:14:40 +0200
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org

 Hello,

 It looks to me as if you didn't configure any SMTP server. You need to
 do something like:
 Properties smtpProperties = new Properties();
 smtpProperties.put(mail.smtp.host, smtp.example.com);
 smtpProperties.put(mail.smtp.auth, true);

 // create the mime message

 Session session = Session.getDefaultInstance(smtpProperties);
 Transport transport = session.getTransport(smtp);
 transport.connect(smtpHost, smtpUser, smtpPasswd);
 mimeMessage.saveChanges();
 transport.sendMessage(mimeMessage, mimeMessage.getAllRecipients());
 transport.close();

 I don't know JavaMail that well, so I cannot tell you how it's supposed
 to work with the static Transport::send() method, but you can probably
 set the SMTP server in a property file.

 org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22

 19: Store store=s.getStore(pop3);
 20:
 store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
 21:
 22: Transport.send(message);
 23:
 24: store.close();
 25: %

 I don't quite see what the store does in your code. Is this some sort of
 pop-before-smtp authentification?

 Greetings,
 Jonas

 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e

javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-14 Thread Carlos Morales Diego

Hey all,


I'm having problems with Javamail and I don't know why, the trace of the 
mistake is this one:



org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22

19: Store store=s.getStore(pop3);
20: store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
21: 
22: Transport.send(message);
23: 
24: store.close();
25: %


Stacktrace:

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz 

javax.servlet.ServletException: Could not connect to SMTP host: localhost, 
port: 25

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:90)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz 

javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 
25;
  nested exception is:
java.net.ConnectException: Connection refused: connect
com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
javax.mail.Service.connect(Service.java:275)
javax.mail.Service.connect(Service.java:156)
javax.mail.Service.connect(Service.java:105)
javax.mail.Transport.send0(Transport.java:168)
javax.mail.Transport.send(Transport.java:98)
org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:67)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


And the file source is this one:








Mail has been sent
Compruebe bandeja de entrada


Mail has been sent
Pulse aquí para enviar otro






Could anyone help me, please?. Thank you all.

Carlos

_
Tu mejor plan para el fin de semana y toda la actualidad del mundo del corazón. 
Entra en MSN Entretenimiento
http://entretenimiento.es.msn.com/
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: javax.servlet.ServletException: Could not connect to SMTP host: localhost, port: 25

2008-07-14 Thread Carlos Morales Diego

This is the source







Mail has been sent
Compruebe bandeja de entrada


Mail has been sent
Pulse aquí para enviar otro




--
 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: javax.servlet.ServletException: Could not connect to SMTP host: 
 localhost, port: 25
 Date: Mon, 14 Jul 2008 10:45:56 +


 Hey all,


 I'm having problems with Javamail and I don't know why, the trace of the 
 mistake is this one:



 org.apache.jasper.JasperException: Exception in JSP: /sendmail.jsp:22

 19: Store store=s.getStore(pop3);
 20: store.connect(pop.correo.yahoo.es,[EMAIL PROTECTED],bezos11);
 21:
 22: Transport.send(message);
 23:
 24: store.close();
 25: %


 Stacktrace:
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 causa raíz

 javax.servlet.ServletException: Could not connect to SMTP host: localhost, 
 port: 25
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
 org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:90)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 causa raíz

 javax.mail.MessagingException: Could not connect to SMTP host: localhost, 
 port: 25;
 nested exception is:
 java.net.ConnectException: Connection refused: connect
 com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1282)
 com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:370)
 javax.mail.Service.connect(Service.java:275)
 javax.mail.Service.connect(Service.java:156)
 javax.mail.Service.connect(Service.java:105)
 javax.mail.Transport.send0(Transport.java:168)
 javax.mail.Transport.send(Transport.java:98)
 org.apache.jsp.sendmail_jsp._jspService(sendmail_jsp.java:67)
 org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
 org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
 org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
 javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


 And the file source is this one:








 Mail has been sent
 Compruebe bandeja de entrada


 Mail has been sent
 Pulse aquí para enviar otro






 Could anyone help me, please?. Thank you all.

 Carlos

 _
 Tu mejor plan para el fin de semana y toda la actualidad del mundo del 
 corazón. Entra en MSN Entretenimiento
 http://entretenimiento.es.msn.com/
 -
 To start a new topic, e-mail: users@tomcat.apache.org
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]


_
La última hora de tu ciudad en MSN Noticias
http://noticias.es.msn.com/
-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



org.apache.jasper.JasperException: Cannot find bean usersList in scope request

2008-07-12 Thread Carlos Morales Diego

 Hello everyone,
 
I have the next problem with my JSP files. I have the next mistake and I don't 
know how to fix it:
 
excepción org.apache.jasper.JasperException: Cannot find bean usersList in 
scope request

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz javax.servlet.ServletException: Cannot find bean usersList in scope 
request

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:150)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz javax.servlet.jsp.JspException: Cannot find bean usersList in scope 
request
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)

org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)

org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:98)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802) These are 
the sources:indexContent.jsp%@ taglib uri=/bean prefix=bean %%@ taglib 
uri=/html prefix=html %%@ taglib uri=/logic prefix=logic %%@ taglib 
uri=/template prefix=template %  br/br/html:errors/centerh2Users 
Management page :/h2/centercentertable width=70%trth width=25% 
bgcolor=#c7c1c0Passport/thth width=30% bgcolor=#F27600Users Name/thth 
width=25% bgcolor=#c7c1c0Country/th/trlogic:iterate id=users 
name=usersList scope=request type=com.genausal.entity.Userstra 
href=consultuseradmin.do?passport_id=bean:write name=users 
property=passport_id/bean:write name=users 
property=passport_id//a/trtrbean:write name=users 
property=first_name//trtrbean:write name=users 
property=country//tr/logic:iterate/table/centerWeb_AdminAction.java://Created
 by MyEclipse Struts// XSL source (default): 
platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.1/xslt/JavaClass.xslpackage
 com.genausal.actions;import javax.servlet.http.HttpServletRequest;import 
javax.servlet.http.HttpServletResponse;import 
javax.servlet.ServletException;import org.apache.struts.action.Action;import 
org.apache.struts.action.ActionForm;import 
org.apache.struts.action.ActionForward;import 
org.apache.struts.action.ActionMapping;import 
org.apache.struts.action.ActionErrors;import 
org.apache.struts.action.ActionError;import 
org.apache.struts.action.ActionServlet;import java.io.IOException;import 
java.sql.Connection;import java.sql.SQLException;import 
java.util.Collection;import com.genausal.databases.util.ConnectionPool;import 
com.genausal.databases.UsersDAO;import com.genausal.entity.Users;/**  * 
MyEclipse Struts * Creation date: 06-26-2008 *  * XDoclet definition: * 
@struts.action validate=true * @struts.action-forward name=success 
path=/web_admin.jsp */public class Web_AdminAction extends Action { // 
- Instance Variables
   private ConnectionPool pool; // 
- Methods /**   * 
Method execute  * @param mapping  * @param form  * @param request  * @param 
response  * @return ActionForward  */  public Web_AdminAction(){  
pool=ConnectionPool.getInstance(); }   public ActionForward 
perform(  ActionMapping mapping,  ActionForm form,  HttpServletRequest request, 
 HttpServletResponse response)throws IOException,ServletException {  Connection 
con=null;  try{   con=pool.getConnection();   UsersDAO usersDAO=new 
UsersDAO(con);   Collection col=usersDAO.findAll();  
request.setAttribute(BeanNames.USER_LIST,col); return  
mapping.findForward(success);  }catch (SQLException e){   
e.printStackTrace();   throw new RuntimeException(It's impossible to get the 

org.apache.jasper.JasperException: Cannot find bean usersList in scope request

2008-07-12 Thread Carlos Morales Diego


Hey all,

Could anyone help me, please?. I have the next mistake and I'm trying to fix it 
but I don't achieve it. This is the mistake:

excepción 

org.apache.jasper.JasperException: Cannot find bean usersList in scope request

org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz 

javax.servlet.ServletException: Cannot find bean usersList in scope request

org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)

org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)

org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:150)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


causa raíz 

javax.servlet.jsp.JspException: Cannot find bean usersList in scope request
org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)

org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)

org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:98)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


And these are the source which I use for doing it:

web_adminContent.jsp













Users Management page :





Passport
Users Name
Country

















Web_AdminAction.java :

//Created by MyEclipse Struts
// XSL source (default): 
platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.1/xslt/JavaClass.xsl

package com.genausal.actions;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.ServletException;


import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionServlet;

import java.io.IOException;
import java.sql.Connection;
import java.sql.SQLException;
import java.util.Collection;

import com.genausal.databases.util.ConnectionPool;
import com.genausal.databases.UsersDAO;
import com.genausal.entity.Users;

/** 
 * MyEclipse Struts
 * Creation date: 06-26-2008
 * 
 * XDoclet definition:
 * @struts.action validate=true
 * @struts.action-forward name=success path=/web_admin.jsp
 */
public class Web_AdminAction extends Action {

// - Instance 
Variables
   private ConnectionPool pool;
// - Methods

/** 
 * Method execute
 * @param mapping
 * @param form
 * @param request
 * @param response
 * @return ActionForward
 */
 
 public Web_AdminAction(){
 pool=ConnectionPool.getInstance();
 }
   
   
public ActionForward perform(
ActionMapping mapping,
ActionForm form,
HttpServletRequest request,
HttpServletResponse response)throws 
IOException,ServletException {

Connection con=null;
try{
con=pool.getConnection();
UsersDAO usersDAO=new UsersDAO(con);
Collection col=usersDAO.findAll();

request.setAttribute(BeanNames.USER_LIST,col);

return  mapping.findForward(success);
}catch (SQLException e){
e.printStackTrace();
throw new RuntimeException(It's impossible to get the 
connection);
}finally{
try{
if(con!=null)

RE: org.apache.jasper.JasperException: Cannot find bean usersList in scope request

2008-07-12 Thread Carlos Morales Diego

web_adminContent.jsp is:













Users Management page :





Passport
Users Name
Country

















Thanks



 From: [EMAIL PROTECTED]
 To: users@tomcat.apache.org
 Subject: org.apache.jasper.JasperException: Cannot find bean usersList in 
 scope request
 Date: Sat, 12 Jul 2008 16:10:39 +
 
 
 
 Hey all,
 
 Could anyone help me, please?. I have the next mistake and I'm trying to fix 
 it but I don't achieve it. This is the mistake:
 
 excepción 
 
 org.apache.jasper.JasperException: Cannot find bean usersList in scope request
   
 org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:510)
   
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:375)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
 causa raíz 
 
 javax.servlet.ServletException: Cannot find bean usersList in scope request
   
 org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:858)
   
 org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
   
 org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:150)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
 causa raíz 
 
 javax.servlet.jsp.JspException: Cannot find bean usersList in scope request
   org.apache.struts.util.RequestUtils.lookup(RequestUtils.java:940)
   
 org.apache.struts.taglib.logic.IterateTag.doStartTag(IterateTag.java:277)
   
 org.apache.jsp.web_005fadminContent_jsp._jspService(web_005fadminContent_jsp.java:98)
   org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
   
 org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
   org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
   org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
   javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 
 
 And these are the source which I use for doing it:
 
 web_adminContent.jsp
 
 
 
 
 
 
 
 
 
 
 
 
 
 Users Management page :
 
 
 
 
 
 Passport
 Users Name
 Country
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Web_AdminAction.java :
 
 //Created by MyEclipse Struts
 // XSL source (default): 
 platform:/plugin/com.genuitec.eclipse.cross.easystruts.eclipse_4.1.1/xslt/JavaClass.xsl
 
 package com.genausal.actions;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.ServletException;
 
 
 import org.apache.struts.action.Action;
 import org.apache.struts.action.ActionForm;
 import org.apache.struts.action.ActionForward;
 import org.apache.struts.action.ActionMapping;
 import org.apache.struts.action.ActionErrors;
 import org.apache.struts.action.ActionError;
 import org.apache.struts.action.ActionServlet;
 
 import java.io.IOException;
 import java.sql.Connection;
 import java.sql.SQLException;
 import java.util.Collection;
 
 import com.genausal.databases.util.ConnectionPool;
 import com.genausal.databases.UsersDAO;
 import com.genausal.entity.Users;
 
 /** 
  * MyEclipse Struts
  * Creation date: 06-26-2008
  * 
  * XDoclet definition:
  * @struts.action validate=true
  * @struts.action-forward name=success path=/web_admin.jsp
  */
 public class Web_AdminAction extends Action {
 
   // - Instance 
 Variables
private ConnectionPool pool;
   // - Methods
 
   /** 
* Method execute
* @param mapping
* @param form
* @param request
* @param response
* @return ActionForward
*/
  
  public Web_AdminAction(){
pool=ConnectionPool.getInstance();
  }


   public ActionForward perform(
   ActionMapping mapping,
   ActionForm form,
   HttpServletRequest request,
   HttpServletResponse response)throws 
 IOException,ServletException {
 
   Connection con=null;
   try{
   con=pool.getConnection();
   UsersDAO usersDAO=new UsersDAO(con);
   Collection col=usersDAO.findAll();
   
   

isapi_redirect.dll without Tomcat

2008-06-18 Thread Diego Fdez . Durán
Hi,

 I've two hosts:
  Host A: Windows 2003, IIS 6.0, isapi_redirect.dll 1.2.26.
  Host B: Windows 2003, Tomcat 6.

 I've done the steps in the manual[1] and then a configuration using only
.properties file[2] and not the registry, but I only get a red
down-pointing arrow in the Filters configuration tab and no logs from
isapi_redirect.

 What I'm trying to achieve is that Host A redirect requests to Host B,
but I don't want Tomcat to be installed in Host A. Is it posible? Can
isapi_redirect.dll work without Tomcat installed?

 Thanks in advance.

[1] http://tomcat.apache.org/connectors-doc/webserver_howto/iis.html
[2] http://www.mail-archive.com/users@tomcat.apache.org/msg45734.html

-- 
Diego Fdez. Durán [EMAIL PROTECTED] | http://www.goedi.net
GPG : 925C 9A21 7A11 3B13 6E43 50DB F579 D119 90D2 66BB


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



Re: Manager undeploy task only stops webapp

2008-03-04 Thread Diego Rodríguez Martín

Hi,

   I've found the problem. As you said, it was a problem of 
configuration. I defined the docbase and also was using localwar 
parameter in ant task with the same dir as docbase. Removing the 
localwar parameter in ant task solved the problem


   Many thanks

   Diego


Caldarale, Charles R escribió:
From: Diego Rodríguez Martín [mailto:[EMAIL PROTECTED] 
Subject: Re: Manager undeploy task only stops webapp


I'm still investigating this issue. Same behaviour if I 
use manager directly through the interface instead of 
using ant task.



Undeployment via the manager webapp in 6.0.16 works fine for me.  Is the webapp 
you're trying to manipulate configured incorrectly, by any chance?  Things that were 
errors but largely ignored in 4.1 may have different side effects in 5.5 and 6.0 
(e.g., having an app with docBase == appBase, or invalidly specifying a path 
attribute in a Context element).

 - Chuck


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

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


  

--
-
Diego Rodríguez Martín
www.programacionenjava.com
-



Re: Manager undeploy task only stops webapp

2008-02-19 Thread Diego Rodríguez Martín
)
   at java.net.ServerSocket.implAccept(ServerSocket.java:450)
   at java.net.ServerSocket.accept(ServerSocket.java:421)
   at 
org.apache.tomcat.util.net.DefaultServerSocketFactory.acceptSocket(DefaultServerSocketFactory.java:61)
   at 
org.apache.tomcat.util.net.JIoEndpoint$Acceptor.run(JIoEndpoint.java:310)

   at java.lang.Thread.run(Thread.java:595)

ContainerBackgroundProcessor[StandardEngine[Catalina]] daemon prio=6 
tid=0x0af2ff80 nid=0xf3c waiting on condition [0x0b50f000..0x0b50f9e8]

   at java.lang.Thread.sleep(Native Method)
   at 
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1579)

   at java.lang.Thread.run(Thread.java:595)

Low Memory Detector daemon prio=6 tid=0x0096dbf8 nid=0x264 runnable 
[0x..0x]


CompilerThread0 daemon prio=10 tid=0x0096c888 nid=0xa78 waiting on 
condition [0x..0x0abff848]


Signal Dispatcher daemon prio=10 tid=0x0096bc08 nid=0xd38 waiting on 
condition [0x..0x]


Finalizer daemon prio=8 tid=0x00962c28 nid=0xb58 in Object.wait() 
[0x0ab7f000..0x0ab7fc68]

   at java.lang.Object.wait(Native Method)
   - waiting on 0x02f1bfb0 (a java.lang.ref.ReferenceQueue$Lock)
   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
   - locked 0x02f1bfb0 (a java.lang.ref.ReferenceQueue$Lock)
   at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
   at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)

Reference Handler daemon prio=10 tid=0x009617b8 nid=0x578 in 
Object.wait() [0x0ab3f000..0x0ab3fce8]

   at java.lang.Object.wait(Native Method)
   - waiting on 0x02f1c030 (a java.lang.ref.Reference$Lock)
   at java.lang.Object.wait(Object.java:474)
   at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
   - locked 0x02f1c030 (a java.lang.ref.Reference$Lock)

main prio=6 tid=0x000377a8 nid=0x8c8 runnable [0x0007f000..0x0007fc3c]
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(PlainSocketImpl.java:384)
   - locked 0x0335bef0 (a java.net.SocksSocketImpl)
   at java.net.ServerSocket.implAccept(ServerSocket.java:450)
   at java.net.ServerSocket.accept(ServerSocket.java:421)
   at 
org.apache.catalina.core.StandardServer.await(StandardServer.java:389)

   at org.apache.catalina.startup.Catalina.await(Catalina.java:642)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:602)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)

VM Thread prio=10 tid=0x0095ed08 nid=0xcec runnable

VM Periodic Task Thread prio=10 tid=0x0096ef80 nid=0xd70 waiting on 
condition




Diego Rodríguez Martín escribió:

Hi,

   I'm using manager in Tomcat 6.0.16 throught ant task (1.6.5) to 
undeploy webapps. I have copied the new catalina-ant.jar in 
ANT_HOME/lib directory.


   The problem is that now the application is stopped instead of 
undeployed though the output message is undeployed app at context 
/xx. I then use list task and my webapp is in status stopped. If 
I execute again the undeploy task, the output message is again 
undeployed app at context /xx but this time the webapp is 
undeployed and not listed anymore. It seems like the task is 
undeploying in two steps. I have been using the undeploy task since 
4.1.27 version and the task never behaved that way. I have search the 
docs and there is no info about any change in 6.0.16 (6.0.14 is ok)


   Are there any undocumented changes in 6.0.16 or is it a malfunction?



--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 915713993 - Móvil +34 610299750
www.altiria.com
-


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



Manager undeploy task only stops webapp

2008-02-12 Thread Diego Rodríguez Martín

Hi,

   I'm using manager in Tomcat 6.0.16 throught ant task (1.6.5) to 
undeploy webapps. I have copied the new catalina-ant.jar in ANT_HOME/lib 
directory.


   The problem is that now the application is stopped instead of 
undeployed though the output message is undeployed app at context 
/xx. I then use list task and my webapp is in status stopped. If I 
execute again the undeploy task, the output message is again undeployed 
app at context /xx but this time the webapp is undeployed and not 
listed anymore. It seems like the task is undeploying in two steps. I 
have been using the undeploy task since 4.1.27 version and the task 
never behaved that way. I have search the docs and there is no info 
about any change in 6.0.16 (6.0.14 is ok)


   Are there any undocumented changes in 6.0.16 or is it a malfunction?

--
-
Diego Rodríguez Martín
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 915713993 - Móvil +34 610299750
www.altiria.com
-


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



Make two authentication schemes coexist on the same app

2008-02-11 Thread Diego Manilla Suárez
Hi. I have a web app with standard form authentication and a custom 
JDBCRealm. Now, I need to enable client certificate authentication, and 
be able to use both authentication mechanisms (certificates when the 
user sends them, and standard login form when he doesn't).


I don't know if this is even possible. I think I can validate the user's 
certificates when he tries to access a secure area using a Filter, but I 
have no way to set the Principal on the CoyoteRequestFacade (since the 
facade prevents me from using the setUserPrincipal present on 
CoyoteRequest).


Any idea?

Thanks in advance.

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



Cleanup of org.apache.naming.resources.CacheEntry resources

2008-02-08 Thread Diego Rodríguez Martín

Hi,

   I am memory profiling a webapp for my company because we suspect it 
has memory leaks when redeploying. This webapp has to be redeployed 
several times a week for security reasons (most of the time it is 
undeployed) and the memory leaks forced us to shutdown tomcat once a 
week to avoid OOM exception.


   I'm using jvm1.5 and tomcat 6.0.13 (also tried with 6.0.14 and today 
with 6.0.16), and Yourkit as the profiling tool. I have made the test in 
both linux and windows.


   I have created a JMeter test to deploy the app using the manager, 
make some request to the app and then undeploy it using again the 
manager app in a loop. After some redeployments, I got my 
OutOfMemoryException. Then I checked with my profiling tool and found 
that my own classes were correctly destroyed, and the classes retaining 
more memory were these ones (listed as a heirarchy):


   org.apache.catalina.core.ApplicationContext$DispatchData
   org.apache.catalina.core.ApplicationContext
mapper of  org.apache.catalina.core.StandardContext
context of  org.apache.tomcat.util.http.mapper.Mapper
resources of  org.apache.tomcat.util.http.mapper.Mapper$Context  
cache of  org.apache.naming.resources.ProxyDirContext  
cache of  org.apache.naming.resources.ResourceCache

org.apache.naming.resources.CacheEntry[]

   The number of objects of each class were exactly the number of times 
I had redeployed the webapp. I have checked the contents of CacheEntry 
inside CacheEntry[] and it has an attribute name and the contents are 
the jsps and tld files of my app. There are as many CacheEntry with the 
same jsp attribute as times the webapp has been reloaded.


   I have made a simple webapp with 2 jsp and a taglibrary, and the 
memory leak is still there, so I guess there is no cleaning of 
CacheEntry resources at context shutdown.


   Have I found a memory leak in Tomcat?
   Is my explanation correct or I have missed the leak source?
   Should I open a BZ issue?

   Is there any workaround to clean this resources on context shutdown?



--
-
Diego Rodríguez Martín
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 915713993 - Móvil +34 610299750
www.altiria.com
-


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



Re: Why use a Web Server over Tomcat?

2008-01-08 Thread Diego
Review the list archives for the disproof of this myth.  Tomcat 5.0 and
above are quite capable of serving static content, efficiently enough that
you'll saturate your network connection long before you saturate disk,
memory or CPU.

So unless you have one of the situations like those described by Kristian.
Like having other technologies like PHP you don't have to make load balance
with Apache 2.

Its way better to make a load balance with several Tomcats since you can
make a load balance of your dynamic content too.

On Jan 8, 2008 9:56 AM, Peter Crowther [EMAIL PROTECTED] wrote:

  From: Kristian Rink [mailto:[EMAIL PROTECTED]
  Asides this, while tomcat and friends (servlet containers) are made
  to serve up, well, J2EE web tier applications, web servers like
  apache2, lighttpd, ... are usually better at serving static content
  (images, static css files, html documents that don't contain any
  logic, ...).

 Review the list archives for the disproof of this myth.  Tomcat 5.0 and
 above are quite capable of serving static content, efficiently enough that
 you'll saturate your network connection long before you saturate disk,
 memory or CPU.

- Peter

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




-- 
Diego


Re: jdbc connection pooling

2008-01-04 Thread Diego
I'm using the connection pooling on Tomcat 6.

And in my case i had to put the jar from the jdbc driver on.

$CATALINA_HOME/lib

On Jan 4, 2008 2:05 PM, Scott McClanahan [EMAIL PROTECTED]
wrote:

 We are about to start testing the jdbc connection pooling capabilities
 within tomcat.  I don't have any control over the application instead
 perform only administrative duties.  Between the developers and myself
 we have done a good bit of research and mapped out a decent plan but
 there is one unresolved dispute between us.  The developer says that the
 jar file containing the database driver should be published within the
 web applications WEB-INF/lib folder while I say it should be in
 $CATALINA_HOME/common/lib.  Who is right and why?

 We hoped to define the datasource as a Resource within a DefaultContext
 element in the server.xml so it is available to all web applications.
 Is this good practice?  I'd like to know of some ways you folks have
 done it too if you've got the time.

 Also any gotchas to look out for with connection pooling would be
 helpful from those who have actually done it.  Thanks.


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




-- 
Diego


Re: What do I do with a heap dump? (OOM Permgen)

2007-11-02 Thread Diego Rodríguez Martín

Hi,

   I found a memory leak in commons pool version 1.3 that is affecting 
tomcat 6.0.x as it is the commons pool library embedded in it. I tried a 
workaround using a factory with commons 1.2, but it also showed a memory 
leak.


   http://www.mail-archive.com/users@tomcat.apache.org/msg29820.html
 
   As far as I know, it has not been resolved, so you could be running 
into this


   Diego


Greg Vilardi escribió:

On 2 Nov 2007 at 7:24, Caldarale, Charles R wrote:

  
From: Peter Crowther [mailto:[EMAIL PROTECTED] 
Subject: RE: What do I do with a heap dump? (OOM Permgen)


As far as I know, public enemy #1 for eating PermGen space is 
still developers using the Singleton pattern in their code 
and not having listeners to null out the singleton instance 
when the webapp is undeployed.
  

Analagous use of ThreadLocal is also a subtle contributor to the
problem.  The offending references must be cleared at the end of
processing of each request, since listeners don't have ready access to
the thread pool.



Thank you for the pointers Peter. We do not have any Singletons in the 
application nor do we use ThreadLocal. However, we do not seem to be 
cleaning up the JDBC classes on redeploy. I'll install the 
SessionListener code that is mentionned in the references in Peter's 
reply. I'm also using the eval version of yourkit now to see what 
exactly is attached to each of the 52 WebAppClassLoaders in the dump.


I'll be back if I get stuck again further down the road. Thank you to 
all of the people who replied for the pointers and the tool 
recommendations. 


-Greg
  


--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 915713993 - Móvil +34 610299750
www.altiria.com
-



Re: Tomcat 6 and Permgen increase with redeployments

2007-10-02 Thread Diego Rodríguez Martín

Hi,

   There is a leak in commons pool in version 6 that prevents 
WebappClassLoader from being garbage collected


   http://www.mail-archive.com/users@tomcat.apache.org/msg29820.html

   Anyway, you may be encountering memory leaks of you own, and nothing 
can replace memory profiling to find your offending classes. This link 
may be an introduction to memory leaks,


   
http://opensource.atlassian.com/confluence/spring/pages/viewpage.action?pageId=2669
  
   Diego



wild_oscar escribió:

Although I've read a lot in the past week about Permgen and the problems of
some libs, I haven't been able to find a solution to my problem.

I'm running Tomcat 6 and an application with (among others):

- Struts 2
- Hibernate
- Tiles 2
- Log4j
- ant

Redeployment with ant (or the tomcat manager) makes the permgen space grow
and it doesn't shrink.

I'm using Jprofiler to figure out what's wrong. I recorded allocation data,
deployed the application, stopped recording and undeployed. I made GC
collect, well, the garbage, and Permgen free space did not increase. 


I seem to be stuck with a lot of log4j classes and hibernate classes.

I've pushed the Postgresql driver to the container's /lib. I've also tried
pushing log4j and commons-logging there as well.

Waiting some time does not solve the problem as well. Permgen space will not
decrease.

As for hibernate, I've implemented a static SessionFactory, which I close in
the destroy() method of my servletcontextlistener. 


Can anyone pinpoint the probable cause, solution or way to tackle this
problem? Increasing the size of the Permgen only postpones the problem: at
the end of a workday it'll be full, after a dozen redeployments...
  



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



Tomcat lost requests/logs

2007-09-12 Thread Ing. Diego Trombetta
 

I'm working with Tomcat 5.5.23.
The users are complaining that they need to log in a lot of
times during the day,
therefore I took a look at logs and, to my surprise, I found out
that there are missing requests!
What I mean is that on the logs I can read something like:
 
 10-set-2007 10.18.44 INFO:  [MyApp/MyServlet] My Message
(user)

 10-set-2007 10.27.56 INFO:  [MyApp/MyServlet] My Message
(user)
 
while the users performed 3 requests (e.g. at 10.18, at 10.21
and at 10.18)
And I'm sure he did because he updated DB tables and I can see
the last update time in those tables.
 
Therefore my servlet processed all the requests, but tomcat
somehow logged only two of them.
 
This behaviour on one hand makes me loose important logging
informations,
on the other hand make the session expire sooner than what they
should!!!
 
Any suggestions about it?
What can I do to monitor what's going on there?



R: Tomcat lost requests/logs

2007-09-12 Thread Ing. Diego Trombetta
There is only one application server running.

The logs described are just an example: my logs are more datailed.
I print out also informations about the method, the parameters of the request 
and so on,
therefore I can discriminate which request has updated the DB. And I can be 
sure that
the server and the DB have the same timezone.

The session timeout is 20 minutes, but the session expires sooner than that.
The user performes 3 requests (e.g. at 10.18, at 10.27 and at 10.40) and
at the 3rd he needs to relogin!




-Messaggio originale-
Da: David Delbecq [mailto:[EMAIL PROTECTED] 
Inviato: mercoledì 12 settembre 2007 12.04
A: Tomcat Users List
Oggetto: Re: Tomcat lost requests/logs

Looks like you have configured round robin somewhere and another tomcat handled 
the 2 other requests.

Another possibility, regarding logs, is that timezone used to log (local server 
timezone) is not same as used by your database or as used by your client's 
desktop clock.

The session can expire for various reasons:

- timeout (see tomcat logs)
- invalid session id provided (if you have 2 tomcat server sharing load and 
they do not share session, this can happen)
- User cleared cookies or user disabled cookies and your application does not 
use url rewriting mecanisms
- Your application calls session.invalidate()



En l'instant précis du 12/09/07 11:23, Ing. Diego Trombetta s'exprimait en ces 
termes:
  

   I'm working with Tomcat 5.5.23.
   The users are complaining that they need to log in a lot of times 
 during the day,
   therefore I took a look at logs and, to my surprise, I found out that 
 there are missing requests!
   What I mean is that on the logs I can read something like:

10-set-2007 10.18.44 INFO:  [MyApp/MyServlet] My Message
 (user)
   
10-set-2007 10.27.56 INFO:  [MyApp/MyServlet] My Message
 (user)

   while the users performed 3 requests (e.g. at 10.18, at 10.21 and at 
 10.18)
   And I'm sure he did because he updated DB tables and I can see the 
 last update time in those tables.

   Therefore my servlet processed all the requests, but tomcat somehow 
 logged only two of them.

   This behaviour on one hand makes me loose important logging 
 informations,
   on the other hand make the session expire sooner than what they 
 should!!!

   Any suggestions about it?
   What can I do to monitor what's going on there?


   


--
http://www.noooxml.org/


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



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



Extra fields in form authentication

2007-08-30 Thread Diego Manilla Suárez
Hi. I need two extra fields in my login form, other than j_username and 
j_password. The problem is that these extra fields doesn't seem to be 
forwarded to the original requested URL. Right now I've implemented my 
own Authenticator, which extends 
org.apache.catalina.authenticator.FormAuthenticator and overrides its 
authenticate method, iterating over the request parameters and storing 
them on a map in the session.


Is there a simpler and/or nicer way to do what I want?

Thanks in advance.

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



Re: 20 Tips for Using Tomcat in Production

2007-08-21 Thread Diego Yasuhiko Kurisaki
I agree, i'm not willing to pay the management overhead of putting my shared
libraries to the tomcat common lib, unless my gains are very big in terms of
memory consumption.

I don't really think you should change for another one though, but you can
make regards about the cons of that approach.

Anyway, great work 5 stars.


On 8/21/07, Ben Souther [EMAIL PROTECTED] wrote:

  From:
 Christopher Schultz
  I also agree with David and, uh, David, that #6 is a little dubious.
  Yes, moving shared libraries into the common/lib directory will save you
  some memory, but it creates a management headache when it comes to
  version numbers, WAR packaging, etc. Ideally, the WAR contains
  everything the webapp needs. If you rely on the servlet container to
  provide essential libraries, you are changing your deployment strategy
  significantly.

 +1

 Starting with Servlet Spec 2.3 (I think) there has been an emphasis on
 putting everything a web app needs to run into its war file.
 To put include something that runs contrary to this 'best practice' in
 an article of tips at this point in time doesn't sound like a good idea.

 I would seriously consider replacing that one with something else.




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




-- 
Diego Yasuhiko Kurisaki


Re: Tomcat 6 classloader leak in Commons Pool

2007-06-29 Thread Diego Rodríguez Martín
Sorry, you are right, it is in 
org.apache.tomcat.util.modeler.BaseModelMBean, and resource attribute it 
is retaining is an org.apache.commons.dbcp.BasicDataSource


   Diego

Caldarale, Charles R escribió:
From: Diego Rodríguez Martín [mailto:[EMAIL PROTECTED] 
Subject: Re: Tomcat 6 classloader leak in Commons Pool


I have found that the offending class causing the leak is 
org.apache.tomcat.util.modeler.ManagedBean. It keeps two

attributes referencing my dbcp pool, called resource and
resourceType.



Are you sure about that class name?  It looks like the fields you've mentioned 
are actually in:
org.apache.tomcat.util.modeler.BaseModelMBean

The resourceType field is a String, so that isn't actually a reference to your 
DBCP pool, but resource is just an Object, so that's probably the real culprit. 
 There does not appear to be any way to clear the resource field in a 
BaseModelMBean, and I don't yet know where references to the BaseModelMBean are 
maintained.

What exactly does the resource field reference?  A connection, the DBCP 
factory, or ???

 - Chuck


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

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


  


--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-



Re: Tomcat 6 classloader leak in Commons Pool

2007-06-29 Thread Diego Rodríguez Martín

Hi,

   I have tried what you suggested but it doesn't release the context 
properly. The method in Registry is unregisterComponent (unregister 
doesn't exist)


ObjectName on = new 
ObjectName(Catalina:type=DataSource,path=/myapp,host=localhost,class=org.apache.commons.dbcp.BasicDataSource,name=jdbc/MyPool);

(Registry.getRegistry(null, null)).unregisterComponent(on);

   I have tried with other parameters in ObjectName, but it doesn't 
complain even if the parameters are wrong so, how can I know they are right?



   Bill, How do I open a BZ issue?

   Thank you very much for your help

   Diego

Bill Barker escribió:
Diego Rodríguez Martín [EMAIL PROTECTED] wrote in message 
news:[EMAIL PROTECTED]
  

Hi,

   I have been making some more tests about this issue, using old 
dbcp/pool factory to get rid of the memory leaks of tomcat embedded 
libraries commons-pool/commons-dbcp


   When using my own factory for dbcp and commons pool (the old versions), 
I clear the resources used invoking datasource.close() in my servlet 
destroy method. With a memory profiler, I have found that the offending 
class causing the leak is org.apache.tomcat.util.modeler.ManagedBean. It 
keeps two attributes referencing my dbcp pool, called resource and 
resourceType.


   Is there a way I can access from my servlet this class 
(org.apache.tomcat.util.modeler.ManagedBean) in order to clean the 
references?
   Is there any other action to be taken to free a resource than calling 
datasource.close() that I am missing?

   Is my fault freeing the resource or its Tomcat fault?




It is probably Tomcat's fault, since it looks like Tomcat doesn't unregister 
the DataSource elements from JMX when the context is stopped.  You should 
probably open a BZ issue for this (it doesn't look like the fix is too hard, 
NamingContextListener just needs to handle a stop event).


To work around it, you just need to unregister the MBean, so something like:
   ObjectName on = new 
ObjectName(Catalina:type=DataSource,path=/myapp,host=localhost,class=my.full.class.name,name=resourceName);

   Registry.getRegistry(null, null).unregister(on);

should work.

  

   Thank you very much in advance for your help

  Diego


Diego Rodríguez Martín escribió:


Hi,

   I have found what you said about the factory. It is ported to 6.0. I 
have tried to use the old commons-dbcp library, copying 
commons-pool-1.2.jar and commons-dbcp-1.2.2.jar in tomcat lib directory 
and defining the attribute 
factory=org.apache.commons.dbcp.BasicDataSourceFactory in the resource 
in my context.xml.


   It works, but I still have a memory leak. Tomcat is retaining my new 
commons-dbcp classes, and I think it is related to this classes:


org.apache.tomcat.util.modeler.BaseModelMBean,
com.sun.jmx.mbeanserver.NamedObject,
com.sun.jmx.mbeanserver.RepositorySupport.
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor
com.sun.jmx.mbeanserver.JmxMBeanServer,

This part of Tomcat is completely unkown to me, Do you have any clue?

Many thanks for your help


   Diego
David Smith escribió:
  
In older versions of tomcat (5.0.x) there is a factory attribute 
defining the pool to use.  It's unclear from the limited look I did 
whether that was carried forward to 5.5 and 6.0.


--David

Diego Rodríguez Martín wrote:


Hi,

   Is there any way to fix this leak downgrading the version of commons 
pool. I have a production enviroment where we have a lot of 
deploy/undeploy and with this leak we have to stop/start Tomcat very 
often. Is there a possibility of replacing tomcat-dbcp.jar with the 
older individual jars? It will work or you have used new 
functionalities of these packages?


   Thanks

   Diego


Rémy Maucherat escribió:
  

On 6/8/07, Diego Rodríguez Martín [EMAIL PROTECTED] wrote:


It affects version 1.3 of commons pool. In tomcat 6, commons pool is
embbeded in /tomcat-dbcp.jar/, and the docs don't say with version of
commons is inside.
  

It's that version. A new commons-pool version will be integrated when
it's available.

Rémy

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




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




--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-


-
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e

Re: Tomcat 6 classloader leak in Commons Pool

2007-06-28 Thread Diego Rodríguez Martín

Hi,

   I have been making some more tests about this issue, using old 
dbcp/pool factory to get rid of the memory leaks of tomcat embedded 
libraries commons-pool/commons-dbcp


   When using my own factory for dbcp and commons pool (the old 
versions), I clear the resources used invoking datasource.close() in my 
servlet destroy method. With a memory profiler, I have found that the 
offending class causing the leak is 
org.apache.tomcat.util.modeler.ManagedBean. It keeps two attributes 
referencing my dbcp pool, called resource and resourceType.


   Is there a way I can access from my servlet this class 
(org.apache.tomcat.util.modeler.ManagedBean) in order to clean the 
references?
   Is there any other action to be taken to free a resource than 
calling datasource.close() that I am missing?

   Is my fault freeing the resource or its Tomcat fault?

   Thank you very much in advance for your help

  Diego


Diego Rodríguez Martín escribió:

Hi,

   I have found what you said about the factory. It is ported to 6.0. 
I have tried to use the old commons-dbcp library, copying 
commons-pool-1.2.jar and commons-dbcp-1.2.2.jar in tomcat lib 
directory and defining the attribute 
factory=org.apache.commons.dbcp.BasicDataSourceFactory in the 
resource in my context.xml.


   It works, but I still have a memory leak. Tomcat is retaining my 
new commons-dbcp classes, and I think it is related to this classes:


org.apache.tomcat.util.modeler.BaseModelMBean,
com.sun.jmx.mbeanserver.NamedObject,
com.sun.jmx.mbeanserver.RepositorySupport.
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor
com.sun.jmx.mbeanserver.JmxMBeanServer,

This part of Tomcat is completely unkown to me, Do you have any clue?

Many thanks for your help


   Diego
David Smith escribió:
In older versions of tomcat (5.0.x) there is a factory attribute 
defining the pool to use.  It's unclear from the limited look I did 
whether that was carried forward to 5.5 and 6.0.


--David

Diego Rodríguez Martín wrote:

Hi,

   Is there any way to fix this leak downgrading the version of 
commons pool. I have a production enviroment where we have a lot of 
deploy/undeploy and with this leak we have to stop/start Tomcat very 
often. Is there a possibility of replacing tomcat-dbcp.jar with the 
older individual jars? It will work or you have used new 
functionalities of these packages?


   Thanks

   Diego


Rémy Maucherat escribió:

On 6/8/07, Diego Rodríguez Martín [EMAIL PROTECTED] wrote:

It affects version 1.3 of commons pool. In tomcat 6, commons pool is
embbeded in /tomcat-dbcp.jar/, and the docs don't say with version of
commons is inside.


It's that version. A new commons-pool version will be integrated when
it's available.

Rémy

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







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






--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-


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



Tomcat and commons logging

2007-06-19 Thread Diego Rodríguez Martín

Hi,

   I have some problems using commons logging with log4j and tomcat, 
related to classloading. After some google searching, I have come to 
this article by one of the log4j experts


   http://www.qos.ch/logging/classloader.jsp

   In this article, it is explained how commons-logging (1.0.3) can 
lead to some classloading problems. There is a solution at the end of 
the article, but for Tomcat 5.0.x.


   I'm using Tomcat 6.0.13, configured to use log4j as it is explained 
in the docs (http://tomcat.apache.org/tomcat-6.0-doc/logging.html) and I 
have this problem.


   My questions is:

  The article says that I have to use version 1.0.4 or later but I 
haven't found which version it is used by Tomcat,
  
   which version of commons-logging is built in the extras in Tomcat 6?


 


--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-


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



Re: Tomcat 6 classloader leak in Commons Pool

2007-06-15 Thread Diego Rodríguez Martín

Hi,

   I have found what you said about the factory. It is ported to 6.0. I 
have tried to use the old commons-dbcp library, copying 
commons-pool-1.2.jar and commons-dbcp-1.2.2.jar in tomcat lib directory 
and defining the attribute 
factory=org.apache.commons.dbcp.BasicDataSourceFactory in the resource 
in my context.xml.


   It works, but I still have a memory leak. Tomcat is retaining my new 
commons-dbcp classes, and I think it is related to this classes:


org.apache.tomcat.util.modeler.BaseModelMBean,
com.sun.jmx.mbeanserver.NamedObject,
com.sun.jmx.mbeanserver.RepositorySupport.
com.sun.jmx.interceptor.DefaultMBeanServerInterceptor
com.sun.jmx.mbeanserver.JmxMBeanServer,

This part of Tomcat is completely unkown to me, Do you have any clue?

Many thanks for your help


   Diego
David Smith escribió:
In older versions of tomcat (5.0.x) there is a factory attribute 
defining the pool to use.  It's unclear from the limited look I did 
whether that was carried forward to 5.5 and 6.0.


--David

Diego Rodríguez Martín wrote:

Hi,

   Is there any way to fix this leak downgrading the version of 
commons pool. I have a production enviroment where we have a lot of 
deploy/undeploy and with this leak we have to stop/start Tomcat very 
often. Is there a possibility of replacing tomcat-dbcp.jar with the 
older individual jars? It will work or you have used new 
functionalities of these packages?


   Thanks

   Diego


Rémy Maucherat escribió:

On 6/8/07, Diego Rodríguez Martín [EMAIL PROTECTED] wrote:

It affects version 1.3 of commons pool. In tomcat 6, commons pool is
embbeded in /tomcat-dbcp.jar/, and the docs don't say with version of
commons is inside.


It's that version. A new commons-pool version will be integrated when
it's available.

Rémy

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







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




--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-


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



Re: Tomcat 6 classloader leak in Commons Pool

2007-06-11 Thread Diego Rodríguez Martín

Hi,

   Is there any way to fix this leak downgrading the version of commons 
pool. I have a production enviroment where we have a lot of 
deploy/undeploy and with this leak we have to stop/start Tomcat very 
often. Is there a possibility of replacing tomcat-dbcp.jar with the 
older individual jars? It will work or you have used new functionalities 
of these packages?


   Thanks

   Diego


Rémy Maucherat escribió:

On 6/8/07, Diego Rodríguez Martín [EMAIL PROTECTED] wrote:

It affects version 1.3 of commons pool. In tomcat 6, commons pool is
embbeded in /tomcat-dbcp.jar/, and the docs don't say with version of
commons is inside.


It's that version. A new commons-pool version will be integrated when
it's available.

Rémy

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




--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-


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



Tomcat 6 classloader leak in Commons Pool

2007-06-08 Thread Diego Rodríguez Martín

Hi,

   I have a webapp that is running ok under tomcat 5.5. I have upgrade 
to Tomcat 6 and I have found a big memory leak because WebAppClassLoader 
gets never garbage collected.


   I have used a profiler and have found that the object that is 
stopping the garbage collector could be EVICTION_TIMER of  
org.apache.tomcat.dbcp.pool.impl.GenericObjectPool. I have googled it 
and I have found the following bug in commons pool


https://issues.apache.org/jira/browse/POOL-97?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12484747

It affects version 1.3 of commons pool. In tomcat 6, commons pool is 
embbeded in /tomcat-dbcp.jar/, and the docs don't say with version of 
commons is inside.


Could tomcat be running with this bug?
Since pool is embedded, is there a simple workaround to get rid of it 
downgrading commons pool version to use the same as tomcat 5.5?


   Thanks

  


--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-



Re: Max number of contexts

2007-04-19 Thread Diego Rodríguez Martín

Hi again,

   I have been evaluating the architecture described below (one kernel 
with lightweight webapps registered by ContextListener), but I'm still 
worried about memory. You said that memory will be the main limitation, 
but what I would like to know is how many memory overhead produces a 
context compared to the webapp plain classes it loads. We're planning to 
have hundreds of contexts and I would like to know if we should consider 
another architecture for our problem. In this new project we will use 
Tomcat 5.5, but we are using now Tomcat 4.1 for other project and we are 
having OutOf Memory errors every week, more frecuently as the number of 
contexts incresases (between10-15 contexts aprox), so you can understand 
my worries


   Thanks again

   Diego

Filip Hanik - Dev Lists escribió:

Diego Rodriguez wrote:


Hi,

   I'm using Tomcat 5.5.20. In the docs says You may define as many 
*Context* elements as you wish


   I'm going to design a new web application that will act as a 
kernel for other lightweight webapps that will implement different 
services and may be hot installed at any time. My plan is implement 
these services (lightweight webapps) as contexts that will register 
in the kernel using a ContextListener. What I would like to know is 
if there is any real maximum or a performance penalty if I reach some 
limit. Is there anybody who has implemented an architecture like this? ]

Memory will be your main limitation.
Filip


   Thanks in advance

  Diego



No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.11/721 - Release Date: 
3/13/2007 4:51 PM
  



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




--
-
Diego Rodríguez Martín ([EMAIL PROTECTED])
ALTIRIA TIC - Servicios SMS - Desarrollo Web
Tel. +34 913311198 - Fax +34 913310087 - Móvil +34 610299750
www.altiria.com
-


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



Max number of contexts

2007-03-14 Thread Diego Rodriguez


Hi,

   I'm using Tomcat 5.5.20. In the docs says You may define as many 
*Context* elements as you wish


   I'm going to design a new web application that will act as a kernel 
for other lightweight webapps that will implement different services and 
may be hot installed at any time. My plan is implement these services 
(lightweight webapps) as contexts that will register in the kernel using 
a ContextListener. What I would like to know is if there is any real 
maximum or a performance penalty if I reach some limit. Is there anybody 
who has implemented an architecture like this?


   Thanks in advance

  Diego


Tomcat 5.5.20 undeploy problem

2006-12-18 Thread Diego Belliardo
I'm using Tomcat 5.5.20 on Windows 2003 Server. 

This is my problem: 

I'm using ant task to deploy my web application: 

undeploy=org.apache.catalina.ant.UndeployTask 
deploy=org.apache.catalina.ant.DeployTask 

target name = deploy 
  description = Deploy Tomcat application depends=webapp-name 
  deploy 
url = http://smbcti.enigen.it:8080/manager; 
username= admin 
password= admin 
path= /${webapp} 
war = file:${webapp}.war 
/ 

  copy todir=${tomcat-home}/webapps/${webapp}/Voxfiles/it-IT 
fileset dir=voxfile 
include name=*.vox/ 
/fileset 
/copy 

copy todir=${tomcat-home}/webapps/${webapp}/WEB-INF/lib 
overwrite=true 
fileset dir=lib 
 include name=*.jar/ 
/fileset 
/copy 

/target 

target name = undeploy 
  description = Undeploy Tomcat application depends=webapp-name 

  stop 
url = http://smbcti.enigen.it:8080/manager; 
username= admin 
password= admin 
path= /${webapp} 
/ 

  delete dir=${tomcat-home}work/Catalina/localhost/${webapp}/ 

  undeploy 
url = http://smbcti.enigen.it:8080/manager; 
username= admin 
password= admin 
path= /${webapp} 
/ 

/target 

1) Some times I'm not able to delete the work directory and to do it I 
need to Stop Tomcat. 
2) Some times I need to undeploy 2 or 3 times the webapp, but then 
Tomcat delete the webapp directory and I continue to see del 
application in the Tomcat Manager, because he left someting in the 
server.xml file. 

I would not to change this file by hand. 

 

If I use the Tomcat Manager to deploy and undeploy I have the same
problem.

Someone can help me, please? 

 

 

Thank you and regards.

Diego