Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

problem in implementing form based authentication in tomcat,mysql

 
Ranch Hand
Posts: 446
1
Eclipse IDE MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everyone,
I am trying to implement form based authentication using JAAS in mysql and tomcat.
I followed the tutorial here

I have added roles in tomcat-users.xml and also security configuration in web.xml of the project.
the application runs but even if I enter correct user credentials, I am redirected to error page only.
Please help me regarding this, tomcat log doesn't show any error also.

this is the database realm configuration for mysql in server.xml in tomcat




the web.xml security configuration is



I have added the manager role in tomcat-users.xml is as follows




I start the application and visit http://localhost:8080/security-form-based/protected/index.jsp
it correctly redirects me to login page but when I enter username and password, it always redirects me to error page.

what could be the solution for this? I am stuck with this for 2 days now.


in the database,

the role allotted for user 'prasad' is 'manager' and the password is 'kharkar'

I have configured the manager role in tomcat-users.xml



 
Paper jam tastes about as you would expect. Try some on this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic