Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form based authentication with Struts login form

 
Phuc Bui
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Phuc Bui
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear,
attribute "id" is not defined in Struts tag
Your code still does not work

Thanks
Phuc Bui
 
Sagar Rohankar
Ranch Hand
Posts: 2906
1
Java Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic