j_security_check and Ajax call
- From: Narendra Sisodiya <narendra.sisodiya@xxxxxxxxx>
- Date: Tue, 4 Aug 2009 00:14:16 -0700 (PDT)
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>
.
- Prev by Date: Re: tomcat lib folder and subfolders
- Next by Date: Re: different try-finally approach
- Previous by thread: Re: tomcat lib folder and subfolders
- Next by thread: ◎◎◎ Online NIKE SHOX Store ==www.guomeitrade.com== Nike Shox OZ,Shox R3+R4,Shox R4 2era,Shox RZ,Shox R2 net,Shox R3,Shox R4,Shox R4 3era,Shox Rift,Shox R5,Shox TL1,Shox TL3,Shox TZ,Shox Reverie,*** Free Shipping
- Index(es):