Search code examples
javascriptjspwindows-live-id

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


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.


Solution

  • 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");