I want to do the following but I do not know how to do it.
I have a development system, where on one page I place an iframe and within that iframe I call another test system to communicate.
When I call a specific menu of the development system, it calls the test system and shows it in the Iframe.
My intention is that at the moment that the session of the internal test system expires, send a parameter for outside, to the system of development, so that it also desloguee.
The test system, which is inside the iframe, each time you execute an action goes through this method to see if the session fell, giving RC = -1 to drop the session and RC = 0 to continue normal use .
private int executeCheckLogin(HttpServletRequest request, String botton) {
int RC;
// System.out.println("*** executeCheckLogin ***");
HttpSession sesion = request.getSession();
if( sesion.getAttribute(ConstantsWeb.USER_ROLES) == null ){
Log4j.out(request,"[SESSION INVALIDA] "+botton );
RC = -1;
}else
RC = 0;
return RC;
}
The idea is that when giving RC = -1, send some parameter to the outside, so that development detects the parameter and its typical Logout button is pressed and the system leaves in general, but as that method is in Java and I can not send a href with the system path to bounce it, I can not think of it as.
Originally from the development system to launch the test within the iframe, I simply invoke it with a href, since it is a JSP file that uses HTML and JS.
<TD width="126"><a href="http://test.dominio:8080/WEB/PaginaPrueba.do?Parametro = 1" target="body">TEST</a></TD>
Even in this way I am able to log in to the test system by sending user and password parameters from development and invoking $ (# login) .click () in test to self-submit and enter .
On the other hand, it is impossible for me to do the same since it is JAVA and does not allow Href.
How can I do what I need? Any ideas?? Thank you very much!