I am developing a web application using JSPand Servlets(Container: Tomcat7, Database: Oracle10)
I have developed several web-based applications, such as Profile, Reports, Leads. Then I developed an application A Login. In this application, I save the USERID in Sessionwith a few more session attributes.
After entering the user's system, a menu will be displayed that contains links to other applications, such as links to the ProfileApplication.
So, when I access Sessionafter user login:
- If I try to access a session with the same application (Login), then I will get a session with all the necessary attributes
- But when I try to access the session from other applications, such as
Profiles, then I get the session asnull
code to verify the session (servlet filter in the login web application)
HttpSession session = request.getSession(false);
if(session==null)
{
System.out.println("Session does not exist... Redirected to LOGIN Page.");
response.sendRedirect("/ApplicationName/Login.jsp");
}
I refer to a session in the application Profileto check if the user is registered.
Then I searched, and I found that due to security concerns it was not possible to access from other applications Session. (I also found that this can be done by installing crossContext="true")
Then I found another option, for example, to make EARall applications, and then deploy it, but, unfortunately, it is EARnot supported Tomcat7.
I am new to the web environment, so if anyone has worked on this before, please let me know what options might be?
Thanks in advance
Update1
EAR, WAR, . Tomcat EAR Oracle Glassfish, Enterprise Application Project, 1. Login 2. Profiles, EAR Glassfish,
( Glassfish), , - , , . ( )