On Friday 04 April 2003 08:57 am, Ionel Gardais wrote:

> But, (there is always a "but"), how to proceed if I want this
> authentication not to be done by a popup but by an html (or jsp)
> page with input text tags for username and password ?

Well, this isn't much different, but requires an additional .JSP and a 
small change to your web.xml:

In web.xml you'll want to do something like the following:

<login-config>
  <auth-method>FORM</auth-method>
  <realm-name>YourRealm</realm-name>
  <form-login-config>
     <form-login-page>/pages/login.jsp</form-login-page>
     <form-error-page>/pages/loginError.jsp</form-error-page>
  </form-login-config>
</login-config>

Now, in your login.jsp you'll need something very much like the 
following HTML form:

<form method="post" action="j_security_check">
  Username: <input type="text" name="j_username"><br>
  Password: <input type="password" name="j_password"><br>
<input type="submit" value="Login"> <input type="reset" 
value="Reset"><br>
</form>

And so, when the thing is posted, the built-in j_security_check action 
will take care of reading out the j_username and j_password and 
getting the JAAS login module involved in the authentication process.

If basic auth is working, these changes should be pretty easy to add 
and try out.

Good luck.

-Neal



-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to