• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FORM type security implementation problem?

 
Ranch Hand
Posts: 257
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I tried to implement FORM security according to the Hanumanth Deshmuck book.
in web.xml I made entries like below

<login-config>
<auth-method>FORM</auth-method>
<form-login-config>
<form-login-page>/jsp/formlogin.html</form-login-page>
<form-error-page>/jsp/formerror.html</form-error-page>
</form-login-config>
</login-config>


formlogin.html is

html>
<body>
<h4> please login: </h4>
<form method="POST" action="j_security_check">
<input type="text" name="j_username">
<input type="password" name="j_password">
<input type="submit" value="OK">
</form>
</body>
</html>

I also created a simple form-error-page html.

Now when I executed http://localhost:8080/myapp/
HTTP status 500 - java.lang.ClassNotFoundException: org.apache.jsp.index_jsp
error occurred.

According to my idea http://localhost:8080/myapp/ has to take me to formlogin.html and after pressing submit button servlet container has to validate and has to give proper message. is it not the functionality.


I kept formlogin.html in <welcome-page-list> then execution of http://localhost:8080/myapp/ shown the html form after pressing submit button then it gave 404 error like resource not found "/myapp/j_security_check"


Thanks in advance
Lena.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic