N
Narendra Sisodiya
Hi all,
I have one application which use jsp. It has login page which use
j_security_check for login purpose.
as per my knowledge m j_security_check redirect to all accessed or
called get/post request.
If i open application in two tab in firefox then I will get a ajax
call problem.
Open application in two tabs
tab 1 : logout for one tab. login page will come up.
tab 2 : other tab will still making ajax calls to server.
tab 1 : When I make a login , it now redirect to ajax call because it
is the last accessed request was a ajax request.
I do not want my login to website is redirected to ajax call pages
which are notinh but some xml datas. How can i do this??
the temoporary solution for this is to make a ajax call to desired
page while login
Ex
+ function ajaxCalltoWelcomePage(){
+ var xmlhttp=null;
+ if (window.XMLHttpRequest){// code for all new browsers
+ xmlhttp=new XMLHttpRequest();
+ }
+ else if (window.ActiveXObject){// code for IE5 and IE6
+ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
+ }
+
+ if (xmlhttp!=null){
+ xmlhttp.open("GET","welcome.jsp",true);
+ xmlhttp.send(null);
+ }else{
+ alert("Your browser does not support XMLHTTP.");
+ }//ifelse
+ }//function
+</script>
+ <form name="Login" action="j_security_check"
onSubmit="ajaxCalltoWelcomePage()" method=post>
I have one application which use jsp. It has login page which use
j_security_check for login purpose.
as per my knowledge m j_security_check redirect to all accessed or
called get/post request.
If i open application in two tab in firefox then I will get a ajax
call problem.
Open application in two tabs
tab 1 : logout for one tab. login page will come up.
tab 2 : other tab will still making ajax calls to server.
tab 1 : When I make a login , it now redirect to ajax call because it
is the last accessed request was a ajax request.
I do not want my login to website is redirected to ajax call pages
which are notinh but some xml datas. How can i do this??
the temoporary solution for this is to make a ajax call to desired
page while login
Ex
+ function ajaxCalltoWelcomePage(){
+ var xmlhttp=null;
+ if (window.XMLHttpRequest){// code for all new browsers
+ xmlhttp=new XMLHttpRequest();
+ }
+ else if (window.ActiveXObject){// code for IE5 and IE6
+ xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
+ }
+
+ if (xmlhttp!=null){
+ xmlhttp.open("GET","welcome.jsp",true);
+ xmlhttp.send(null);
+ }else{
+ alert("Your browser does not support XMLHTTP.");
+ }//ifelse
+ }//function
+</script>
+ <form name="Login" action="j_security_check"
onSubmit="ajaxCalltoWelcomePage()" method=post>