aspose 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"
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Form based authentication with Struts login form
 
Similar Threads
JDBCUserRealm question
non english characters in login-form
Very strange behaviour with form based login and css file
Verification failed on Username existence check using AJAX
2 questions/problems about Form-based login