Re: conf/Catalina/HOST/contextname.xml being removed

2010-09-23 Thread Konstantin Kolinko
2010/9/23 Jason Britton jbritto...@gmail.com:
 Glad you brought this back up P - was cursing this problem again yesterday.
 So if tomcat 6.0.29 is running and my foo webapp is deployed, if I dare copy
 in foo.war for auto re-deployment tomcat nukes my foo.xml context definition
 in conf/Catalina/HOST/ directory.  Absolutely maddening.  Is this expected
 behavior?

See https://issues.apache.org/bugzilla/show_bug.cgi?id=47343
and https://issues.apache.org/bugzilla/show_bug.cgi?id=46924
and http://markmail.org/thread/bqxo3z26lpges7kc

and
http://tomcat.apache.org/tomcat-6.0-doc/config/host.html#Automatic_Application_Deployment
(some detailed explanation is there;  may be hard to find because it
is in configuration docs)

AFAIK, on an undeploy the context file is always deleted, because its
presence means that the app is still deployed.

If redeploy is implemented as undeploy + deploy, it would be hard to
preserve that context file, especially if deploy fails.

BTW, Tomcat 7 has different behaviour regarding context files: it does
not copy them to conf/** by default. It is changed by copyXML
attribute on a Host.


  It seems that you wouldn't want external configuration files
 removed on a redeployment.  Of course I'm just testing out a new system and
 in production I'm not sure I'd be just copying in a new war file and calling
 that a redeployment...  I'll change permissions on that file and see what
 happens.  Thanks for your insights.

 Jason



Best regards,
Konstantin Kolinko

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



Re: [OT] Client to communicate to SSL WebServices on tomcat

2010-09-23 Thread Pid
On 23/09/2010 02:54, aravidu wrote:
 -Djavax.net.ssl.keyStore =${truststore.location}

 With this setup, it kept complaining about a very basic error. Here is the
 exception: 
 java.lang.NoClassDefFoundError: =C:\Clientcerts\client.keystore 

That would be because you made a basic error and included a space before
the '=' symbol.  Java then correctly assumes you're telling it to load a
class called '=C:\Clientcerts\client.keystore', which doesn't exist.


Yours:
 -Djavax.net.ssl.keyStore =${truststore.location}

Fixed:
 -Djavax.net.ssl.keyStore=${truststore.location}


p


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Use of error page in Tomcat

2010-09-23 Thread Martin O'Shea
Hello

 

I have a /myApp/displayDatasetPage which is used to display content. In this
page, I incorporate the default Tomcat login code as follows:

 

div id = login

form action='%= response.encodeURL(/myApp/loginPage) %'
method = post

table border = 0

tr

th align = rightUsername/th

td align = leftinput type = text name =
userName/td

/tr

tr

th align = rightPassword/th

td align = leftinput type = password name
= password/td

/tr

tr

td align = rightinput type = submit value
= Log In/td

td align = leftinput type = reset/td

/tr

/table

/form

/div

 

And path /myApp/loginPage is protected in web.xml. This seems to be alright
but if a user doesn't enter login details, or enters incorrect login
details, and then presses 'Log in' the page simply reloads. I am assuming
that this is because I have no login error page working alongside use
/myApp/displayDatasetPage to catch login exceptions. 

 

Is it possible to use /myApp/displayDatasetPage to display login errors? Or
can anyone say tell me if I catch Tomcat's login verification process  to do
this?

 

Thanks

 

Mr Morgan.



Re: [OT] Client to communicate to SSL WebServices on tomcat

2010-09-23 Thread aravidu

Ok. Thanks. I fixed it and tested it again. Now it says this: 

Caused by: java.net.SocketException: SocketException invoking
https://host:8081/myapp/endpoint: Software caused connection abort: recv
failed
Caused by: java.net.SocketException: Software caused connection abort: recv
failed

I am sure the URL/endpoint is working because I am able to access the
endpoint thru firefox. 



Pid * wrote:
 
 On 23/09/2010 02:54, aravidu wrote:
 -Djavax.net.ssl.keyStore =${truststore.location}
 
 With this setup, it kept complaining about a very basic error. Here is
 the
 exception: 
 java.lang.NoClassDefFoundError: =C:\Clientcerts\client.keystore 
 
 That would be because you made a basic error and included a space before
 the '=' symbol.  Java then correctly assumes you're telling it to load a
 class called '=C:\Clientcerts\client.keystore', which doesn't exist.
 
 
 Yours:
  -Djavax.net.ssl.keyStore =${truststore.location}
 
 Fixed:
  -Djavax.net.ssl.keyStore=${truststore.location}
 
 
 p
 
  
  
 

-- 
View this message in context: 
http://old.nabble.com/Client-to-communicate-to-SSL-WebServices-on-tomcat-tp29780497p29788141.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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



Use of error page in Tomcat

2010-09-23 Thread Martin O'Shea
Hello

 

I have a /myApp/displayDatasetPage which is used to display content. In this
page, I incorporate the default Tomcat login code as follows:

 

div id = login

form action='%= response.encodeURL(/myApp/loginPage) %'
method = post

table border = 0

tr

th align = rightUsername/th

td align = leftinput type = text name =
userName/td

/tr

tr

th align = rightPassword/th

td align = leftinput type = password name
= password/td

/tr

tr

td align = rightinput type = submit value
= Log In/td

td align = leftinput type = reset/td

/tr

/table

/form

/div

 

And path /myApp/loginPage is protected in web.xml. This seems to be alright
but if a user doesn't enter login details, or enters incorrect login
details, and then presses 'Log in' the page simply reloads. I am assuming
that this is because I have no login error page working alongside use
/myApp/displayDatasetPage to catch login exceptions. 

 

Is it possible to use /myApp/displayDatasetPage to display login errors? Or
can anyone say tell me if I catch Tomcat's login verification process  to do
this?

 

Thanks

 

Mr Morgan.



Re: Use of error page in Tomcat

2010-09-23 Thread Pid
On 23/09/2010 12:22, Martin O'Shea wrote:
 Hello
 
 I have a /myApp/displayDatasetPage which is used to display content. In this
 page, I incorporate the default Tomcat login code as follows:
 
 div id = login
 form action='%= response.encodeURL(/myApp/loginPage) %'
 method = post
 table border = 0

Tables for layout. How very 1997.

 tr
 th align = rightUsername/th
 td align = leftinput type = text name =
 userName/td
 /tr
 tr
 th align = rightPassword/th
 td align = leftinput type = password name
 = password/td
 /tr
 tr
 td align = rightinput type = submit value
 = Log In/td
 td align = leftinput type = reset/td
 /tr
 /table
 /form
 /div

How is this 'the default Tomcat logic code'?

 And path /myApp/loginPage is protected in web.xml. 

How is it protected in web.xml?

 This seems to be alright
 but if a user doesn't enter login details, or enters incorrect login
 details, and then presses 'Log in' the page simply reloads. I am assuming
 that this is because I have no login error page working alongside use
 /myApp/displayDatasetPage to catch login exceptions. 

You tell us.  You haven't posted your web.xml, so we can't know.

 Is it possible to use /myApp/displayDatasetPage to display login errors? Or
 can anyone say tell me if I catch Tomcat's login verification process  to do
 this?

If you're using the Servlet Specification container managed
authentication mechanism, it's possible.  It doesn't look like you are
though.

If you've written your own login component, you can of course make that
happen too.

 Thanks
 
 Mr Morgan.

Are you Martin O'Shea or Mr Morgan?  I'm confused.


p

P.S.  Please send one message to the list and then wait for a response.
Two messages in 30 mins is a little pushy.




0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


RE: Use of error page in Tomcat

2010-09-23 Thread Martin O'Shea
Apologies re the duplicate posting; email trouble with my ISP.

Relevant part of web.xml reads:

security-constraint
display-nameSecurity Constraint/display-name
web-resource-collection
web-resource-name/
description/
url-pattern/login/url-pattern
/web-resource-collection
!--auth-constraint
role-nameUSER/role-name
role-nameADMIN/role-name
/auth-constraint--
/security-constraint
login-config
auth-methodFORM/auth-method
form-login-config
 
form-login-page/jsp/security/protected/login.jsp/form-login-page
 
form-error-page/jsp/security/protected/error.jsp/form-error-page
/form-login-config
/login-config

At the moment I am trying things manually by checking the user table
regardless of Tomcat but is this necessary?

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: 23 Sep 2010 12 57
To: Tomcat Users List
Subject: Re: Use of error page in Tomcat

On 23/09/2010 12:22, Martin O'Shea wrote:
 Hello
 
 I have a /myApp/displayDatasetPage which is used to display content. 
 In this page, I incorporate the default Tomcat login code as follows:
 
 div id = login
 form action='%= response.encodeURL(/myApp/loginPage)
%'
 method = post
 table border = 0

Tables for layout. How very 1997.

 tr
 th align = rightUsername/th
 td align = leftinput type = text 
 name = userName/td
 /tr
 tr
 th align = rightPassword/th
 td align = leftinput type = 
 password name = password/td
 /tr
 tr
 td align = rightinput type = submit 
 value = Log In/td
 td align = leftinput type = reset/td
 /tr
 /table
 /form
 /div

How is this 'the default Tomcat logic code'?

 And path /myApp/loginPage is protected in web.xml. 

How is it protected in web.xml?

 This seems to be alright
 but if a user doesn't enter login details, or enters incorrect login 
 details, and then presses 'Log in' the page simply reloads. I am 
 assuming that this is because I have no login error page working 
 alongside use /myApp/displayDatasetPage to catch login exceptions.

You tell us.  You haven't posted your web.xml, so we can't know.

 Is it possible to use /myApp/displayDatasetPage to display login 
 errors? Or can anyone say tell me if I catch Tomcat's login 
 verification process  to do this?

If you're using the Servlet Specification container managed authentication
mechanism, it's possible.  It doesn't look like you are though.

If you've written your own login component, you can of course make that
happen too.

 Thanks
 
 Mr Morgan.

Are you Martin O'Shea or Mr Morgan?  I'm confused.


p

P.S.  Please send one message to the list and then wait for a response.
Two messages in 30 mins is a little pushy.





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



Re: Use of error page in Tomcat

2010-09-23 Thread Pid
On 23/09/2010 13:04, Martin O'Shea wrote:
 Apologies re the duplicate posting; email trouble with my ISP.
 
 Relevant part of web.xml reads:
 
 security-constraint
 display-nameSecurity Constraint/display-name
 web-resource-collection
 web-resource-name/
 description/
   url-pattern/login/url-pattern
 /web-resource-collection
 !--auth-constraint
 role-nameUSER/role-name
 role-nameADMIN/role-name
 /auth-constraint--
 /security-constraint
 login-config
 auth-methodFORM/auth-method
 form-login-config
  
 form-login-page/jsp/security/protected/login.jsp/form-login-page
  
 form-error-page/jsp/security/protected/error.jsp/form-error-page
 /form-login-config
 /login-config

So you've protected just the /login URL, meaning that authentication
will be required before accessing that URL which probably checks the DB
for a username or something.

The config above doesn't do what you probably think it does; you've got
half a container managed authentication solution and half a roll-your-own.

 At the moment I am trying things manually by checking the user table
 regardless of Tomcat but is this necessary?

Not if you configure it properly.

I'll guess that you're using Tomcat 6.0.29 and suggest that you find and
read the Servlet Spec v2.5, Section SRV.12.1 paying particular attention
to paragraphs which mention 'j_security_check'.


Have you configured a Realm (usually a DataSourceRealm)?

 http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html


p

 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: 23 Sep 2010 12 57
 To: Tomcat Users List
 Subject: Re: Use of error page in Tomcat
 
 On 23/09/2010 12:22, Martin O'Shea wrote:
 Hello

 I have a /myApp/displayDatasetPage which is used to display content. 
 In this page, I incorporate the default Tomcat login code as follows:

 div id = login
 form action='%= response.encodeURL(/myApp/loginPage)
 %'
 method = post
 table border = 0
 
 Tables for layout. How very 1997.
 
 tr
 th align = rightUsername/th
 td align = leftinput type = text 
 name = userName/td
 /tr
 tr
 th align = rightPassword/th
 td align = leftinput type = 
 password name = password/td
 /tr
 tr
 td align = rightinput type = submit 
 value = Log In/td
 td align = leftinput type = reset/td
 /tr
 /table
 /form
 /div
 
 How is this 'the default Tomcat logic code'?
 
 And path /myApp/loginPage is protected in web.xml. 
 
 How is it protected in web.xml?
 
 This seems to be alright
 but if a user doesn't enter login details, or enters incorrect login 
 details, and then presses 'Log in' the page simply reloads. I am 
 assuming that this is because I have no login error page working 
 alongside use /myApp/displayDatasetPage to catch login exceptions.
 
 You tell us.  You haven't posted your web.xml, so we can't know.
 
 Is it possible to use /myApp/displayDatasetPage to display login 
 errors? Or can anyone say tell me if I catch Tomcat's login 
 verification process  to do this?
 
 If you're using the Servlet Specification container managed authentication
 mechanism, it's possible.  It doesn't look like you are though.
 
 If you've written your own login component, you can of course make that
 happen too.
 
 Thanks

 Mr Morgan.
 
 Are you Martin O'Shea or Mr Morgan?  I'm confused.
 
 
 p
 
 P.S.  Please send one message to the list and then wait for a response.
 Two messages in 30 mins is a little pushy.
 
 
 
 
 
 -
 To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
 For additional commands, e-mail: users-h...@tomcat.apache.org
 



0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


RE: Use of error page in Tomcat

2010-09-23 Thread Martin O'Shea
I'm currently using a DataSourceRealm and Tomcat 6.0.20.

So if I wanted to pick up an error that Tomcat's authentication throws, how
best can I do it to avoid manual verification of the user (which is now
working adequately when I check the database)?

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: 23 Sep 2010 13 17
To: Tomcat Users List
Subject: Re: Use of error page in Tomcat

On 23/09/2010 13:04, Martin O'Shea wrote:
 Apologies re the duplicate posting; email trouble with my ISP.
 
 Relevant part of web.xml reads:
 
 security-constraint
 display-nameSecurity Constraint/display-name
 web-resource-collection
 web-resource-name/
 description/
   url-pattern/login/url-pattern
 /web-resource-collection
 !--auth-constraint
 role-nameUSER/role-name
 role-nameADMIN/role-name
 /auth-constraint--
 /security-constraint
 login-config
 auth-methodFORM/auth-method
 form-login-config
  
 form-login-page/jsp/security/protected/login.jsp/form-login-page
  
 form-error-page/jsp/security/protected/error.jsp/form-error-page
 /form-login-config
 /login-config

So you've protected just the /login URL, meaning that authentication will be
required before accessing that URL which probably checks the DB for a
username or something.

The config above doesn't do what you probably think it does; you've got half
a container managed authentication solution and half a roll-your-own.

 At the moment I am trying things manually by checking the user table 
 regardless of Tomcat but is this necessary?

Not if you configure it properly.

I'll guess that you're using Tomcat 6.0.29 and suggest that you find and
read the Servlet Spec v2.5, Section SRV.12.1 paying particular attention to
paragraphs which mention 'j_security_check'.


Have you configured a Realm (usually a DataSourceRealm)?

 http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html


p

 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: 23 Sep 2010 12 57
 To: Tomcat Users List
 Subject: Re: Use of error page in Tomcat
 
 On 23/09/2010 12:22, Martin O'Shea wrote:
 Hello

 I have a /myApp/displayDatasetPage which is used to display content. 
 In this page, I incorporate the default Tomcat login code as follows:

 div id = login
 form action='%= 
 response.encodeURL(/myApp/loginPage)
 %'
 method = post
 table border = 0
 
 Tables for layout. How very 1997.
 
 tr
 th align = rightUsername/th
 td align = leftinput type = text 
 name = userName/td
 /tr
 tr
 th align = rightPassword/th
 td align = leftinput type = 
 password name = password/td
 /tr
 tr
 td align = rightinput type = submit 
 value = Log In/td
 td align = leftinput type =
reset/td
 /tr
 /table
 /form
 /div
 
 How is this 'the default Tomcat logic code'?
 
 And path /myApp/loginPage is protected in web.xml. 
 
 How is it protected in web.xml?
 
 This seems to be alright
 but if a user doesn't enter login details, or enters incorrect login 
 details, and then presses 'Log in' the page simply reloads. I am 
 assuming that this is because I have no login error page working 
 alongside use /myApp/displayDatasetPage to catch login exceptions.
 
 You tell us.  You haven't posted your web.xml, so we can't know.
 
 Is it possible to use /myApp/displayDatasetPage to display login 
 errors? Or can anyone say tell me if I catch Tomcat's login 
 verification process  to do this?
 
 If you're using the Servlet Specification container managed 
 authentication mechanism, it's possible.  It doesn't look like you are
though.
 
 If you've written your own login component, you can of course make 
 that happen too.
 
 Thanks

 Mr Morgan.
 
 Are you Martin O'Shea or Mr Morgan?  I'm confused.
 
 
 p
 
 P.S.  Please send one message to the list and then wait for a response.
 Two messages in 30 mins is a little pushy.
 
 
 
 
 
 -
 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: Use of error page in Tomcat

2010-09-23 Thread Pid
On 23/09/2010 13:27, Martin O'Shea wrote:
 I'm currently using a DataSourceRealm and Tomcat 6.0.20.

Well, you aren't actually using the DSR because your config is wrong.
Why use 6.0.20 when 6.0.29 is out?

 So if I wanted to pick up an error that Tomcat's authentication throws, how
 best can I do it to avoid manual verification of the user (which is now
 working adequately when I check the database)?

Stop trying to solve the little problem you think you're stuck on and
start paying attention to the massive problem you're ignoring.

Your login form is simply not going to work, it doesn't point to the
right URL, doesn't send the correct parameters and your web.xml config
is wrong.

I could elaborate but it would be much easier if you actually read my
emails more carefully, and read the Servlet Spec - given that it's
already explained long-hand there.


p

 -Original Message-
 From: Pid [mailto:p...@pidster.com] 
 Sent: 23 Sep 2010 13 17
 To: Tomcat Users List
 Subject: Re: Use of error page in Tomcat
 
 On 23/09/2010 13:04, Martin O'Shea wrote:
 Apologies re the duplicate posting; email trouble with my ISP.

 Relevant part of web.xml reads:

 security-constraint
 display-nameSecurity Constraint/display-name
 web-resource-collection
 web-resource-name/
 description/
  url-pattern/login/url-pattern
 /web-resource-collection
 !--auth-constraint
 role-nameUSER/role-name
 role-nameADMIN/role-name
 /auth-constraint--
 /security-constraint
 login-config
 auth-methodFORM/auth-method
 form-login-config
  
 form-login-page/jsp/security/protected/login.jsp/form-login-page
  
 form-error-page/jsp/security/protected/error.jsp/form-error-page
 /form-login-config
 /login-config
 
 So you've protected just the /login URL, meaning that authentication will be
 required before accessing that URL which probably checks the DB for a
 username or something.
 
 The config above doesn't do what you probably think it does; you've got half
 a container managed authentication solution and half a roll-your-own.
 
 At the moment I am trying things manually by checking the user table 
 regardless of Tomcat but is this necessary?
 
 Not if you configure it properly.
 
 I'll guess that you're using Tomcat 6.0.29 and suggest that you find and
 read the Servlet Spec v2.5, Section SRV.12.1 paying particular attention to
 paragraphs which mention 'j_security_check'.
 
 
 Have you configured a Realm (usually a DataSourceRealm)?
 
  http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html
 
 
 p
 
 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: 23 Sep 2010 12 57
 To: Tomcat Users List
 Subject: Re: Use of error page in Tomcat

 On 23/09/2010 12:22, Martin O'Shea wrote:
 Hello

 I have a /myApp/displayDatasetPage which is used to display content. 
 In this page, I incorporate the default Tomcat login code as follows:

 div id = login
 form action='%= 
 response.encodeURL(/myApp/loginPage)
 %'
 method = post
 table border = 0

 Tables for layout. How very 1997.

 tr
 th align = rightUsername/th
 td align = leftinput type = text 
 name = userName/td
 /tr
 tr
 th align = rightPassword/th
 td align = leftinput type = 
 password name = password/td
 /tr
 tr
 td align = rightinput type = submit 
 value = Log In/td
 td align = leftinput type =
 reset/td
 /tr
 /table
 /form
 /div

 How is this 'the default Tomcat logic code'?

 And path /myApp/loginPage is protected in web.xml. 

 How is it protected in web.xml?

 This seems to be alright
 but if a user doesn't enter login details, or enters incorrect login 
 details, and then presses 'Log in' the page simply reloads. I am 
 assuming that this is because I have no login error page working 
 alongside use /myApp/displayDatasetPage to catch login exceptions.

 You tell us.  You haven't posted your web.xml, so we can't know.

 Is it possible to use /myApp/displayDatasetPage to display login 
 errors? Or can anyone say tell me if I catch Tomcat's login 
 verification process  to do this?

 If you're using the Servlet Specification container managed 
 authentication mechanism, it's possible.  It doesn't look like you are
 though.

 If you've written your own login component, you can of course make 
 that happen too.

 Thanks

 Mr Morgan.

 Are you Martin O'Shea or Mr Morgan?  I'm confused.


 p

 P.S.  Please send one message to the list and then wait for a response.
 Two messages in 30 mins is a little pushy.





 

Re: Use of error page in Tomcat

2010-09-23 Thread Darryl Lewis



On 23/09/10 9:56 PM, Pid p...@pidster.com wrote:

 
 Tables for layout. How very 1997.
 
meow


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



RE: Use of error page in Tomcat

2010-09-23 Thread Martin O'Shea
Well, that's the code in the 6.0.20 samples I have.

-Original Message-
From: Darryl Lewis [mailto:darryl.le...@unsw.edu.au] 
Sent: 23 Sep 2010 14 04
To: Tomcat Users List
Subject: Re: Use of error page in Tomcat




On 23/09/10 9:56 PM, Pid p...@pidster.com wrote:

 
 Tables for layout. How very 1997.
 
meow


-
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: Use of error page in Tomcat

2010-09-23 Thread Martin O'Shea
Please advise how I'm not using the DSR because my config is wrong and
parameters have been corrected as ?

form action='%= response.encodeURL(/myApp/login) %' method = post
table border = 0
tr
th align = rightUsername/th
td align = leftinput type = text name =
j_username/td
/tr
tr
th align = rightPassword/th
td align = leftinput type = password name
= j_password/td
/tr
tr
td align = rightinput type = submit value
= Log in/td
td align = leftinput type = reset/td
/tr
/table
/form

And where the web.xml file needs to be corrected?

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: 23 Sep 2010 14 00
To: Tomcat Users List
Subject: Re: Use of error page in Tomcat

On 23/09/2010 13:27, Martin O'Shea wrote:
 I'm currently using a DataSourceRealm and Tomcat 6.0.20.

Well, you aren't actually using the DSR because your config is wrong.
Why use 6.0.20 when 6.0.29 is out?

 So if I wanted to pick up an error that Tomcat's authentication 
 throws, how best can I do it to avoid manual verification of the user 
 (which is now working adequately when I check the database)?

Stop trying to solve the little problem you think you're stuck on and start
paying attention to the massive problem you're ignoring.

Your login form is simply not going to work, it doesn't point to the right
URL, doesn't send the correct parameters and your web.xml config is wrong.

I could elaborate but it would be much easier if you actually read my emails
more carefully, and read the Servlet Spec - given that it's already
explained long-hand there.


p

 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: 23 Sep 2010 13 17
 To: Tomcat Users List
 Subject: Re: Use of error page in Tomcat
 
 On 23/09/2010 13:04, Martin O'Shea wrote:
 Apologies re the duplicate posting; email trouble with my ISP.

 Relevant part of web.xml reads:

 security-constraint
 display-nameSecurity Constraint/display-name
 web-resource-collection
 web-resource-name/
 description/
  url-pattern/login/url-pattern
 /web-resource-collection
 !--auth-constraint
 role-nameUSER/role-name
 role-nameADMIN/role-name
 /auth-constraint--
 /security-constraint
 login-config
 auth-methodFORM/auth-method
 form-login-config
  
 form-login-page/jsp/security/protected/login.jsp/form-login-page
  
 form-error-page/jsp/security/protected/error.jsp/form-error-page
 /form-login-config
 /login-config
 
 So you've protected just the /login URL, meaning that authentication 
 will be required before accessing that URL which probably checks the 
 DB for a username or something.
 
 The config above doesn't do what you probably think it does; you've 
 got half a container managed authentication solution and half a
roll-your-own.
 
 At the moment I am trying things manually by checking the user table 
 regardless of Tomcat but is this necessary?
 
 Not if you configure it properly.
 
 I'll guess that you're using Tomcat 6.0.29 and suggest that you find 
 and read the Servlet Spec v2.5, Section SRV.12.1 paying particular 
 attention to paragraphs which mention 'j_security_check'.
 
 
 Have you configured a Realm (usually a DataSourceRealm)?
 
  http://tomcat.apache.org/tomcat-6.0-doc/realm-howto.html
 
 
 p
 
 -Original Message-
 From: Pid [mailto:p...@pidster.com]
 Sent: 23 Sep 2010 12 57
 To: Tomcat Users List
 Subject: Re: Use of error page in Tomcat

 On 23/09/2010 12:22, Martin O'Shea wrote:
 Hello

 I have a /myApp/displayDatasetPage which is used to display content. 
 In this page, I incorporate the default Tomcat login code as follows:

 div id = login
 form action='%=
 response.encodeURL(/myApp/loginPage)
 %'
 method = post
 table border = 0

 Tables for layout. How very 1997.

 tr
 th align = rightUsername/th
 td align = leftinput type = text 
 name = userName/td
 /tr
 tr
 th align = rightPassword/th
 td align = leftinput type = 
 password name = password/td
 /tr
 tr
 td align = rightinput type = submit 
 value = Log In/td
 td align = leftinput type =
 reset/td
 /tr
 /table
 /form
 /div

 How is this 'the 

Re: Use of error page in Tomcat

2010-09-23 Thread Pid
On 23/09/2010 14:03, Darryl Lewis wrote:
 
 
 
 On 23/09/10 9:56 PM, Pid p...@pidster.com wrote:
 

 Tables for layout. How very 1997.

 meow

;)


0x62590808.asc
Description: application/pgp-keys


signature.asc
Description: OpenPGP digital signature


Re: [OT] Client to communicate to SSL WebServices on tomcat

2010-09-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jorge,

On 9/22/2010 8:55 PM, Jorge Medina wrote:
 I have had browsers (IE) that can establish an SSL (https) connection
 to a server even when the server did not provide the intermediate
 certificates.  Other browsers (like Firefox) won't allow the
 connection to be established unless the intermediate certificates are
 provided.

That's not true: you just have to confirm a security exception to ff.
The same is true of MSIE.

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

iEYEARECAAYFAkybXzwACgkQ9CaO5/Lv0PBFxQCdFt0a2rrk3Pq7HncYbQly9vJS
EugAmQFbpy7jrRNZYDzlIouQpBfj012m
=CYSL
-END PGP SIGNATURE-

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



Re: [OT] Client to communicate to SSL WebServices on tomcat

2010-09-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Aravidu,

On 9/23/2010 7:13 AM, aravidu wrote:
 Ok. Thanks. I fixed it and tested it again. Now it says this: 
 
 Caused by: java.net.SocketException: SocketException invoking
 https://host:8081/myapp/endpoint: Software caused connection abort: recv
 failed
 Caused by: java.net.SocketException: Software caused connection abort: recv
 failed

Sounds like a firewall issue.

 I am sure the URL/endpoint is working because I am able to access the
 endpoint thru firefox. 

Are both Firefox and your client running on the same machine?

What URL works correctly in your web browser?

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

iEYEARECAAYFAkybX8gACgkQ9CaO5/Lv0PDUYwCdEwFSTVwS+7ZRIhgI+YwIWCq/
MjkAn2/O6uYRkuxyxMrwIyaNLuLc9DJ5
=LdWw
-END PGP SIGNATURE-

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



In org.apache.catalina.connector.Request.doGetSession, java.lang.IllegalStateException: Cannot create a session after the response has been committed

2010-09-23 Thread Brian
Hi, 

First of all, I'm using Tomcat 6.0.29 (the latest as of September 2010),
Struts and other technologies not relevant here. 

My website runs fine 99% of the time, but several times per day I get an
error in my Tomcat Log, so it is an sporadic issue. I don't know the reason.
My code is separated in model/view/controller, given that I'm using Struts,
so my code has been correctly separated in layers. This error happens in
several JSP pages. 
As far as I can understand, Tomcat generates a Java class (a servlet) for
every JSP (well, everybody know that I guess). When my problem arrises, an
exception is being thrown when the corresponding generated servlet tries to
run the _jspService() method that uses a lot of out.write() methods to
send the output to the response. An exception is being thrown for some
reason, and then my log gets the error trace. 
Anybody knows what is going on? 
What does response has been commited mean? I have a theory: Maybe it means
that in the java code that the container generated for my JSP, at least one
out.write() method has already been used, which means that It already has
started to send html code to the browser. Am I right? 
Again, this is a sporadic issue, which drives me crazy!

This is the error in the log: 


---
Sep 21, 2010 3:18:42 PM org.apache.jasper.runtime.JspFactoryImpl
internalGetPageContext 
SEVERE: Exception initializing page context 
java.lang.IllegalStateException: Cannot create a session after the response
has been committed Which session is my code creating? where?
Why is this sporadic? 
at org.apache.catalina.connector.Request.doGetSession(Request.java:2377) 
at org.apache.catalina.connector.Request.getSession(Request.java:2097) 
at
org.apache.catalina.connector.RequestFacade.getSession(RequestFacade.java:83
3) 
at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr
apper.java:216) 
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe
quest.java:547) 
at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr
apper.java:216) 
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe
quest.java:547) 
at
javax.servlet.http.HttpServletRequestWrapper.getSession(HttpServletRequestWr
apper.java:216) 
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe
quest.java:547) 
at
org.apache.catalina.core.ApplicationHttpRequest.getSession(ApplicationHttpRe
quest.java:493) 
at
org.apache.jasper.runtime.PageContextImpl._initialize(PageContextImpl.java:1
46) 
at
org.apache.jasper.runtime.PageContextImpl.initialize(PageContextImpl.java:12
4) 
at
org.apache.jasper.runtime.JspFactoryImpl.internalGetPageContext(JspFactoryIm
pl.java:107) 
at
org.apache.jasper.runtime.JspFactoryImpl.getPageContext(JspFactoryImpl.java:
63) 
at
org.apache.jsp.WEB_002dINF.pages.utility.Error_jsp._jspService(Error_jsp.jav
a:49) -- This is the JSP page where all my JSP pages redirect
when something goes wrong 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
77) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:290) 
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:206) 
at
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.
java:646) 
at
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatch
er.java:551) 
at
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher
.java:488) 
at
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:9
68) 
at
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:621) 
at
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextI
mpl.java:820) 
at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:791) 
at
org.apache.jsp.WEB_002dINF.pages.ProductsForModel_jsp._jspService(ProductsFo
rModel_jsp.java:1137) --- In this case, the problem happened in my page
ProductsForModel.jsp 
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:3
77) 
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313) 
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260) 
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) 

Re: How ot monitor hung tomcat/apache processes?

2010-09-23 Thread Juha Laiho

On 09/22/2010 03:42 PM, Darryl Lewis wrote:

Are you trying to monitor from the same computer that tomcat is running on? 
That's not a good idea. What happens if the entire system crashes...you won't 
get any data/alerts. End to end uses another machine to monitor the first.
You could monitor catalina.out for errors, but I don't think you'll capture 
every possibility.
What would happen if the system stops serving pages (or serves them slow)? That 
won't show in the logs.

What port is your application running on? You can use (from another machine) 
wget {servername}:8080.


Well, on the other hand, what happens, if the machine doing the 
monitoring crashes? Again, you're out of alerts.


So, monitoring is something you build in layers. And have one point of 
your monitoring infrastructure be something that is seen if it goes 
down. Or alternatively, have some weird setup where two (or more)

things are monitoring each other.

As for end-to-end monitoring, it's nice for response time statistics, 
but if your infrastructure is anything beyond simple, you'll want to 
monitor distinct components. Consider a situation where authentication 
is done by some kind of front-end proxy. You have end-to-end monitoring 
in place, so all your requests go through the front-end. Now, monitoring 
shows an error. Is the error with the front-end or with the application 
server? Or perhaps in the network between the two? Or in the network 
between the monitoring server and the front-end? Add another layer 
(database?), and you'll agani have more possibilities what could be 
wrong -- and more or less, with end-to-end monitoring you'll only get a 
notification that something is wrong with this page.


Further, with end-to-end monitoring combined with redundant systems, the 
alert will generate when the last piece of redundancy is gone - i.e. 
when the whole redundant service is down, not when it gets degraded 
(which would be the correct point to react).


So, something running on your Tomcat machine and doing requests for 
HEAD / would be sufficient to see that the Tomcat itself is not 
completely hung. When you make such a program simple enough (but at the 
same time foolproof enough), and set it to run regularly using the 
operating system task scheduler (cron in Unix-like systems), you'll have 
a good point solution that tells you exactly that the Tomcat is not 
working.


As to finding out what is wrong with a non-working Tomcat, I've been 
pretty successful in generating thread dumps from hung Tomcat java 
processes, and seeing from them what has been executing, and also rather 
often what has caused the hang. For example, some versions of Oracle 
JDBC drivers.. .


--
..Juha

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



catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread Patel, Biren G
Hi,

I am using Tomcat 5.5.7 on AIX 5.3.  The log file catalina.log is getting fill 
up quick causing file system to be 100 %, I am using default logging 
configuration.  I see the following lines being dump into the log file. Can you 
please tell me what these log means ?

Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log
INFO: cgi: runCGI: write(dd  ADD:00
09/16/2010 10:13:02  0600912345  0505266A9153   9153  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9203   9203  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9313   9313  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9253   9253  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9243   9243  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9323   9323  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9343   9343  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9263   9263  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9353   9353  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9373   9373  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9333   9333  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9363   9363  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9393   9393  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9293   9293  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9223   9223  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9283   9283  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9273   9273  add   A)

Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log
INFO: cgi: runCGI: write(/16/2010 10:13:02  0600912345  0505266A9423   9423  
del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9653   9653  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9663   9663  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9713   9713  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9493   9493  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9583   9583  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9673   9673  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9703   9703  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9683   9683  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9833   9833  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9723   9723  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9503   9503  del   DEL:00
09/16/2010 10:13:02  0600912345  0505266A9733   9733  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9823   9823  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9863   9863  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9873   9873  del   DEL:00
09/16/2010 10:13:03  0600912345  0505266A9913   9913  del   DEL:00





Issues with Memory Leaks on Tomcat 6.0.28

2010-09-23 Thread Kevin Mai
I'm getting this error on my tomcat installation: 

SEVERE: Error listenerStart 
Sep 23, 2010 2:29:40 PM org.apache.catalina.core.StandardContext start 
SEVERE: Context [/Simon] startup failed due to previous errors 
Sep 23, 2010 2:29:40 PM org.apache.catalina.loader.WebappClassLoader 
clearThreadLocalMap 
SEVERE: The web application [/Simon] created a ThreadLocal with key of type 
[java.lang.ThreadLocal] (value [java.lang.threadlo...@7befc208]) and a value of 
type [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl] (value 
[com.ibatis.sqlmap.engine.impl.sqlmapsessioni...@39abdac9]) but failed to 
remove it when the web application was stopped. This is very likely to create a 
memory leak. 


I've already disabled IPv6 entirely and set the default settings: 

# Run Tomcat as this user ID. Not setting this or leaving it blank will use the 
# default of tomcat6. 
#TOMCAT6_USER=tomcat6 

# Run Tomcat as this group ID. Not setting this or leaving it blank will use 
# the default of tomcat6. 
#TOMCAT6_GROUP=tomcat6 

# The home directory of the Java development kit (JDK). You need at least 
# JDK version 1.5. If JAVA_HOME is not set, some common directories for 
# OpenJDK, the Sun JDK, and various J2SE 1.5 versions are tried. 
#JAVA_HOME=/usr/lib/jvm/openjdk-6-jdk 
# sun-jdk 
JAVA_HOME=/usr/lib/jvm/java-6-sun 

# Directory where the Tomcat 6 binary distribution resides. This a read-only 
# directory that can be shared by all Tomcat instances running on the machine. 
# Default: /usr/share/tomcat6 
#CATALINA_HOME=/usr/share/$NAME 

# Directory for per-instance configuration files and webapps. It contains the 
# directories conf, logs, webapps, work and temp. See RUNNING.txt for details. 
# Default: /var/lib/tomcat6 
#CATALINA_BASE=/var/lib/$NAME 

# You may pass JVM startup parameters to Java here. If unset, the default 
# options (-Djava.awt.headless=true -Xmx128m) will be used. 
JAVA_OPTS=-Djava.awt.headless=true -Xmx128m 

# Use a CMS garbage collector for improved response time 
# JAVA_OPTS=${JAVA_OPTS} -XX:+UseConcMarkSweepGC -XX:+DisableExplicitGC 
JAVA_OPTS=${JAVA_OPTS} -Xnoclassgc -Xloggc:/var/log/tomcat6/gc.log 


# When using the CMS garbage collector, you should enable the following option 
# if you run Tomcat on a machine with exactly one CPU chip that contains one 
# or two cores. 
#JAVA_OPTS=$JAVA_OPTS -XX:+CMSIncrementalMode 

# To enable remote debugging uncomment the following line. 
# You will then be able to use a java debugger on port 8000. 
#JAVA_OPTS=${JAVA_OPTS} -Xdebug 
-Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n 

# Java compiler to use for translating JavaServer Pages (JSPs). You can use all 
# compilers that are accepted by Ant's build.compiler property. 
#JSP_COMPILER=javac 

# Use the Java security manager? (yes/no, default: no) 
#TOMCAT6_SECURITY=no 

# Number of days to keep logfiles in /var/log/tomcat6. Default is 14 days. 
#LOGFILE_DAYS=14 

# Location of the JVM temporary directory 
# WARNING: This directory will be destroyed and recreated at every startup ! 
#JVM_TMP=/tmp/tomcat6-temp 


I'd really appreciate if I could get a quick reply, as we're not being able to 
solve this on our own :3 

Thanks! 

Kevin 


RE: Issues with Memory Leaks on Tomcat 6.0.28

2010-09-23 Thread Caldarale, Charles R
 From: Kevin Mai [mailto:k...@mrecic.gov.ar] 
 Subject: Issues with Memory Leaks on Tomcat 6.0.28

 I'm getting this error on my tomcat installation: 

 SEVERE: Error listenerStart 

The above is the real problem.  (Note that you didn't give us the interesting 
part of the log, including the timestamp for the above entry and any stack 
trace that might actually tell us what the real error is.)

 Sep 23, 2010 2:29:40 PM org.apache.catalina.core.StandardContext start 
 SEVERE: Context [/Simon] startup failed due to previous errors 

The above is a result of the first problem.

 Sep 23, 2010 2:29:40 PM org.apache.catalina.loader.WebappClassLoader 
 clearThreadLocalMap 
 SEVERE: The web application [/Simon] created a ThreadLocal

The above is just telling you that Tomcat is cleaning up the mess of the 
unstartable webapp, because the webapp failed to do so itself (quite possibly 
because the listener is broken).

Fix the problem (your listener), not the symptom.

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



Re: Issues with Memory Leaks on Tomcat 6.0.28

2010-09-23 Thread Kevin Mai
This is the whole output:


INFO: Pausing Coyote HTTP/1.1 on http-8080
Sep 23, 2010 2:57:02 PM org.apache.catalina.core.StandardService stop
INFO: Stopping service Catalina
Sep 23, 2010 2:57:02 PM org.apache.catalina.core.StandardContext stop
INFO: Container 
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/Simon] has not 
been started
Sep 23, 2010 2:57:02 PM org.apache.coyote.http11.Http11Protocol destroy
INFO: Stopping Coyote HTTP/1.1 on http-8080
Sep 23, 2010 2:57:05 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'debug' to '0' did not find a matching property.
Sep 23, 2010 2:57:06 PM org.apache.tomcat.util.digester.Digester endElement
WARNING:   No rules found matching 'Server/Service/Engine/Host/Context/Logger'.
Sep 23, 2010 2:57:06 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-8080
Sep 23, 2010 2:57:06 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1181 ms
Sep 23, 2010 2:57:06 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
Sep 23, 2010 2:57:06 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.28
Sep 23, 2010 2:57:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 23, 2010 2:57:09 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/Simon] startup failed due to previous errors
Sep 23, 2010 2:57:09 PM org.apache.catalina.loader.WebappClassLoader 
clearReferencesJdbc
SEVERE: The web application [/Simon] registered the JBDC driver 
[com.mysql.jdbc.Driver] but failed to unregister it when the web application 
was stopped. To prevent a memory leak, the JDBC Driver has been forcibly 
unregistered.
Sep 23, 2010 2:57:09 PM org.apache.catalina.loader.WebappClassLoader 
clearThreadLocalMap
SEVERE: The web application [/Simon] created a ThreadLocal with key of type 
[java.lang.ThreadLocal] (value [java.lang.threadlo...@3e0d1329]) and a value of 
type [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl] (value 
[com.ibatis.sqlmap.engine.impl.sqlmapsessioni...@4c650892]) but failed to 
remove it when the web application was stopped. This is very likely to create a 
memory leak.
Sep 23, 2010 2:57:09 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor host-manager.xml
Sep 23, 2010 2:57:10 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor examples.xml
Sep 23, 2010 2:57:10 PM org.apache.catalina.startup.HostConfig deployDescriptor
INFO: Deploying configuration descriptor ROOT.xml
Sep 23, 2010 2:57:10 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory Simon_WEB.war
Sep 23, 2010 2:57:12 PM org.apache.catalina.core.StandardContext start
SEVERE: Error listenerStart
Sep 23, 2010 2:57:12 PM org.apache.catalina.core.StandardContext start
SEVERE: Context [/Simon_WEB.war] startup failed due to previous errors
Sep 23, 2010 2:57:12 PM org.apache.catalina.loader.WebappClassLoader 
clearThreadLocalMap
SEVERE: The web application [/Simon_WEB.war] created a ThreadLocal with key of 
type [java.lang.ThreadLocal] (value [java.lang.threadlo...@23b17d49]) and a 
value of type [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl] (value 
[com.ibatis.sqlmap.engine.impl.sqlmapsessioni...@599855ed]) but failed to 
remove it when the web application was stopped. This is very likely to create a 
memory leak.
Sep 23, 2010 2:57:12 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-8080
Sep 23, 2010 2:57:12 PM org.apache.catalina.startup.Catalina start

I don't know where to look at to be honest..

- Mensaje original -
De: Charles R Caldarale chuck.caldar...@unisys.com
Para: Tomcat Users List users@tomcat.apache.org
Enviados: Jueves, 23 de Septiembre 2010 14:45:16
Asunto: RE: Issues with Memory Leaks on Tomcat 6.0.28

 From: Kevin Mai [mailto:k...@mrecic.gov.ar]
 Subject: Issues with Memory Leaks on Tomcat 6.0.28

 I'm getting this error on my tomcat installation:

 SEVERE: Error listenerStart

The above is the real problem. (Note that you didn't give us the
interesting part of the log, including the timestamp for the above entry
and any stack trace that might actually tell us what the real error is.)

 Sep 23, 2010 2:29:40 PM org.apache.catalina.core.StandardContext start
 SEVERE: Context [/Simon] startup failed due to previous errors

The above is a result of the first problem.

 Sep 23, 2010 2:29:40 PM org.apache.catalina.loader.WebappClassLoader
 clearThreadLocalMap
 SEVERE: The web application [/Simon] created a ThreadLocal

The above is just telling you that Tomcat is cleaning up the mess of the
unstartable webapp, because the webapp failed to do so itself (quite
possibly because the listener is broken).

Fix the problem (your listener), not the 

Re: In org.apache.catalina.connector.Request.doGetSession, java.lang.IllegalStateException: Cannot create a session after the response has been committed

2010-09-23 Thread Mark Thomas
On 23/09/2010 07:42, Brian wrote:
 What does response has been commited mean? I have a theory: Maybe it means
 that in the java code that the container generated for my JSP, at least one
 out.write() method has already been used, which means that It already has
 started to send html code to the browser. Am I right? 
 Again, this is a sporadic issue, which drives me crazy!

committed means that the HTTP headers have been written to the client
and no further headers can be sent (note: creating a session requires
sending a cookie header to the client - this will be important in a
bit). Output is buffered (I think 8k by default - might be 4k) by
default so you can still add headers even after some content has been
written.

JSPs create sessions by default unless you explicitly disable this.

I suspect the sequence is:
1. Your page starts processing
2. The page is committed (either it calls flush or the output fills the
buffer so it has to flush)
3. Something goes wrong
4. Redirect to error JSP
5. Error JSP tries to create a session
6. Response has been committed so session can't be created
7. You get the error you are seeing

If step 3 occurs before step 2 then everything will work as the response
won't have been committed.

Mark



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



Re: catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread Mark Thomas
On 23/09/2010 09:30, Patel, Biren G wrote:
 Hi,
 
 I am using Tomcat 5.5.7 on AIX 5.3.  The log file catalina.log is getting 
 fill up quick causing file system to be 100 %, I am using default logging 
 configuration.  I see the following lines being dump into the log file. Can 
 you please tell me what these log means ?

Nope. That is application generated logging. You'll need to ask the app
developers.

Mark



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



Re: Issues with Memory Leaks on Tomcat 6.0.28

2010-09-23 Thread Mark Thomas
On 23/09/2010 10:58, Kevin Mai wrote:
 Sep 23, 2010 2:57:09 PM org.apache.catalina.core.StandardContext start
 SEVERE: Error listenerStart

The stack trace for this will be in the localhost log (or maybe an app
specific log).

Mark



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



Tomcat 6.0.28 w/ VeriSign SSL TLS -- Errors upon startup.

2010-09-23 Thread Sean Killeen
Hi all,

Have been going through steps to upgrade a product residing on Tomcat (on
Windows Server 2003) to the newest version. Previously, our upgrade path
went to 6.0 but now we've taken it to 6.0.28 on another server and I'm
encountering errors that I can't seem to trace. I've been all over Google
and other resources for about a week now trying to figure it out, and this
is my last resort. I appreciate any help you can give!

for the record, the keytool app in the JDK (1.6.0_18) was used to generate
a key and CSR, which we sent to VeriSign and received the certificate back.
We then imported the intermediate CA for VeriSign and the certificate that
VeriSign sent us. All of these operations were completed according to
directions given to us by VeriSign, and all operations were noted by the
tool to have been completed successfully.

Detailed information can be found below; Please let me know if I can provide
any additional information that will help. Thank you!

--
Sean

---

Our Tomcat Connector (only connector in the file):

 Connector
port=8443
protocol=HTTP/1.1
protocols=TLSv1
SSLEnabled=true
enableLookups=false
acceptCount=100
maxThreads=200
scheme=https
keystoreFile=d:\keystore\.keystore
keystorePass=[redacted]
secure=true
clientAuth=false
sslProtocol=TLSv1
cipher=AES
allowUnsafeLegacyRenegotiation=false
/

---


The full startup output of Tomcat 6.0.28:

Sep 23, 2010 2:03:50 PM org.apache.catalina.core.AprLifecycleListener init
INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
Sep 23, 2010 2:03:50 PM org.apache.catalina.core.AprLifecycleListener init
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
[false], ra
ndom [true].
Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'keys
toreFile' to 'd:\keystore\.keystore' did not find a matching property.
Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'keys
torePass' to '[redacted]' did not find a matching property.
Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'clie
ntAuth' to 'false' did not find a matching property.
Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'ciph
er' to 'AES' did not find a matching property.
Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
begin
WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
'allo
wUnsafeLegacyRenegotiation' to 'false' did not find a matching property.
Sep 23, 2010 2:03:51 PM org.apache.coyote.http11.Http11AprProtocol init
SEVERE: Error initializing endpoint
java.lang.Exception: No Certificate file specified or invalid file format
at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:721)
at
org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.jav
a:107)
at
org.apache.catalina.connector.Connector.initialize(Connector.java:101
4)
at
org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:680)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 23, 2010 2:03:51 PM org.apache.catalina.startup.Catalina load
SEVERE: Catalina.start
LifecycleException:  Protocol handler initialization failed:
java.lang.Exception
: No Certificate file specified or invalid file format
at
org.apache.catalina.connector.Connector.initialize(Connector.java:101
6)
at
org.apache.catalina.core.StandardService.initialize(StandardService.j
ava:680)
at
org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
a:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at

Re: Tomcat 6.0.28 w/ VeriSign SSL TLS -- Errors upon startup.

2010-09-23 Thread Kishore Kumar Manthangod
Looks this is culprit. Either file not found at d:\keystore\.keystore or
change it to d:/keystore/.keystore (Forward slashing)


On Thu, Sep 23, 2010 at 11:21 AM, Sean Killeen seankill...@gmail.comwrote:

 Hi all,

 Have been going through steps to upgrade a product residing on Tomcat (on
 Windows Server 2003) to the newest version. Previously, our upgrade path
 went to 6.0 but now we've taken it to 6.0.28 on another server and I'm
 encountering errors that I can't seem to trace. I've been all over Google
 and other resources for about a week now trying to figure it out, and this
 is my last resort. I appreciate any help you can give!

 for the record, the keytool app in the JDK (1.6.0_18) was used to
 generate
 a key and CSR, which we sent to VeriSign and received the certificate back.
 We then imported the intermediate CA for VeriSign and the certificate that
 VeriSign sent us. All of these operations were completed according to
 directions given to us by VeriSign, and all operations were noted by the
 tool to have been completed successfully.

 Detailed information can be found below; Please let me know if I can
 provide
 any additional information that will help. Thank you!

 --
 Sean

 ---

 Our Tomcat Connector (only connector in the file):

 Connector
port=8443
 protocol=HTTP/1.1
 protocols=TLSv1
 SSLEnabled=true
 enableLookups=false
 acceptCount=100
maxThreads=200
 scheme=https
 keystoreFile=d:\keystore\.keystore
 keystorePass=[redacted]
secure=true
 clientAuth=false
 sslProtocol=TLSv1
 cipher=AES
 allowUnsafeLegacyRenegotiation=false
 /

 ---


 The full startup output of Tomcat 6.0.28:

 Sep 23, 2010 2:03:50 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
 Sep 23, 2010 2:03:50 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
 [false], ra
 ndom [true].
 Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
 begin
 WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
 'keys
 toreFile' to 'd:\keystore\.keystore' did not find a matching property.
 Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
 begin
 WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
 'keys
 torePass' to '[redacted]' did not find a matching property.
 Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
 begin
 WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
 'clie
 ntAuth' to 'false' did not find a matching property.
 Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
 begin
 WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
 'ciph
 er' to 'AES' did not find a matching property.
 Sep 23, 2010 2:03:50 PM org.apache.catalina.startup.SetAllPropertiesRule
 begin
 WARNING: [SetAllPropertiesRule]{Server/Service/Connector} Setting property
 'allo
 wUnsafeLegacyRenegotiation' to 'false' did not find a matching property.
 Sep 23, 2010 2:03:51 PM org.apache.coyote.http11.Http11AprProtocol init
 SEVERE: Error initializing endpoint
 java.lang.Exception: No Certificate file specified or invalid file format
at org.apache.tomcat.jni.SSLContext.setCertificate(Native Method)
at org.apache.tomcat.util.net.AprEndpoint.init(AprEndpoint.java:721)
at
 org.apache.coyote.http11.Http11AprProtocol.init(Http11AprProtocol.jav
 a:107)
at
 org.apache.catalina.connector.Connector.initialize(Connector.java:101
 4)
at
 org.apache.catalina.core.StandardService.initialize(StandardService.j
 ava:680)
at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
 a:795)
at org.apache.catalina.startup.Catalina.load(Catalina.java:524)
at org.apache.catalina.startup.Catalina.load(Catalina.java:548)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
 java:39)
at
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
 sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:261)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
 Sep 23, 2010 2:03:51 PM org.apache.catalina.startup.Catalina load
 SEVERE: Catalina.start
 LifecycleException:  Protocol handler initialization failed:
 java.lang.Exception
 : No Certificate file specified or invalid file format
at
 org.apache.catalina.connector.Connector.initialize(Connector.java:101
 6)
at
 org.apache.catalina.core.StandardService.initialize(StandardService.j
 ava:680)
at
 org.apache.catalina.core.StandardServer.initialize(StandardServer.jav
 a:795)
at 

Re: Tomcat 6.0.28 w/ VeriSign SSL TLS -- Errors upon startup.

2010-09-23 Thread Mark Thomas
On 23/09/2010 11:21, Sean Killeen wrote:
 Our Tomcat Connector (only connector in the file):
 
  Connector
 port=8443
 protocol=HTTP/1.1
 protocols=TLSv1
 SSLEnabled=true
 enableLookups=false
 acceptCount=100
 maxThreads=200
 scheme=https
 keystoreFile=d:\keystore\.keystore
 keystorePass=[redacted]
 secure=true
 clientAuth=false
 sslProtocol=TLSv1
 cipher=AES
 allowUnsafeLegacyRenegotiation=false
 /

You are trying to use the BIO connector (based on the SSL attributes you
have set).

 Sep 23, 2010 2:03:50 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: Loaded APR based Apache Tomcat Native library 1.1.20.
 Sep 23, 2010 2:03:50 PM org.apache.catalina.core.AprLifecycleListener init
 INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters
 [false], ra
 ndom [true].

But you have APR enabled so you'll actually be using the APR/native
connector.

Disable the APR listener in server.xml.

Mark



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



Re: Tomcat 6.0.28 w/ VeriSign SSL TLS -- Errors upon startup.

2010-09-23 Thread Mark Thomas
On 23/09/2010 11:26, Kishore Kumar Manthangod wrote:
 Looks this is culprit. Either file not found at d:\keystore\.keystore or
 change it to d:/keystore/.keystore (Forward slashing)

Nope. That is not the problem in this case.

Mark



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



RE: catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread Patel, Biren G
Here is the logs from original email:

Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log
INFO: cgi: runCGI: write(dd  ADD:00
09/16/2010 10:13:02  0600912345  0505266A9153   9153  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9203   9203  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9313   9313  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9253   9253  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9243   9243  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9323   9323  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9343   9343  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9263   9263  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9353   9353  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9373   9373  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9333   9333  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9363   9363  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9393   9393  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9293   9293  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9223   9223  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9283   9283  add   ADD:00
09/16/2010 10:13:02  0600912345  0505266A9273   9273  add   A)

In normally case we have class name (log4j) that generates the log, I don't see 
that here. Second, why would it print same line (...add...) multiple times?  
Please let me know where do I look at.

Regards,
Biren G. Patel
(732)699-4430

-Original Message-
From: Mark Thomas [mailto:ma...@apache.org] 
Sent: Thursday, September 23, 2010 2:13 PM
To: Tomcat Users List
Subject: Re: catalina.log getting bigger causing fillup file system on unix

On 23/09/2010 09:30, Patel, Biren G wrote:
 Hi,
 
 I am using Tomcat 5.5.7 on AIX 5.3.  The log file catalina.log is getting 
 fill up quick causing file system to be 100 %, I am using default logging 
 configuration.  I see the following lines being dump into the log file. Can 
 you please tell me what these log means ?

Nope. That is application generated logging. You'll need to ask the app
developers.

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



Re: catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread Wesley Acheson
It looks like someone add a System.out.* inside a loop possibly as a
debug. This is application logs, I see this all the time, someone just
wants a quick debug and they print to system.out rather than using a
logger.


On Thu, Sep 23, 2010 at 8:30 PM, Patel, Biren G bpa...@telcordia.com wrote:
 Here is the logs from original email:

 Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log
 INFO: cgi: runCGI: write(dd  ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9153   9153  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9203   9203  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9313   9313  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9253   9253  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9243   9243  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9323   9323  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9343   9343  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9263   9263  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9353   9353  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9373   9373  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9333   9333  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9363   9363  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9393   9393  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9293   9293  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9223   9223  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9283   9283  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9273   9273  add   A)

 In normally case we have class name (log4j) that generates the log, I don't 
 see that here. Second, why would it print same line (...add...) multiple 
 times?  Please let me know where do I look at.

 Regards,
 Biren G. Patel
 (732)699-4430

 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Thursday, September 23, 2010 2:13 PM
 To: Tomcat Users List
 Subject: Re: catalina.log getting bigger causing fillup file system on unix

 On 23/09/2010 09:30, Patel, Biren G wrote:
 Hi,

 I am using Tomcat 5.5.7 on AIX 5.3.  The log file catalina.log is getting 
 fill up quick causing file system to be 100 %, I am using default logging 
 configuration.  I see the following lines being dump into the log file. Can 
 you please tell me what these log means ?

 Nope. That is application generated logging. You'll need to ask the app
 developers.

 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: catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread Mark Thomas
On 23/09/2010 11:30, Patel, Biren G wrote:
 Here is the logs from original email:

sarcasmThanks for adding that back./sarcasm

I quoted selectively for a reason. Not least of which so I didn't fill
up the inboxes of the 2000+ subscribers to this list with a copy of some
meaningless data they already have a copy of.

 In normally case we have class name (log4j) that generates the log, I don't 
 see that here. Second, why would it print same line (...add...) multiple 
 times?  Please let me know where do I look at.

Again:

 Nope. That is application generated logging. You'll need to ask the app
 developers.

I really don't see how I could have made this any clearer.

Mark



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



Re: catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread Kishore Kumar Manthangod
Could you check your log4j configured to show class name?

## The log pattern uses the following conversion specifiers.
# %p for Priority Level.
# %C for Class Name.
# %d for Date.
# %n for The new line character.  Equivalent to \n or CRLF. The logger will
not automatically place a new line character at the end of a log line.

log4j.appender.LogDebug.layout.ConversionPattern=%-6p [%d{ISO8601}] - %-65c
-%m%n
log4j.appender.LogError.layout.ConversionPattern=%-6p [%d{ISO8601}] - %-65c
-%m%n

--Kishore

On Thu, Sep 23, 2010 at 11:30 AM, Patel, Biren G bpa...@telcordia.comwrote:

 Here is the logs from original email:

 Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log
 INFO: cgi: runCGI: write(dd  ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9153   9153  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9203   9203  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9313   9313  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9253   9253  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9243   9243  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9323   9323  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9343   9343  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9263   9263  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9353   9353  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9373   9373  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9333   9333  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9363   9363  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9393   9393  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9293   9293  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9223   9223  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9283   9283  add   ADD:00
 09/16/2010 10:13:02  0600912345  0505266A9273   9273  add   A)

 In normally case we have class name (log4j) that generates the log, I don't
 see that here. Second, why would it print same line (...add...) multiple
 times?  Please let me know where do I look at.

 Regards,
 Biren G. Patel
 (732)699-4430

 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Thursday, September 23, 2010 2:13 PM
 To: Tomcat Users List
 Subject: Re: catalina.log getting bigger causing fillup file system on unix

 On 23/09/2010 09:30, Patel, Biren G wrote:
  Hi,
 
  I am using Tomcat 5.5.7 on AIX 5.3.  The log file catalina.log is getting
 fill up quick causing file system to be 100 %, I am using default logging
 configuration.  I see the following lines being dump into the log file. Can
 you please tell me what these log means ?

 Nope. That is application generated logging. You'll need to ask the app
 developers.

 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




Re: Tomcat 6.0.28 w/ VeriSign SSL TLS -- Errors upon startup.

2010-09-23 Thread Sean Killeen
@Kishore: I attempted your fix, but the errors remain so I changed it back.

@Mark: I commented the AprLifecycleListener listener, but the error remains.
The listeners section of server.xml now looks like:

  !--APR library loader. Documentation at /docs/apr.html --
  !--Listener className=org.apache.catalina.core.AprLifecycleListener
SSLEngine=on /--
  !--Initialize Jasper prior to webapps are loaded. Documentation at
/docs/jasper-howto.html --
  Listener className=org.apache.catalina.core.JasperListener /
  !-- JMX Support for the Tomcat server. Documentation at
/docs/non-existent.html --
  Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
/
  Listener
className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

Thanks for the fast responses! Hoping to find a resolution to this soon.

--
Sean


On Thu, Sep 23, 2010 at 2:29 PM, Mark Thomas ma...@apache.org wrote:

 On 23/09/2010 11:26, Kishore Kumar Manthangod wrote:
  Looks this is culprit. Either file not found at d:\keystore\.keystore or
  change it to d:/keystore/.keystore (Forward slashing)

 Nope. That is not the problem in this case.

 Mark



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




Re: Issues with Memory Leaks on Tomcat 6.0.28

2010-09-23 Thread Mark Eggers
I'll do some of this inline:


 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'debug'
  to '0' did not find a matching property.

Two things here:

1. Place your context in a META-INF/context.xml file in your web application, 
not in server.xml
2. Remove the debug attribute, since it hasn't been valid for a long time.

 WARNING:   No rules found matching 
'Server/Service/Engine/Host/Context/Logger'.


I don't see a reference to a Logger in the Context documentation for 5.5, 6.0, 
0r 7.0. If you're trying to log at the Context level, take a look at the 
documents for your version of Tomcat (which you've not mentioned) and add the 
appropriate Valve element.

 SEVERE: Error listenerStart

This is the problem (as pointed out before). The code you're using in your 
Listener isn't working as expected. I suspect that you're trying to start up 
iBatis (now MyBatis), and that the code is failing.
 
 SEVERE: The web application [/Simon] created a ThreadLocal with key of type
 [java.lang.ThreadLocal] (value [java.lang.threadlo...@3e0d1329]) and a value 
 of 
type 
 [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl] (value 
 [com.ibatis.sqlmap.engine.impl.sqlmapsessioni...@4c650892]) but failed to 
remove it when 
 the web application was stopped. This is very likely to create a memory leak.

 SEVERE: The web application [/Simon_WEB.war] created a ThreadLocal with key 
 of 
type 
 [java.lang.ThreadLocal] (value [java.lang.threadlo...@23b17d49]) and a value 
 of 
type 
 [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl] (value 
 [com.ibatis.sqlmap.engine.impl.sqlmapsessioni...@599855ed]) but failed to 
remove it when 
 the web application was stopped. This is very likely to create a memory leak.

This is fallout from your failed listener (as has been pointed out).

When you write a listener class, you have both a 
contextInitialized(ServletContextEvent sce) and a 
contextDestroyed(ServletContextEvent sce) method.

It looks like your contextInitialized method is failing, and you've not written 
a contextDestroyed method. You'll need to fix the first, and then write the 
second so that when the context is destroyed (like undeploying the 
application), 
you shut down all of your resources gracefully.

I've not used iBatis, so I am not aware of how the listener should be written. 
I've done this for Hibernate.

I'm also guessing that you're setting up iBatis to control the database pooling 
and access. You can let Tomcat manage the connection pool with iBatis. This may 
simplify your listener code somewhat. An iBatis thread concerning that can be 
found here:

http://markmail.org/message/pocthjsiw4cdhohj#query:+page:1+mid:pocthjsiw4cdhohj+state:results


So:

1. Fix your contextInitialized method
2. Write a contextDestroyed method
3. Configure iBatis to use Tomcat's database pooling (which may eliminate the 
need for 2)

. . . . just my two cents.

/mde/


  


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



Re: Tomcat 6.0.28 w/ VeriSign SSL TLS -- Errors upon startup.

2010-09-23 Thread Sean Killeen
Sorry for the additional reply but I found some additional information that
might be relevant:

We have a tomcat 6.0 installation that is referring to the same keystore
with the same connector that starts up without error. However, the Tomcat
6.0.28 instance starts up with error.

I did a diff on the files with Notepad++ and they are pretty much exactly
the same. I pasted my 6.0 connector to replace 6.0.28 default connectors in
the server.xml file.

Given this, any idea what my next steps might be?

--
Sean


On Thu, Sep 23, 2010 at 2:38 PM, Sean Killeen seankill...@gmail.com wrote:

 @Kishore: I attempted your fix, but the errors remain so I changed it back.

 @Mark: I commented the AprLifecycleListener listener, but the error
 remains. The listeners section of server.xml now looks like:

   !--APR library loader. Documentation at /docs/apr.html --
   !--Listener className=org.apache.catalina.core.AprLifecycleListener
 SSLEngine=on /--
   !--Initialize Jasper prior to webapps are loaded. Documentation at
 /docs/jasper-howto.html --
   Listener className=org.apache.catalina.core.JasperListener /
   !-- JMX Support for the Tomcat server. Documentation at
 /docs/non-existent.html --
   Listener className=org.apache.catalina.mbeans.ServerLifecycleListener
 /
   Listener
 className=org.apache.catalina.mbeans.GlobalResourcesLifecycleListener /

 Thanks for the fast responses! Hoping to find a resolution to this soon.

 --
 Sean



 On Thu, Sep 23, 2010 at 2:29 PM, Mark Thomas ma...@apache.org wrote:

 On 23/09/2010 11:26, Kishore Kumar Manthangod wrote:
  Looks this is culprit. Either file not found at d:\keystore\.keystore or
  change it to d:/keystore/.keystore (Forward slashing)

 Nope. That is not the problem in this case.

 Mark



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





Automatically Add Session ID

2010-09-23 Thread Jeff Thorn
Hello,
I have a stateless webservice that I am running with Tomcat 6.0. The
product owners want to start tracking user sessions to the webservice
(how many request per session, etc.). Since its been stateless up to
this point, I am not using the HttpSession object at all. Is there any
way I can add a session id automatically just by changing the Tomcat
configuration?

If I can't do it via config, I assume I can do if via code simply by calling:

httpRequest.getSession(true);

with each request. All I really care about is the session ID so we can
log and group requests. I am not going to store any objects in the
session. What kind of overhead is there to doing this? I know it
defeats the purpose of being stateless. But if I don't put anything in
the session will it have a relatively low impact?

Thanks!
Jeff

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



Re: Issues with Memory Leaks on Tomcat 6.0.28

2010-09-23 Thread Kevin Mai
Catalina was misconfigured, as the dev-team placed some properties on a 
/home/blabla path :S

Thanks for helping me out anyway!

- Mensaje original -
De: Mark Eggers its_toas...@yahoo.com
Para: Tomcat Users List users@tomcat.apache.org
Enviados: Jueves, 23 de Septiembre 2010 15:44:21
Asunto: Re: Issues with Memory Leaks on Tomcat 6.0.28

I'll do some of this inline:


 WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context}
 Setting
property 'debug'
  to '0' did not find a matching property.

Two things here:

1. Place your context in a META-INF/context.xml file in your web
application, not in server.xml
2. Remove the debug attribute, since it hasn't been valid for a long
time.

 WARNING: No rules found matching
'Server/Service/Engine/Host/Context/Logger'.


I don't see a reference to a Logger in the Context documentation for
5.5, 6.0,
0r 7.0. If you're trying to log at the Context level, take a look at the
documents for your version of Tomcat (which you've not mentioned) and
add the
appropriate Valve element.

 SEVERE: Error listenerStart

This is the problem (as pointed out before). The code you're using in
your Listener isn't working as expected. I suspect that you're trying to
start up
iBatis (now MyBatis), and that the code is failing.

 SEVERE: The web application [/Simon] created a ThreadLocal with key of
 type [java.lang.ThreadLocal] (value [java.lang.threadlo...@3e0d1329])
 and a value of
type
 [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl] (value
 [com.ibatis.sqlmap.engine.impl.sqlmapsessioni...@4c650892]) but failed
 to
remove it when
 the web application was stopped. This is very likely to create a
 memory leak.

 SEVERE: The web application [/Simon_WEB.war] created a ThreadLocal
 with key of
type
 [java.lang.ThreadLocal] (value [java.lang.threadlo...@23b17d49]) and a
 value of
type
 [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl] (value
 [com.ibatis.sqlmap.engine.impl.sqlmapsessioni...@599855ed]) but failed
 to
remove it when
 the web application was stopped. This is very likely to create a
 memory leak.

This is fallout from your failed listener (as has been pointed out).

When you write a listener class, you have both a
contextInitialized(ServletContextEvent sce) and a
contextDestroyed(ServletContextEvent sce) method.

It looks like your contextInitialized method is failing, and you've not
written a contextDestroyed method. You'll need to fix the first, and
then write the
second so that when the context is destroyed (like undeploying the
application), you shut down all of your resources gracefully.

I've not used iBatis, so I am not aware of how the listener should be
written. I've done this for Hibernate.

I'm also guessing that you're setting up iBatis to control the database
pooling and access. You can let Tomcat manage the connection pool with
iBatis. This may
simplify your listener code somewhat. An iBatis thread concerning that
can be
found here:

http://markmail.org/message/pocthjsiw4cdhohj#query:+page:1+mid:pocthjsiw4cdhohj+state:results


So:

1. Fix your contextInitialized method
2. Write a contextDestroyed method
3. Configure iBatis to use Tomcat's database pooling (which may
eliminate the
need for 2)

. . . . just my two cents.

/mde/





- 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: In org.apache.catalina.connector.Request.doGetSession, java.lang.IllegalStateException: Cannot create a session after the response has been committed

2010-09-23 Thread Brian
Wow. This is what I call Premium Support! I was thinking about writing en
email to you, Mark, since I was studying the Tomcat source code and saw your
name there. But thought it would be too direct to write to you. I'm honored
to receive your response, really  :-)

Thanks for the commited explanation, but I still have a doubt: Where in my
code do I commit? I don't do it explicitly, so it is happening at some point
automatically but I don't know exactly where/when. If a full buffer is not
the cause, what is it for the commit to happen? In which method/class does
it happen?

I will raise the 8K capacity in the buffer, just in case that is the
problem. That would explain why this problem appears to be randomic. If
just some pages are too big, that would make the buffer to be full, and then
everything in the sequence you described would happen.

I don't explicitly disable the session creation in my JSPs, so that is not
the problem. I don't call any flushing method either.

I still have another doubt: According to your sequence, in step 2 my page is
commited (Maybe because of a full buffer, maybe any other reason I don't
imagine). OK. But in step 3 (something goes wrong), I guess you are
talking about these two lines in my log:

at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:791) - This takes care of that
at
org.apache.jsp.WEB_002dINF.pages.ProductsForModel_jsp._jspService(ProductsFo
rModel_jsp.java:1137) Here something goes wrong, and an Exception
is being thrown

It is clear that something goes wrong in my ProductsForModel.jps page
(actually, in the java code generated for it), so an Exception is being
thrown and  PageContextImpl.handlePageException() takes care of it. But
what exception? Is it the  java.lang.IllegalStateException: Cannot create a
session after the response has been committed? Or is it another one? I
guess it is another one, and that the cannot create... exception is being
thrown after that, when executing the service method in the java code that
correspoonds to the JSP error page to which I redirect. But how can I know
what exception raised in my ProductsForModel.jps page? It seems that since
the code in the JSP error page didnt work (because of its own exception), it
didn't do its job: to explain what went wrong in the ProductsForModel.jps
page.

Thanks a lot!



 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Thursday, September 23, 2010 01:11 PM
 To: Tomcat Users List
 Subject: Re: In org.apache.catalina.connector.Request.doGetSession,
 java.lang.IllegalStateException: Cannot create a session after the
response
 has been committed
 
 On 23/09/2010 07:42, Brian wrote:
  What does response has been commited mean? I have a theory: Maybe it
  means that in the java code that the container generated for my JSP,
  at least one out.write() method has already been used, which means
  that It already has started to send html code to the browser. Am I
right?
  Again, this is a sporadic issue, which drives me crazy!
 
 committed means that the HTTP headers have been written to the client
 and no further headers can be sent (note: creating a session requires
sending
 a cookie header to the client - this will be important in a bit). Output
is
 buffered (I think 8k by default - might be 4k) by default so you can still
add
 headers even after some content has been written.
 
 JSPs create sessions by default unless you explicitly disable this.
 
 I suspect the sequence is:
 1. Your page starts processing
 2. The page is committed (either it calls flush or the output fills the
buffer so
 it has to flush) 3. Something goes wrong 4. Redirect to error JSP 5. Error
JSP
 tries to create a session 6. Response has been committed so session can't
be
 created 7. You get the error you are seeing
 
 If step 3 occurs before step 2 then everything will work as the response
won't
 have been committed.
 
 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



Re: Tomcat 6.0.28 w/ VeriSign SSL TLS -- Errors upon startup.

2010-09-23 Thread Mark Thomas
On 23/09/2010 11:48, Sean Killeen wrote:
 Sorry for the additional reply but I found some additional information that
 might be relevant:
 
 We have a tomcat 6.0 installation that is referring to the same keystore
 with the same connector that starts up without error. However, the Tomcat
 6.0.28 instance starts up with error.
 
 I did a diff on the files with Notepad++ and they are pretty much exactly
 the same. I pasted my 6.0 connector to replace 6.0.28 default connectors in
 the server.xml file.
 
 Given this, any idea what my next steps might be?

You might be hitting an old bug. Make sure the native dll is renamed as
well.

Mark



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



Re: In org.apache.catalina.connector.Request.doGetSession, java.lang.IllegalStateException: Cannot create a session after the response has been committed

2010-09-23 Thread Mark Thomas
On 23/09/2010 12:01, Brian wrote:
 Thanks for the commited explanation, but I still have a doubt: Where in my
 code do I commit? I don't do it explicitly, so it is happening at some point
 automatically but I don't know exactly where/when. If a full buffer is not
 the cause, what is it for the commit to happen? In which method/class does
 it happen?

As soon as the buffer is full or you flush the response.

 I will raise the 8K capacity in the buffer, just in case that is the
 problem. That would explain why this problem appears to be randomic. If
 just some pages are too big, that would make the buffer to be full, and then
 everything in the sequence you described would happen.
 
 I don't explicitly disable the session creation in my JSPs, so that is not
 the problem. I don't call any flushing method either.

You need to explicitly disable session generation in your error JSP.
That will ensure the sequence never happens.

 It is clear that something goes wrong in my ProductsForModel.jps page
 (actually, in the java code generated for it), so an Exception is being
 thrown and  PageContextImpl.handlePageException() takes care of it. But
 what exception? Is it the  java.lang.IllegalStateException: Cannot create a
 session after the response has been committed? Or is it another one?

Yep, the broken error JSP is hiding the exception. Another option is to
remove the error handling JSPs.

Mark



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



Re: catalina.log getting bigger causing fillup file system on unix

2010-09-23 Thread André Warnier

Kishore,

if you do not know, then maybe you should not write things that will confuse others even 
more.


Kishore Kumar Manthangod wrote:

Could you check your log4j configured to show class name?


.. not really relevant or useful in this case

Biren,

Mark already gave you the answer, but I'll try again :



On Thu, Sep 23, 2010 at 11:30 AM, Patel, Biren G bpa...@telcordia.comwrote:


Here is the logs from original email:

Sep 16, 2010 12:55:54 PM org.apache.catalina.core.ApplicationContext log



INFO: cgi: runCGI: write(dd  ADD:00  === ** look here **



09/16/2010 10:13:02  0600912345  0505266A9153   9153  add   ADD:00


The above most probably means that Tomcat is running a cgi-bin script, and that it is this 
cgi-bin script (which is not a part of Tomcat) which is writing these lines on its STDOUT.

(for example, if this script is a shell script, it could just be doing echo or 
print)

Whatever is written to STDOUT is then captured by Tomcat's standard logger, and ends up in 
catalina.log.


Find that cgi-bin script, find out why it is writing this, and you will have 
your answer.

Again, as Mark wrote the first time, it is not directly Tomcat code writing these lines. 
It is an external script, part of an application which Tomcat has been asked to run.

The Tomcat logging code is just the intermediate mail-man here.



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



RE: Automatically Add Session ID

2010-09-23 Thread Maximilian Stocker
How are you planning on logging/tracking this information anyway?

My thinking would be to use a filter for all requests. And then you can do what 
you want with the information in the filter. And getSession() is to me clearer.

A couple of other things though.

1) Are you sure you don't have sessions now? I am not asking if you are using 
them but are you sure they don't exist? By default when you have JSPs involved 
at any point you'll have sessions.

2) I'd be mildly concerned with a stateless webservice trying to track usage 
via sessions because one way or another (cookies or URL) sessions *require* 
client co-operation to work and it's possible that you don't have that. I would 
check that assumption before continuing.

-Original Message-
From: Jeff Thorn [mailto:j...@thorntechnologies.com]
Sent: Thursday, September 23, 2010 3:04 PM
To: users@tomcat.apache.org
Subject: Automatically Add Session ID

Hello,
I have a stateless webservice that I am running with Tomcat 6.0. The
product owners want to start tracking user sessions to the webservice
(how many request per session, etc.). Since its been stateless up to
this point, I am not using the HttpSession object at all. Is there any
way I can add a session id automatically just by changing the Tomcat
configuration?

If I can't do it via config, I assume I can do if via code simply by calling:

httpRequest.getSession(true);

with each request. All I really care about is the session ID so we can
log and group requests. I am not going to store any objects in the
session. What kind of overhead is there to doing this? I know it
defeats the purpose of being stateless. But if I don't put anything in
the session will it have a relatively low impact?

Thanks!
Jeff

-
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: In org.apache.catalina.connector.Request.doGetSession, java.lang.IllegalStateException: Cannot create a session after the response has been committed

2010-09-23 Thread Maximilian Stocker
Rather than chasing it at the view end why don't you just call getSession in 
the controller or a filter? Then you have no need of doing anything with any 
buffers  etc.

As to what exception is happening it's the illegal state. Whatever has happened 
up to that point of the processing has flushed the HTTP headers. At that point 
attempting to create a new session is illegal and throws an exception.

-Original Message-
From: Brian [mailto:bbprefix-m...@yahoo.com]
Sent: Thursday, September 23, 2010 3:02 PM
To: 'Tomcat Users List'
Subject: RE: In org.apache.catalina.connector.Request.doGetSession, 
java.lang.IllegalStateException: Cannot create a session after the response has 
been committed

Wow. This is what I call Premium Support! I was thinking about writing en
email to you, Mark, since I was studying the Tomcat source code and saw your
name there. But thought it would be too direct to write to you. I'm honored
to receive your response, really  :-)

Thanks for the commited explanation, but I still have a doubt: Where in my
code do I commit? I don't do it explicitly, so it is happening at some point
automatically but I don't know exactly where/when. If a full buffer is not
the cause, what is it for the commit to happen? In which method/class does
it happen?

I will raise the 8K capacity in the buffer, just in case that is the
problem. That would explain why this problem appears to be randomic. If
just some pages are too big, that would make the buffer to be full, and then
everything in the sequence you described would happen.

I don't explicitly disable the session creation in my JSPs, so that is not
the problem. I don't call any flushing method either.

I still have another doubt: According to your sequence, in step 2 my page is
commited (Maybe because of a full buffer, maybe any other reason I don't
imagine). OK. But in step 3 (something goes wrong), I guess you are
talking about these two lines in my log:

at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:791) - This takes care of that
at
org.apache.jsp.WEB_002dINF.pages.ProductsForModel_jsp._jspService(ProductsFo
rModel_jsp.java:1137) Here something goes wrong, and an Exception
is being thrown

It is clear that something goes wrong in my ProductsForModel.jps page
(actually, in the java code generated for it), so an Exception is being
thrown and  PageContextImpl.handlePageException() takes care of it. But
what exception? Is it the  java.lang.IllegalStateException: Cannot create a
session after the response has been committed? Or is it another one? I
guess it is another one, and that the cannot create... exception is being
thrown after that, when executing the service method in the java code that
correspoonds to the JSP error page to which I redirect. But how can I know
what exception raised in my ProductsForModel.jps page? It seems that since
the code in the JSP error page didnt work (because of its own exception), it
didn't do its job: to explain what went wrong in the ProductsForModel.jps
page.

Thanks a lot!



 -Original Message-
 From: Mark Thomas [mailto:ma...@apache.org]
 Sent: Thursday, September 23, 2010 01:11 PM
 To: Tomcat Users List
 Subject: Re: In org.apache.catalina.connector.Request.doGetSession,
 java.lang.IllegalStateException: Cannot create a session after the
response
 has been committed

 On 23/09/2010 07:42, Brian wrote:
  What does response has been commited mean? I have a theory: Maybe it
  means that in the java code that the container generated for my JSP,
  at least one out.write() method has already been used, which means
  that It already has started to send html code to the browser. Am I
right?
  Again, this is a sporadic issue, which drives me crazy!

 committed means that the HTTP headers have been written to the client
 and no further headers can be sent (note: creating a session requires
sending
 a cookie header to the client - this will be important in a bit). Output
is
 buffered (I think 8k by default - might be 4k) by default so you can still
add
 headers even after some content has been written.

 JSPs create sessions by default unless you explicitly disable this.

 I suspect the sequence is:
 1. Your page starts processing
 2. The page is committed (either it calls flush or the output fills the
buffer so
 it has to flush) 3. Something goes wrong 4. Redirect to error JSP 5. Error
JSP
 tries to create a session 6. Response has been committed so session can't
be
 created 7. You get the error you are seeing

 If step 3 occurs before step 2 then everything will work as the response
won't
 have been committed.

 Mark



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


-
To unsubscribe, e-mail: 

Re: Automatically Add Session ID

2010-09-23 Thread Jeff Thorn
Hi Max. Thanks for your response.

I am sure there are no sessions now. Its a REST based XML API. There
are no views or jsp pages at all. It was designed from scratch to be
stateless. I truly don't even like the idea of adding a session id
either. But that is out of my control. The session id will simply end
up in the access log files so we can group by and count unique
sessions. The clients of the API do support cookies and will return
the session id in subsequent requests.

So my question is what kind of overhead does getSession() have? If its
anything more than just generating an uid and settings a response
header, I will just do that myself. But I would rather not reinvent
the wheel since the session api does exactly what I want.


On Thu, Sep 23, 2010 at 3:59 PM, Maximilian Stocker
m...@talentoyster.com wrote:
 How are you planning on logging/tracking this information anyway?

 My thinking would be to use a filter for all requests. And then you can do 
 what you want with the information in the filter. And getSession() is to me 
 clearer.

 A couple of other things though.

 1) Are you sure you don't have sessions now? I am not asking if you are using 
 them but are you sure they don't exist? By default when you have JSPs 
 involved at any point you'll have sessions.

 2) I'd be mildly concerned with a stateless webservice trying to track 
 usage via sessions because one way or another (cookies or URL) sessions 
 *require* client co-operation to work and it's possible that you don't have 
 that. I would check that assumption before continuing.

 -Original Message-
 From: Jeff Thorn [mailto:j...@thorntechnologies.com]
 Sent: Thursday, September 23, 2010 3:04 PM
 To: users@tomcat.apache.org
 Subject: Automatically Add Session ID

 Hello,
 I have a stateless webservice that I am running with Tomcat 6.0. The
 product owners want to start tracking user sessions to the webservice
 (how many request per session, etc.). Since its been stateless up to
 this point, I am not using the HttpSession object at all. Is there any
 way I can add a session id automatically just by changing the Tomcat
 configuration?

 If I can't do it via config, I assume I can do if via code simply by calling:

 httpRequest.getSession(true);

 with each request. All I really care about is the session ID so we can
 log and group requests. I am not going to store any objects in the
 session. What kind of overhead is there to doing this? I know it
 defeats the purpose of being stateless. But if I don't put anything in
 the session will it have a relatively low impact?

 Thanks!
 Jeff

 -
 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





--

Jeff Thorn
Thorn Technologies, LLC
(443) 255-2803
j...@thorntechnologies.com

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



RE: Automatically Add Session ID

2010-09-23 Thread Maximilian Stocker
Don't reinvent the wheel use sessions. Whatever miniscule overhead there might 
be is worth it. There is the whole timeout aspect and you can add listeners 
(for session events) down the road if you desired all of which you would 
additionally have to recreate.

Plus you can be sure that by now sessions have been pretty thoroughly tested... 
:)

As an aside I am not sure why stateless translated into no views during your 
development process. The XML you are sending is a view. Anyway. Just a comment 
and feel free to ignore.

-Original Message-
From: Jeff Thorn [mailto:j...@thorntechnologies.com]
Sent: Thursday, September 23, 2010 4:13 PM
To: Tomcat Users List
Subject: Re: Automatically Add Session ID

Hi Max. Thanks for your response.

I am sure there are no sessions now. Its a REST based XML API. There
are no views or jsp pages at all. It was designed from scratch to be
stateless. I truly don't even like the idea of adding a session id
either. But that is out of my control. The session id will simply end
up in the access log files so we can group by and count unique
sessions. The clients of the API do support cookies and will return
the session id in subsequent requests.

So my question is what kind of overhead does getSession() have? If its
anything more than just generating an uid and settings a response
header, I will just do that myself. But I would rather not reinvent
the wheel since the session api does exactly what I want.


On Thu, Sep 23, 2010 at 3:59 PM, Maximilian Stocker
m...@talentoyster.com wrote:
 How are you planning on logging/tracking this information anyway?

 My thinking would be to use a filter for all requests. And then you can do 
 what you want with the information in the filter. And getSession() is to me 
 clearer.

 A couple of other things though.

 1) Are you sure you don't have sessions now? I am not asking if you are using 
 them but are you sure they don't exist? By default when you have JSPs 
 involved at any point you'll have sessions.

 2) I'd be mildly concerned with a stateless webservice trying to track 
 usage via sessions because one way or another (cookies or URL) sessions 
 *require* client co-operation to work and it's possible that you don't have 
 that. I would check that assumption before continuing.

 -Original Message-
 From: Jeff Thorn [mailto:j...@thorntechnologies.com]
 Sent: Thursday, September 23, 2010 3:04 PM
 To: users@tomcat.apache.org
 Subject: Automatically Add Session ID

 Hello,
 I have a stateless webservice that I am running with Tomcat 6.0. The
 product owners want to start tracking user sessions to the webservice
 (how many request per session, etc.). Since its been stateless up to
 this point, I am not using the HttpSession object at all. Is there any
 way I can add a session id automatically just by changing the Tomcat
 configuration?

 If I can't do it via config, I assume I can do if via code simply by calling:

 httpRequest.getSession(true);

 with each request. All I really care about is the session ID so we can
 log and group requests. I am not going to store any objects in the
 session. What kind of overhead is there to doing this? I know it
 defeats the purpose of being stateless. But if I don't put anything in
 the session will it have a relatively low impact?

 Thanks!
 Jeff

 -
 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





--

Jeff Thorn
Thorn Technologies, LLC
(443) 255-2803
j...@thorntechnologies.com

-
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



tomcat connection pool - status and future?

2010-09-23 Thread Jason Pringle

I've recently become aware of the new-ish tomcat connection pool 
(http://people.apache.org/~fhanik/jdbc-pool/) which appears to be at version 
1.0.8.5 (a January 2010 release?).

Before I recommend we begin using this in a production situation, I'd like to 
gather a bit of data on it.  As a bit of background, we're migrating off of 
Weblogic server to Tomcat (simplification!), but one of the things we have been 
very happy with in Weblogic is the robust connection pool management.  We have 
some environments in which we use multipools, some where we connect to Oracle 
RAC and some where we use Oracle's Fast Start Failover to transparently (to the 
application) cut over to a standby database at the connection pool level in an 
extremely short amount of time (compared to modifying connection descriptors 
and bouncing a farm of servers).

I started by researching available connection pools for tomcat, and it seems 
most folks either use DBCP (which has a host of issues) or C3PO (which has its 
own issues, including that it is LGPL licensed).  The feature page of the 
tomcat connection pool 
(http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html) seems quite 
promising, but to be honest, it concerns me that the module is only readily 
available from a commiter's pages or from source.


1)  Is the tomcat community committed to this new module?  (We've been 
burned by too many abandoned FOSS projects to discount this issue)

2)  When will it be available as a standard tomcat module?

3)  Is it considered released or still in a beta stage (I found the beta 
announcement from 2008)?

4)  Although I don't see anything like multipools, are there any plans to 
support something like them?  Could they be implemented within the interceptor 
framework?

5)  What are the implications for using with RAC?

6)  What are the implications for using with FSF (Fast Start Failover)?

7)  What are the implications for using within and XA environment (though 
we work hard to avoid XA it's important to know of any limitations etc)?

Thanks!

Jason Pringle




This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,
you may review at http://www.amdocs.com/email_disclaimer.asp

Re: Automatically Add Session ID

2010-09-23 Thread Wesley Acheson
On Thu, Sep 23, 2010 at 10:13 PM, Jeff Thorn j...@thorntechnologies.com wrote:
 Hi Max. Thanks for your response.

 I am sure there are no sessions now. Its a REST based XML API.

What type of client is going to use the REST API? If its not browser
based it may well not accept sessions. Thus you would have several
session id's for the same client.

Also the overhead is low.

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



Re: Automatically Add Session ID

2010-09-23 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jeff,

I've re-arranged some of your comments so that my questions make a bit
more sense.

On 9/23/2010 4:13 PM, Jeff Thorn wrote:
 I am sure there are no sessions now. Its a REST based XML API.

 So my question is what kind of overhead does getSession() have? If its
 anything more than just generating an uid and settings a response
 header, I will just do that myself. But I would rather not reinvent
 the wheel since the session api does exactly what I want.

Is this clustered at all? If you are using a cluster and want your
session ids to be consistent, then there can be some overhead in
notifying the other servers that a new session has been created, etc.
Other than that, creating empty sessions and referencing them with every
request is going to have a pretty minimal impact unless your webapp does
very little with each request (like a web service that adds to numbers
provided by the client). Things like file and database access
overwhelmingly dominate the equation.

 The session id will simply end
 up in the access log files so we can group by and count unique
 sessions.

Session ids don't typically show up in access log files: you'll have to
configure your logging to do this. The AccessLogValve can certainly do
this for you.

 The clients of the API do support cookies and will return
 the session id in subsequent requests.

Perfect: that will pretty much be a requirement, unless the clients are
willing to accept a session id some other way and then add
;jsessionid=[the session id] to the end of every request URL they use.

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

iEYEARECAAYFAkybvN0ACgkQ9CaO5/Lv0PBlJACgoBwpy4KeIop2VI7i+KinvnG9
DBQAoIG8hy9F/1AlQd2z+SVZ6jA3e+XM
=1tse
-END PGP SIGNATURE-

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



Re: Automatically Add Session ID

2010-09-23 Thread Jeff Thorn
Thanks Chis. I'll make sure the AccessLogValve is configured
correctly. Currently the app is not clustered. It it ever becomes
clustered, I will make sure we keep this in mind.


On Thu, Sep 23, 2010 at 4:47 PM, Christopher Schultz
ch...@christopherschultz.net wrote:
 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Jeff,

 I've re-arranged some of your comments so that my questions make a bit
 more sense.

 On 9/23/2010 4:13 PM, Jeff Thorn wrote:
 I am sure there are no sessions now. Its a REST based XML API.

 So my question is what kind of overhead does getSession() have? If its
 anything more than just generating an uid and settings a response
 header, I will just do that myself. But I would rather not reinvent
 the wheel since the session api does exactly what I want.

 Is this clustered at all? If you are using a cluster and want your
 session ids to be consistent, then there can be some overhead in
 notifying the other servers that a new session has been created, etc.
 Other than that, creating empty sessions and referencing them with every
 request is going to have a pretty minimal impact unless your webapp does
 very little with each request (like a web service that adds to numbers
 provided by the client). Things like file and database access
 overwhelmingly dominate the equation.

 The session id will simply end
 up in the access log files so we can group by and count unique
 sessions.

 Session ids don't typically show up in access log files: you'll have to
 configure your logging to do this. The AccessLogValve can certainly do
 this for you.

 The clients of the API do support cookies and will return
 the session id in subsequent requests.

 Perfect: that will pretty much be a requirement, unless the clients are
 willing to accept a session id some other way and then add
 ;jsessionid=[the session id] to the end of every request URL they use.

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

 iEYEARECAAYFAkybvN0ACgkQ9CaO5/Lv0PBlJACgoBwpy4KeIop2VI7i+KinvnG9
 DBQAoIG8hy9F/1AlQd2z+SVZ6jA3e+XM
 =1tse
 -END PGP SIGNATURE-

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





-- 

Jeff Thorn
Thorn Technologies, LLC
(443) 255-2803
j...@thorntechnologies.com

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



Re: tomcat connection pool - status and future?

2010-09-23 Thread Mark Thomas
On 23/09/2010 13:26, Jason Pringle wrote:
 
 I've recently become aware of the new-ish tomcat connection pool 
 (http://people.apache.org/~fhanik/jdbc-pool/) which appears to be at version 
 1.0.8.5 (a January 2010 release?).
 
 Before I recommend we begin using this in a production situation, I'd like to 
 gather a bit of data on it.  As a bit of background, we're migrating off of 
 Weblogic server to Tomcat (simplification!), but one of the things we have 
 been very happy with in Weblogic is the robust connection pool management.  
 We have some environments in which we use multipools, some where we connect 
 to Oracle RAC and some where we use Oracle's Fast Start Failover to 
 transparently (to the application) cut over to a standby database at the 
 connection pool level in an extremely short amount of time (compared to 
 modifying connection descriptors and bouncing a farm of servers).
 
 I started by researching available connection pools for tomcat, and it seems 
 most folks either use DBCP (which has a host of issues) or C3PO (which has 
 its own issues, including that it is LGPL licensed).  The feature page of 
 the tomcat connection pool 
 (http://people.apache.org/~fhanik/jdbc-pool/jdbc-pool.html) seems quite 
 promising, but to be honest, it concerns me that the module is only readily 
 available from a commiter's pages or from source.
 
 
 1)  Is the tomcat community committed to this new module?  (We've been 
 burned by too many abandoned FOSS projects to discount this issue)

Several release attempts have failed due to a lack of interest.

That said, $work is using this as the default pool in a commercial
product based on Tomcat with minimal issues.

 2)  When will it be available as a standard tomcat module?

No idea.

 3)  Is it considered released or still in a beta stage (I found the 
 beta announcement from 2008)?

Unreleased.

 4)  Although I don't see anything like multipools, are there any plans to 
 support something like them?  Could they be implemented within the 
 interceptor framework?

No. Don't know.

 5)  What are the implications for using with RAC?

If you want the features of RAC, you are better off using Oracle's
built-in connection pooling rather than an external solution.

 6)  What are the implications for using with FSF (Fast Start Failover)?

Not supported.

 7)  What are the implications for using within and XA environment (though 
 we work hard to avoid XA it's important to know of any limitations etc)?

It works with XA.

Overall, I'd suggest you take another look at DBCP. The historical
issues with deadlocks have been fixed and syncs reduced to the bare
minimum. jdbc-pool will easily beat it for performance in highly
concurrent apps running on multi-core servers but apart from that, DBCP
and jdbc-pool are pretty comparable and there are a number of areas
where DBCP does a better job of making the pooled connection look like a
normal connection. There are a few places where jdbc-pool requires extra
(user written) interceptors to do this.

The next generation of DBCP will be based on Pool 2.0 which will be
based on the Java 5 concurrency features. Current thinking is to
'borrow' code from jdbc-pool to update Commons Pool but that work has
not been started.

Mark



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



Errors not logging to catalina.out after redeploy

2010-09-23 Thread Roy McMorran
 We are observing an odd behavior after upgrading to 6.0.29.  
Ordinarily if an exception occurs this will be logged to catalina.out.  
When Tomcat is first started (we use jsvc) this is the case as 
expected.  However if the webapp is redeployed (without a restart of 
Tomcat) errors are no longer logged to catalina.out. Restarting will 
return it to the normal behavior (until the next redeploy).


Prior to upgrading we were using 6.0.20 and did not have this issue.  
Running under Solaris 10 with JDK 1.6.0_21.  I'd be happy to provide any 
other information that might be useful.  Any suggestions?  Thanks!


--
Roy McMorran
Systems Administrator
MDI Biological Laboratory
mcmor...@mdibl.org



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



Why an email list, and not a forum?

2010-09-23 Thread Brian
Hi,

 

Just a thought: Why is this support taking place in an email list, instead
aof a web based forum?



Re: Why an email list, and not a forum?

2010-09-23 Thread michel
web based means that people have to keep checking a website, instead of 
having the information sent to them as it happens ... like having pizza home 
delivered.



Michel


- Original Message - 
From: Brian bbprefix-m...@yahoo.com

To: users@tomcat.apache.org
Sent: Thursday, September 23, 2010 8:19 PM
Subject: Why an email list, and not a forum?



Hi,



Just a thought: Why is this support taking place in an email list, instead
aof a web based forum?





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



RE: Why an email list, and not a forum?

2010-09-23 Thread Brian
But what if you just want to receive responses to your question, instead of
receiving all the emails that is being writen?
Mail lists are an old method. Web based forums are more efficient. And even
forums (such are the ones powered by phpBB) are not the latest solution.

 -Original Message-
 From: michel [mailto:compu...@videotron.ca]
 Sent: Thursday, September 23, 2010 07:27 PM
 To: Tomcat Users List
 Subject: Re: Why an email list, and not a forum?
 
 web based means that people have to keep checking a website, instead of
 having the information sent to them as it happens ... like having pizza
home
 delivered.
 
 
 Michel
 
 
 - Original Message -
 From: Brian bbprefix-m...@yahoo.com
 To: users@tomcat.apache.org
 Sent: Thursday, September 23, 2010 8:19 PM
 Subject: Why an email list, and not a forum?
 
 
  Hi,
 
 
 
  Just a thought: Why is this support taking place in an email list,
instead
  aof a web based forum?
 
 
 
 
 -
 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: Why an email list, and not a forum?

2010-09-23 Thread David Fisher
You can use something like gmane.org:

http://dir.gmane.org/gmane.comp.jakarta.tomcat.user


On Sep 23, 2010, at 5:33 PM, Brian wrote:

 But what if you just want to receive responses to your question, instead of
 receiving all the emails that is being writen?
 Mail lists are an old method. Web based forums are more efficient. And even
 forums (such are the ones powered by phpBB) are not the latest solution.
 
 -Original Message-
 From: michel [mailto:compu...@videotron.ca]
 Sent: Thursday, September 23, 2010 07:27 PM
 To: Tomcat Users List
 Subject: Re: Why an email list, and not a forum?
 
 web based means that people have to keep checking a website, instead of
 having the information sent to them as it happens ... like having pizza
 home
 delivered.
 
 
 Michel
 
 
 - Original Message -
 From: Brian bbprefix-m...@yahoo.com
 To: users@tomcat.apache.org
 Sent: Thursday, September 23, 2010 8:19 PM
 Subject: Why an email list, and not a forum?
 
 
 Hi,
 
 
 
 Just a thought: Why is this support taking place in an email list,
 instead
 aof a web based forum?
 
 
 
 
 -
 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: Why an email list, and not a forum?

2010-09-23 Thread Hassan Schroeder
On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com wrote:
 But what if you just want to receive responses to your question, instead of
 receiving all the emails that is being writen?

Or to put it another way -- what if you only want to be a taker, without
any intention of participating in a community of users and giving back
when you can?

I'm sure there's a name for that.

 Mail lists are an old method. Web based forums are more efficient. And even
 forums (such are the ones powered by phpBB) are not the latest solution.

What *is* the latest solution*, then, in your opinion?

-- 
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

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



RE: In org.apache.catalina.connector.Request.doGetSession, java.lang.IllegalStateException: Cannot create a session after the response has been committed

2010-09-23 Thread Brian
 On 23/09/2010 12:01, Brian wrote:
  Thanks for the commited explanation, but I still have a doubt: Where
  in my code do I commit? I don't do it explicitly, so it is happening
  at some point automatically but I don't know exactly where/when. If a
  full buffer is not the cause, what is it for the commit to happen? In
  which method/class does it happen?
 
 As soon as the buffer is full or you flush the response.


OK, thanks. I will increase the buffer to 16k, maybe then to 32K, and so on
until I see that the problem is gone.

 
  I will raise the 8K capacity in the buffer, just in case that is the
  problem. That would explain why this problem appears to be randomic.
  If just some pages are too big, that would make the buffer to be full,
  and then everything in the sequence you described would happen.
 
  I don't explicitly disable the session creation in my JSPs, so that is
  not the problem. I don't call any flushing method either.
 
 You need to explicitly disable session generation in your error JSP.
 That will ensure the sequence never happens.


Now that is an very interesting idea! I didn't think of that (as if I
thought about everything else, he he).
I will add a directive so that error page won't use sessions. Then I will
compare the container-generated java code to the one using sessions, to see
what am I missing. I guess I'm not missing anything, unless I use the
session in my code in that page.


  It is clear that something goes wrong in my ProductsForModel.jps
  page (actually, in the java code generated for it), so an Exception is
  being thrown and  PageContextImpl.handlePageException() takes care
  of it. But what exception? Is it the 
  java.lang.IllegalStateException: Cannot create a session after the
response
 has been committed? Or is it another one?
 
 Yep, the broken error JSP is hiding the exception. Another option is to
remove
 the error handling JSPs.

 
But If I remove the JSP than handles the errors (I mean, if I take out the
directive that declares that page in the other pages), how will I know if
something goes wrong in my pages? Correct me if I'm wrong, but I think that
only the user will see the error in his browser, but the log will not be
populated with the information of what went wrong.




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



Re: Why an email list, and not a forum?

2010-09-23 Thread michel
I like that questions that I never though of asking can arrive in my email 
and I can see some great new-to-me topics and I try to answer when I can 
(not often, but I do try to help because I am so grateful when people help 
me out).





- Original Message - 
From: Hassan Schroeder hassan.schroe...@gmail.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, September 23, 2010 8:39 PM
Subject: Re: Why an email list, and not a forum?



On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com wrote:
But what if you just want to receive responses to your question, instead 
of

receiving all the emails that is being writen?


Or to put it another way -- what if you only want to be a taker, without
any intention of participating in a community of users and giving back
when you can?

I'm sure there's a name for that.

Mail lists are an old method. Web based forums are more efficient. And 
even

forums (such are the ones powered by phpBB) are not the latest solution.


What *is* the latest solution*, then, in your opinion?

--
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
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: Why an email list, and not a forum?

2010-09-23 Thread Brian
Yes, but I still think that forums are better, a more modern way to give and
ask for support.
If I have time to see other people's questions, I can go to the forum and
read the postings (and answer them, if I can), it is very easy. And I also
learn reading other people's questions. I enjoy that.
But when I'm busy in other issues, I don't like when my emails gets full of
entries.
I just think web-based is better than email-based.

 -Original Message-
 From: michel [mailto:compu...@videotron.ca]
 Sent: Thursday, September 23, 2010 07:54 PM
 To: Tomcat Users List
 Subject: Re: Why an email list, and not a forum?
 
 I like that questions that I never though of asking can arrive in my email
and I
 can see some great new-to-me topics and I try to answer when I can (not
 often, but I do try to help because I am so grateful when people help me
out).
 
 
 
 
 - Original Message -
 From: Hassan Schroeder hassan.schroe...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, September 23, 2010 8:39 PM
 Subject: Re: Why an email list, and not a forum?
 
 
  On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com
 wrote:
  But what if you just want to receive responses to your question,
instead
  of
  receiving all the emails that is being writen?
 
  Or to put it another way -- what if you only want to be a taker, without
  any intention of participating in a community of users and giving back
  when you can?
 
  I'm sure there's a name for that.
 
  Mail lists are an old method. Web based forums are more efficient. And
  even
  forums (such are the ones powered by phpBB) are not the latest
solution.
 
  What *is* the latest solution*, then, in your opinion?
 
  --
  Hassan Schroeder  hassan.schroe...@gmail.com
  twitter: @hassan
 
  -
  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: Why an email list, and not a forum?

2010-09-23 Thread Ken Bowen
+1

On Sep 23, 2010, at 8:53 PM, michel wrote:

 I like that questions that I never though of asking can arrive in my email 
 and I can see some great new-to-me topics and I try to answer when I can 
 (not often, but I do try to help because I am so grateful when people help me 
 out).
 
 
 
 
 - Original Message - From: Hassan Schroeder 
 hassan.schroe...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, September 23, 2010 8:39 PM
 Subject: Re: Why an email list, and not a forum?
 
 
 On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com wrote:
 But what if you just want to receive responses to your question, instead of
 receiving all the emails that is being writen?
 
 Or to put it another way -- what if you only want to be a taker, without
 any intention of participating in a community of users and giving back
 when you can?
 
 I'm sure there's a name for that.
 
 Mail lists are an old method. Web based forums are more efficient. And even
 forums (such are the ones powered by phpBB) are not the latest solution.
 
 What *is* the latest solution*, then, in your opinion?
 
 -- 
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan
 
 -
 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: Why an email list, and not a forum?

2010-09-23 Thread Ken Bowen
You haven't responded to Hassan's message:  you're only thinking of yourself,
and you're only planning on consuming, not giving.  The volunteers who 
provide the support on this list certainly don't want to spend lots of extra 
(and
wasted time) dealing with a web forum instead of receiving messages in email.

On Sep 23, 2010, at 9:00 PM, Brian wrote:

 Yes, but I still think that forums are better, a more modern way to give and
 ask for support.
 If I have time to see other people's questions, I can go to the forum and
 read the postings (and answer them, if I can), it is very easy. And I also
 learn reading other people's questions. I enjoy that.
 But when I'm busy in other issues, I don't like when my emails gets full of
 entries.
 I just think web-based is better than email-based.
 
 -Original Message-
 From: michel [mailto:compu...@videotron.ca]
 Sent: Thursday, September 23, 2010 07:54 PM
 To: Tomcat Users List
 Subject: Re: Why an email list, and not a forum?
 
 I like that questions that I never though of asking can arrive in my email
 and I
 can see some great new-to-me topics and I try to answer when I can (not
 often, but I do try to help because I am so grateful when people help me
 out).
 
 
 
 
 - Original Message -
 From: Hassan Schroeder hassan.schroe...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, September 23, 2010 8:39 PM
 Subject: Re: Why an email list, and not a forum?
 
 
 On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com
 wrote:
 But what if you just want to receive responses to your question,
 instead
 of
 receiving all the emails that is being writen?
 
 Or to put it another way -- what if you only want to be a taker, without
 any intention of participating in a community of users and giving back
 when you can?
 
 I'm sure there's a name for that.
 
 Mail lists are an old method. Web based forums are more efficient. And
 even
 forums (such are the ones powered by phpBB) are not the latest
 solution.
 
 What *is* the latest solution*, then, in your opinion?
 
 --
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan
 
 -
 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
 


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



Re: Why an email list, and not a forum?

2010-09-23 Thread michel
Maybe this is a time (good or bad) for me to chip in with my own complaint 
...  to many people are posting questions and make it obvious that they 
couldn't be bothered even doing some basic googling, reading and trying out 
stuff BEFORE asking questions.



Michel




- Original Message - 
From: Ken Bowen kbo...@als.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, September 23, 2010 9:12 PM
Subject: Re: Why an email list, and not a forum?


You haven't responded to Hassan's message:  you're only thinking of 
yourself,

and you're only planning on consuming, not giving.  The volunteers who
provide the support on this list certainly don't want to spend lots of extra 
(and
wasted time) dealing with a web forum instead of receiving messages in 
email.


On Sep 23, 2010, at 9:00 PM, Brian wrote:

Yes, but I still think that forums are better, a more modern way to give 
and

ask for support.
If I have time to see other people's questions, I can go to the forum and
read the postings (and answer them, if I can), it is very easy. And I also
learn reading other people's questions. I enjoy that.
But when I'm busy in other issues, I don't like when my emails gets full 
of

entries.
I just think web-based is better than email-based.


-Original Message-
From: michel [mailto:compu...@videotron.ca]
Sent: Thursday, September 23, 2010 07:54 PM
To: Tomcat Users List
Subject: Re: Why an email list, and not a forum?

I like that questions that I never though of asking can arrive in my 
email

and I

can see some great new-to-me topics and I try to answer when I can (not
often, but I do try to help because I am so grateful when people help me

out).





- Original Message -
From: Hassan Schroeder hassan.schroe...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, September 23, 2010 8:39 PM
Subject: Re: Why an email list, and not a forum?



On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com

wrote:

But what if you just want to receive responses to your question,

instead

of
receiving all the emails that is being writen?


Or to put it another way -- what if you only want to be a taker, without
any intention of participating in a community of users and giving back
when you can?

I'm sure there's a name for that.


Mail lists are an old method. Web based forums are more efficient. And
even
forums (such are the ones powered by phpBB) are not the latest

solution.


What *is* the latest solution*, then, in your opinion?

--
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
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




-
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: Why an email list, and not a forum?

2010-09-23 Thread Ken Bowen
Well, as first posted by Mark:  http://slash7.com/2006/12/22/vampires/

On Sep 23, 2010, at 9:23 PM, michel wrote:

 Maybe this is a time (good or bad) for me to chip in with my own complaint 
 ...  to many people are posting questions and make it obvious that they 
 couldn't be bothered even doing some basic googling, reading and trying out 
 stuff BEFORE asking questions.
 
 
 Michel
 
 
 
 
 - Original Message - From: Ken Bowen kbo...@als.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, September 23, 2010 9:12 PM
 Subject: Re: Why an email list, and not a forum?
 
 
 You haven't responded to Hassan's message:  you're only thinking of yourself,
 and you're only planning on consuming, not giving.  The volunteers who
 provide the support on this list certainly don't want to spend lots of extra 
 (and
 wasted time) dealing with a web forum instead of receiving messages in email.
 
 On Sep 23, 2010, at 9:00 PM, Brian wrote:
 
 Yes, but I still think that forums are better, a more modern way to give and
 ask for support.
 If I have time to see other people's questions, I can go to the forum and
 read the postings (and answer them, if I can), it is very easy. And I also
 learn reading other people's questions. I enjoy that.
 But when I'm busy in other issues, I don't like when my emails gets full of
 entries.
 I just think web-based is better than email-based.
 
 -Original Message-
 From: michel [mailto:compu...@videotron.ca]
 Sent: Thursday, September 23, 2010 07:54 PM
 To: Tomcat Users List
 Subject: Re: Why an email list, and not a forum?
 
 I like that questions that I never though of asking can arrive in my email
 and I
 can see some great new-to-me topics and I try to answer when I can (not
 often, but I do try to help because I am so grateful when people help me
 out).
 
 
 
 
 - Original Message -
 From: Hassan Schroeder hassan.schroe...@gmail.com
 To: Tomcat Users List users@tomcat.apache.org
 Sent: Thursday, September 23, 2010 8:39 PM
 Subject: Re: Why an email list, and not a forum?
 
 
 On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com
 wrote:
 But what if you just want to receive responses to your question,
 instead
 of
 receiving all the emails that is being writen?
 
 Or to put it another way -- what if you only want to be a taker, without
 any intention of participating in a community of users and giving back
 when you can?
 
 I'm sure there's a name for that.
 
 Mail lists are an old method. Web based forums are more efficient. And
 even
 forums (such are the ones powered by phpBB) are not the latest
 solution.
 
 What *is* the latest solution*, then, in your opinion?
 
 --
 Hassan Schroeder  hassan.schroe...@gmail.com
 twitter: @hassan
 
 -
 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
 
 
 
 -
 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: Why an email list, and not a forum?

2010-09-23 Thread michel

Ken,

I'm to lazy to look it up, can you just summarize it for me?   :)







- Original Message - 
From: Ken Bowen kbo...@als.com

To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, September 23, 2010 9:31 PM
Subject: Re: Why an email list, and not a forum?


Well, as first posted by Mark:  http://slash7.com/2006/12/22/vampires/

On Sep 23, 2010, at 9:23 PM, michel wrote:

Maybe this is a time (good or bad) for me to chip in with my own complaint 
...  to many people are posting questions and make it obvious that they 
couldn't be bothered even doing some basic googling, reading and trying 
out stuff BEFORE asking questions.



Michel




- Original Message - From: Ken Bowen kbo...@als.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, September 23, 2010 9:12 PM
Subject: Re: Why an email list, and not a forum?


You haven't responded to Hassan's message:  you're only thinking of 
yourself,

and you're only planning on consuming, not giving.  The volunteers who
provide the support on this list certainly don't want to spend lots of 
extra (and
wasted time) dealing with a web forum instead of receiving messages in 
email.


On Sep 23, 2010, at 9:00 PM, Brian wrote:

Yes, but I still think that forums are better, a more modern way to give 
and

ask for support.
If I have time to see other people's questions, I can go to the forum and
read the postings (and answer them, if I can), it is very easy. And I 
also

learn reading other people's questions. I enjoy that.
But when I'm busy in other issues, I don't like when my emails gets full 
of

entries.
I just think web-based is better than email-based.


-Original Message-
From: michel [mailto:compu...@videotron.ca]
Sent: Thursday, September 23, 2010 07:54 PM
To: Tomcat Users List
Subject: Re: Why an email list, and not a forum?

I like that questions that I never though of asking can arrive in my 
email

and I
can see some great new-to-me topics and I try to answer when I can 
(not

often, but I do try to help because I am so grateful when people help me

out).





- Original Message -
From: Hassan Schroeder hassan.schroe...@gmail.com
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, September 23, 2010 8:39 PM
Subject: Re: Why an email list, and not a forum?



On Thu, Sep 23, 2010 at 5:33 PM, Brian bbprefix-m...@yahoo.com

wrote:

But what if you just want to receive responses to your question,

instead

of
receiving all the emails that is being writen?


Or to put it another way -- what if you only want to be a taker, 
without

any intention of participating in a community of users and giving back
when you can?

I'm sure there's a name for that.


Mail lists are an old method. Web based forums are more efficient. And
even
forums (such are the ones powered by phpBB) are not the latest

solution.


What *is* the latest solution*, then, in your opinion?

--
Hassan Schroeder  hassan.schroe...@gmail.com
twitter: @hassan

-
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




-
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


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



Re: Why an email list, and not a forum?

2010-09-23 Thread Ken Bowen
:-)

On Sep 23, 2010, at 9:39 PM, michel wrote:

 :)


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



RE: Why an email list, and not a forum?

2010-09-23 Thread Caldarale, Charles R
 From: Ken Bowen [mailto:kbo...@als.com] 
 Subject: Re: Why an email list, and not a forum?

 The volunteers who provide the support on this list 
 certainly don't want to spend lots of extra (and
 wasted time) dealing with a web forum instead of
 receiving messages in email.

To use a less modern, and undoubtedly less efficient, means of expression than 
+1: Amen, brother.

 - 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: Errors not logging to catalina.out after redeploy

2010-09-23 Thread Caldarale, Charles R
 From: Roy McMorran [mailto:mcmor...@mdibl.org] 
 Subject: Errors not logging to catalina.out after redeploy

 Ordinarily if an exception occurs this will be logged to catalina.out.  
 When Tomcat is first started (we use jsvc) this is the case as 
 expected.  However if the webapp is redeployed (without a restart of 
 Tomcat) errors are no longer logged to catalina.out. Restarting will 
 return it to the normal behavior (until the next redeploy).

What kind of errors are you referring to?  Do they show up in any of the Tomcat 
logs?

Normally, the only things sent to catalina.out are messages from webapps that 
aren't making use of a proper logging mechanism and use System.out or 
System.err instead.  However, that's a somewhat over-simplified view; 
Konstantin provides, and André amplifies, a more complete description in this 
thread:
http://marc.info/?t=12850841203r=1w=2

Do you have swallowOutput set for the webapp?  Does the webapp have its own 
logging mechanism?  If so, is there some form of console handler configured for 
it?

 - Chuck


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


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



Re: How to reproduce tomcat security vulnerabilities

2010-09-23 Thread viola lu
After debug into tomcat source code, i found that if transfer-encode is set
as 'buffered', tomcat 6.0.26 will report null pointer exception in buffered
filter recycle, but in tomcat 6.0.29 , directly report 501 error. But not
sure attackers how to obtain sensitive information via a crafted header?

On Thu, Sep 23, 2010 at 11:29 AM, viola lu viola...@gmail.com wrote:

 thanks. I tried it on tomcat 6.0.26, and 6.0.29, it worked for the second
 one, i can get correct response headers on tomcat 6.0.26 and tomcat 6.0.29:
 tomcat 6.0.26
 suse10sp268:~ # wget -S -O - --post-data='test send post'
 http://9.125.1.248:8080/BasicAuthor_without_realm/BasicAuthor
 --07:21:33--
 http://9.125.1.248:8080/BasicAuthor_without_realm/BasicAuthor
= `-'
 Connecting to 9.125.1.248:8080... connected.
 HTTP request sent, awaiting response...
   HTTP/1.1 401 Unauthorized
   Server: Apache-Coyote/1.1
   *WWW-Authenticate: Basic realm=9.125.1.248:8080*

 *tomcat 6.0.29:*
 suse10sp268:~ # wget -S -O - --post-data='test send post'
 http://9.125.1.248:8080/BasicAuthor_without_realm/BasicAuthor
 --07:24:02--
 http://9.125.1.248:8080/BasicAuthor_without_realm/BasicAuthor   =
 `-'
 Connecting to 9.125.1.248:8080... connected.
 HTTP request sent, awaiting response...
   HTTP/1.1 401 Unauthorized
   Server: Apache-Coyote/1.1
   *WWW-Authenticate: Basic realm=Authentication required*

  But for the first one, both got the same repsonse: 200 OK as below:
 suse10sp268:~ # wget -S -O - --header='Transfer-Encoding:unsupported'
 --post-data='test send post'
 http://9.125.1.248:8080/SecurityTomcat/SecurityServlet
 --07:12:16--  http://9.125.1.248:8080/SecurityTomcat/SecurityServlet
= `-'
 Connecting to 9.125.1.248:8080... connected.
 HTTP request sent, awaiting response...
   HTTP/1.1 200 OK
   Server: Apache-Coyote/1.1
   Content-Type: text/html
   Content-Length: 61
   Date: Thu, 23 Sep 2010 03:09:09 GMT
   Connection: keep-alive
 Length: 61 [text/html]
  0%
 [
 ] 0 --.--K/s unsupported

 application/x-www-form-urlencoded
 9.125.1.248
 100%[=]
 61--.--K/s

 07:12:16 (7.27 MB/s) - `-' saved [61/61]

 Seems no difference on tomcat 6.0.26 and tomcat 6.0.29, is there something
 wrong?
 Appreciate if you can provide more help!


 On Thu, Sep 23, 2010 at 2:25 AM, Christopher Schultz 
 ch...@christopherschultz.net wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1

 Viola,

 On 9/21/2010 10:13 PM, viola lu wrote:
  Here is my client:

 [snip]

 Note that your client can be replaced by this one-liner:

 $ wget -S -O - --header='Transfer-Encoding: unsupported' \
   --post-data='test send post' \
http://localhost:8080/SecurityTomcat/SecurityServlet

 It also has the added advantages of not stripping newlines from the
 response, and including the response headers in the output.

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

 iEYEARECAAYFAkyaShYACgkQ9CaO5/Lv0PBzFgCeMVSEXNtPhBFe0ae+M3Ip0aOT
 6SgAnAihZq7v3w6icGiPeceYFjnAPN21
 =LoyH
 -END PGP SIGNATURE-

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




 --
 viola




-- 
viola


RE: Tomcat not listening on specified port

2010-09-23 Thread Garg, Saman
We are using tomcat-6.0.24 with jdk1.6.0.17 on RHEL 3 OS. We have a
wrapper script which sets few variables and then call tomcat.start to
start up the instance. In the tomcat log, I do see
org.apache.jk.common.ChannelSocket init not getting loaded on the
start of tomcat.

Thanks

-Original Message-
From: Pid [mailto:p...@pidster.com] 
Sent: Wednesday, September 22, 2010 9:49 PM
To: Tomcat Users List
Subject: Re: Tomcat not listening on specified port

On 22/09/2010 12:55, Garg, Saman wrote:
 Hi All,

Exactly which Tomcat, JVM, OS versions are you using?

 I am having a very strange issue wherein after starting the tomcat 
 instance, it doesn't show any errors and also doesn't listen on port
 (9046)

How are you starting the instance?  Which script are you using?

What happens if you stop, completely clear the log files for that
instance, and start up again?

Which logs do you have?

What is in them?


p

 specified in server.xml as it doesn't list this port on using 
 netstat command. But similar thing is working for other tomcat 
 instance which is running on port 9045 on the same machine. I have 
 verified there is no other service running on port 9046 so this port 
 is ok to use. Could anybody please help?
 
  
 
 Thanks
 
 


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



Re: Why an email list, and not a forum?

2010-09-23 Thread M . H . G . Emmerig

I agree. A forum would be more practical.
It is much easier reading all postings on a topic.
I find myself clearing my tomcat users list inbox every morning, while on
forums I visit I check out the new or updated topics.
The forums these days let you subscribe to topics or complete forums and
send you a notification when a new topic gets started or updated.


regards, Milko


   
 Brian   
 bbprefix-m...@ya 
 hoo.com   To
   users@tomcat.apache.org   
 24-09-2010 02:19   cc
   
   Subject
 Please respond to Why an email list, and not a forum?
   Tomcat Users   
   List   
 us...@tomcat.apa 
 che.org  
   
   




Hi,



Just a thought: Why is this support taking place in an email list, instead
aof a web based forum?




Please consider the environment before printing this email.

De informatie verzonden met dit e-mailbericht is vertrouwelijk en
uitsluitend bestemd voor de geadresseerde. Indien u als niet-geadresseerde
dit bericht ontvangt, wordt u verzocht direct de afzender hierover te
informeren en het bericht te vernietigen. Gebruik van informatie door
onbevoegden, openbaarmaking of vermenigvuldiging  is verboden en kan leiden
tot aansprakelijkheid. De afzender is niet aansprakelijk in geval van
onjuiste overbrenging van het e-mailbericht en/of bij ontijdige ontvangst
daarvan.

The information transmitted is confidential and intended only for the
person or entity to whom or which it is addressed. If you are not the
intended recipient of this communication, please inform us immediately and
destroy this communication. Unauthorised use, disclosure or copying of
information is strictly prohibited and may entail liability. The sender
accepts no liability for improper transmission of this communication nor
for any delay in its receipt.