hi,
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
password
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

Amila.

Reply via email to