• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to provide authentication/authorization in a simple JSP site?  RSS feed

 
Vaibhav Sagar
Ranch Hand
Posts: 35
2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am creating a basic 3 page JSP website. I need to have authentication/authorization for these pages(I am considering creating user and user_roles database tables). Will Spring Security be the right approach for this scenario? Or are there any quicker/simpler java solutions that I can use?
I am a bit new to web development and finding the security implementation aspect confusing.

Thanks.
 
Tim Holloway
Bartender
Posts: 18531
61
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The quickest - and most secure - method of providing A&A to a J(2)EE web application is to use the J2EE standard security framework. It's built into virtually all J2EE/JEE web application servers, even the minimalist ones like Tomcat and jetty.

Spring Security would be overkill here. For Tomcat, you'd use the JDBC Realm or one of its derivations.
 
Tim Moores
Saloon Keeper
Posts: 3512
77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Apache Shiro library has JSP tags that help implement the JEE approach Tim mentioned in a richer way - https://shiro.apache.org/web-features.html
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!