tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Amila Suriarachchi" <>
Subject Re: using httpclient to login into tomcat with authenication
Date Wed, 21 Jun 2006 05:28:19 GMT
first think what happend in formbased authentication
1. first user sends a request to a restricted resource
2. server sends the loging page to broser
3. then user submits a request to j_security_check with user name and
4. sever sends the initialy requested page to user.

so u have to do the same steps from your program
1. send a request to a restricted resource (eg. use GetMethod)
2. read the response ( this is actually not necessary but u can veryfy u
have got login page)
3. send the j_username and j_password to  j_security_check (Make sure u set
the session ID as a cookie if
u use a different connection)
4. u should receive originally requested page.

but I belive this belongs to user list


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message