File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Form based authentication with Struts login form Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Form based authentication with Struts login form" Watch "Form based authentication with Struts login form" New topic
Author

Form based authentication with Struts login form

Phuc Bui
Greenhorn

Joined: Feb 19, 2009
Posts: 26
Dear all,
I config in web.xml security constraints to protect my pages, and I choose <auth-method> is FORM
With jsp/servlet application, login page like that

But with jsp/struts application, what shoud I do ?

Above code does not work.

Thanks
Phuc Bui
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Struts tags, at translation time, get resolved into simple HTML, so there is NO big difference in using struts tag in JSP as compered to JSP standard tags. So to make this form using struts, I do this




Look there is just a change of tags & attributes, everything else is same.


[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
Phuc Bui
Greenhorn

Joined: Feb 19, 2009
Posts: 26
Dear,
attribute "id" is not defined in Struts tag
Your code still does not work

Thanks
Phuc Bui
Sagar Rohankar
Ranch Hand

Joined: Feb 19, 2008
Posts: 2902
    
    1

Phuc Bui wrote:
attribute "id" is not defined in Struts tag
Your code still does not work

You find out, which attribute in html:form is rendered as "id"
 
jQuery in Action, 2nd edition
 
subject: Form based authentication with Struts login form