tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: How do you use j_security within in a servlet?
Date Mon, 29 Apr 2002 15:57:35 GMT

On Mon, 29 Apr 2002, Hillel Bilman wrote:

> Date: Mon, 29 Apr 2002 01:27:28 +0200
> From: Hillel Bilman <>
> Reply-To: Tomcat Users List <>
> To:
> Subject: How do you use j_security within in a servlet?
> Dear Tomcat Guru's
> All the references on j-security_check I can find is from the Servlet 2.3
> Specification and here is all I found:
> <form method=”POST” action=”j_security_check”>
> <input type=”text” name=”j_username”>
> <input type=”password” name=”j_password”>
> </form>
> How do you use j_security in a servlet?

You don't.

> The user enters in a form his/her username and password, and then posts the
> response to a servlet. The servlet then passes the user's username and
> password internally to j_security_check and get's back if the authentication
> is correct.
> If the authentication is correct the servlet sends the user to the next page
> and if not the user is sent to an error page.
> How do you pass the username and password to j_security_check within a
> servlet?

There is currently no portable API that supports programmatic login to the
container-managed security facilities of Tomcat, or any other container.
You might be able to stumble upon something that will work in some
containers (although I don't think you are likely to have any success at
all with Tomcat 4's implementation), but it would be decidedly unportable.

> Thanks for any help
> Hillel

Craig McClanahan

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message