Exploded war folder becomes corrupt

2008-11-07 Thread Kenneth Westelinck
Dear list,

I have an application (ApplicationA) running on Tomcat 6.0.16. Occasionally,
when Tomcat is restarted, the contents of the folder where the exploded war
resides becomes corrupt. I.e. jars that can be found underneath
tomcat/webapps/ProjectA/WEB-INF/lib are removed, resulting in numerous
ClassNotFoundExceptions.
Deleting the exploded war folder and restarting Tomcat resolves this issue
... but this is not an ideal situation of course. This error ocurs on my
client's machine. I was not able to reproduce this on our local development
machine. The client's machine is running Windows XP, SP3, no virusscanner.
Is there anyone else on the list that has seen this behaviour?

Many thanks in advance.


regards,

Kenneth


Re: Session timeout problem in tomcat

2008-10-31 Thread Kenneth Westelinck
I have noticed that tomcat does not honor the session timeout of your
webapp. It does, however, honor the timeout in tomcathome/conf/web.xml. I
have seen this behaviour in Tomcat 6.0.16. I am not sure if newer versions
honor the settings of the webapp's web.xml.

On Fri, Oct 31, 2008 at 8:38 AM, Thangavel Sankaranarayanan 
[EMAIL PROTECTED] wrote:


 Hi All,

 I need the sessiontimeout for 5 hours. I already set in by
 webapps/myapp/web.xml file as

 session-config session-timeout300/session-timeout /session-config

 in tomcathome/conf/web.xml i can find the below config
 session-config session-timeout30/session-timeout /session-config

 Eventhough i have set  session timeout of 300 minutes ,session is expiring
 after 30 mins(the default sessiontimeout for tomcat)

 Please, let me know how i could achieve 5 hours for my sessiontimeout. I'll
 will be thankful to them who responds me quickly as this is too urgent.

 is the session-timeout value which we set is the inactive interval time in
 minutes??

 Regards,
 Thangavel Sankaranarayanan


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




Re: Need help with authentication

2007-04-05 Thread Kenneth Westelinck

Yes! It is working!
Thank you all for your help. Sorry for being such a nag.


Re: Need help with authentication

2007-04-04 Thread Kenneth Westelinck

Ok, here is some headers I found with fiddler:

From firefox:


- Request 1:
GET /eai-admin/ HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3)
Gecko/20070309 Firefox/2.0.0.3
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Cookie: JSESSIONID=8BE2C3B8AD18A29D2229F467A9391307
If-Modified-Since: Fri, 23 Feb 2007 15:40:10 GMT
If-None-Match: W/1827-1172245210656
- Reply 1:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 602
Date: Wed, 04 Apr 2007 07:27:13 GMT

html
head
titleLogin Page for Examples/title
body bgcolor=white
form method=POST action='j_security_check' 
 table border=0 cellspacing=5
   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
/body
/html
Reply 1 is normal, this is my login page.

- Then I submit the login, Request 2:
POST /eai-admin/j_security_check HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3)
Gecko/20070309 Firefox/2.0.0.3
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://localhost:8080/eai-admin/
Cookie: JSESSIONID=8BE2C3B8AD18A29D2229F467A9391307
Content-Type: application/x-www-form-urlencoded
Content-Length: 30

j_username=timj_password=test
- Reply 2
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://localhost:8080/eai-admin/
Content-Length: 0
Date: Wed, 04 Apr 2007 07:27:17 GMT

- So I get redirected:
GET /eai-admin/ HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3)
Gecko/20070309 Firefox/2.0.0.3
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9
,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Proxy-Connection: keep-alive
Referer: http://localhost:8080/eai-admin/
Cookie: JSESSIONID=8BE2C3B8AD18A29D2229F467A9391307
- Reply 3:
HTTP/1.1 304 Not Modified
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
Date: Wed, 04 Apr 2007 07:27:17 GMT

For IE I can see the following:
- Request 1:
GET /eai-admin/ HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Accept-Language: nl-be
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
2.0.50727; .NET CLR 1.1.4322)
Host: localhost:8080
Proxy-Connection: Keep-Alive
- Reply 1:
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Pragma: No-cache
Cache-Control: no-cache
Expires: Thu, 01 Jan 1970 01:00:00 CET
Set-Cookie: JSESSIONID=619A92CCA43BBE0FB205AA7455360214; Path=/
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 646
Date: Wed, 04 Apr 2007 07:30:35 GMT

html
head
titleLogin Page for Examples/title
body bgcolor=white
form method=POST
action='j_security_check;jsessionid=619A92CCA43BBE0FB205AA7455360214' 
 table border=0 cellspacing=5
   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
/body
/html

- Request 2:
POST /eai-admin/j_security_check;jsessionid=619A92CCA43BBE0FB205AA7455360214
HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg,
application/x-shockwave-flash, application/vnd.ms-excel,
application/vnd.ms-powerpoint, application/msword, */*
Referer: http://localhost:8080/eai-admin/
Accept-Language: nl-be
Content-Type: application/x-www-form-urlencoded
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR
2.0.50727; .NET CLR 1.1.4322)
Host: localhost:8080
Content-Length: 30
Proxy-Connection: Keep-Alive
Pragma: no-cache
Cookie: JSESSIONID=619A92CCA43BBE0FB205AA7455360214

j_username=timj_password=test
- Reply 2:
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
Location: http://localhost:8080/eai-admin/
Content-Length: 0
Date: 

Re: Need help with authentication

2007-04-04 Thread Kenneth Westelinck

Hi again,

I did some further researching. I found this on the 304 returned by Tomcat
when using firefox:
-8---8---8---8---8---8---8---8---8---8---8---8---8---8---8--
You should never see this error in your Web browser. It should simply
present the Web page from its cache - because it believes the page has not
changed since it was last cached. If your client is not a Web browser, then
it should equally be able to present the page from a cache. If unable to do
so, it is not using the If_Modified_Since or related headers correctly.
-8---8---8---8---8---8---8---8---8---8---8---8---8---8---8--

When I disable caching in firefox, authentication works as it should and I
get redirected as I should. So who's the culprit here. Firefox or Tomcat?

Sorry, I'm a bit puzzled :(


Re: Need help with authentication

2007-04-03 Thread Kenneth Westelinck

Any ideas why I only get redirected in firefox after doing a refresh and why
this is working as it should in internet explorer?


Need help with authentication

2007-03-30 Thread Kenneth Westelinck

Hi all,

I have the following setup:
- Tomcat 5.5 install on win32, webapps reside underneath webapps/ROOT.
http://localhost/ shows me index.jsp
- Next I have enabled JDBC realm authentication
(webapps/ROOT/WEB-INF/web.xml).
   security-constraint
   web-resource-collection
   web-resource-name//web-resource-name
   descriptionpages which require login/description
   url-pattern/*/url-pattern
   http-methodDELETE/http-method
   http-methodGET/http-method
   http-methodPOST/http-method
   http-methodPUT/http-method
   /web-resource-collection
   auth-constraint
   descriptionMust authenticate before querying the
system/description
   role-namerole1/role-name
   /auth-constraint
   user-data-constraint
   transport-guaranteeNONE/transport-guarantee
   /user-data-constraint
   /security-constraint

   login-config
   auth-methodFORM/auth-method
   realm-namejdbc/AuthDB/realm-name
   form-login-config
   form-login-page/login.jsp/form-login-page
   form-error-page/error.jsp/form-error-page
   /form-login-config
   /login-config

   security-role
   descriptionAny user of the system/description
   role-namerole1/role-name
   /security-role
- I am using a form to login. Here's the code for login.jsp:
html
head
titleLogin Page for Examples/title
body bgcolor=white
form method=POST action='%= response.encodeURL(j_security_check) %' 
 table border=0 cellspacing=5
   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
/body
/html

This works like a charm. Well, almost ;)
If I'm using firefox (1.5 or 2.0.0.x) and login to http://localhost/ using
user X's credentials. I get access to the page http://localhost/index.jsp.
Which is good. If I use user Y's credentials then I get redirected to
favicon.ico (wtf?). If I use internet explorer, the user is always
redirected to index.jsp.
I have absolutely no idea why this is happening, so if someone can shed a
light on this or give me some hints, this would very much be appreciated.
Thanks!


Re: Need help with authentication

2007-03-30 Thread Kenneth Westelinck

Ok, thanks all for your replies.
Another problem is the following:
- I logon to http://localhost/somewhere using X's credentials. Logon
succeeds and I get redirected to http://localhost/somewhere/index.html
- I logon to http://localhost/somewhere using Y's credentials. I get the
login page again. I click refresh and now I get redirected to
http://localhost/somewhere/index.html

In internet explorer, again, no problems.


Re: Need help with authentication

2007-03-30 Thread Kenneth Westelinck

So, I upgraded to Tomcat 5.5.23 (I was running 5.5.15). Now at least the
problem is consistent. For all users I get the login page again. If I
refresh, I get redirected to http://localhost/somewhere/index.html.

On 3/30/07, Kenneth Westelinck [EMAIL PROTECTED] wrote:


Ok, thanks all for your replies.
Another problem is the following:
- I logon to http://localhost/somewhere using X's credentials. Logon
succeeds and I get redirected to http://localhost/somewhere/index.html
- I logon to http://localhost/somewhere using Y's credentials. I get the
login page again. I click refresh and now I get redirected to
http://localhost/somewhere/index.html

In internet explorer, again, no problems.