Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form Authentication of web.xml

 
PrachiS Shah
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I am using form authentication of web.xml...Then there is this issue that I am facing...
I have return the code as follows :

<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/loginpage.jsp</form-login-page>
<form-error-page>/loginpage.jsp?failed=true</form-error-page>
</form-login-config>

Now what happens is that when I refresh the page without filling in any details then also the page gets submitted and the errorMsg starts getting displayed. i.e. the form-error-page gets executed and the error message starts getting displayed. Any idea what is going wrong here?
 
Madhan Sundararajan Devaki
Ranch Hand
Posts: 312
Java MS IE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nothing' wrong here. I believe your validator validates the values present in the form and adds the error messages, hence, you are seeing the error messages.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic