• Post Reply Bookmark Topic Watch Topic
  • New Topic

passing data from JSP to html page  RSS feed

 
Rajeshwari Ramamurthi
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a JSP page that gets user login details and validate. If successful redirects to a html page using "response.sendRedirect". I want to set up a cookie(to check if user logged in) that can be read be following html pages using javascript. Or how can I post the user name to next html page
Thanks
Raji
 
Brian Glodde
Ranch Hand
Posts: 171
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since it's a redirect, you can append to the querystring:

Exposing user information appended to a querystring is not a very *secure* solution, but I suppose it would do the trick to solve your problem directly.
You can then access this information with JavaScript:

location.search gives you everything from the "?"
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!