I'm new to Java programming and I'm trying to develop a web app with Struts2, JSP and jQuery with manual JDBC connection to PLSQL with JNDI implementation method.
I'm trying to understand how to implement session management in Struts 2. I saw a few examples where the action class implements the SessionAware interceptor like this and another example where the ServletRequestAware interceptor is implemented.
Can someone explain to me which method to use. What is the difference between the two, which would you use and why? My requirement is pretty simple. I have a web app that is completely login based. As in only the login page is public and rest all is under user authentication. There are 2 user roles - Admin and General. Based on the login role they are either directed to page 1,2 that is Admin only or pages 3,4 which is general only. How do I implement this using session management concepts in Struts2?
Thanks!