开发者

can i post some data to a jsp web form using javascript code?

开发者 https://www.devze.com 2023-03-17 03:33 出处:网络
I have with me javascript code that is able to authenticate users with Windows Live Authentication. After logon, a simple message is displayed to the user.

I have with me javascript code that is able to authenticate users with Windows Live Authentication. After logon, a simple message is displayed to the user.

What I want is that the message is displayed to the user for 10 seconds, and after that the email ID of user plus a flag that indicates successful login, are posted to a jsp page which is opened in the same browser window.开发者_开发技巧.. Can this be done using Javascript or some other way?

If it is not possible to pass these values to a jsp form, alternatively can these values be stored in jsp session variables (so that other JSPs are able to use these values)? Thanks, Arvind.


You can do it by using

location.replace("resultPage.jsp?emailId="+emailID+"success=true");

Now you can access these values using:

request.getParameter("emailId");

request.getParameter("success");

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号