Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed (Author was flagged for spam)

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

8
[JSP] When to use session.setAttribute rather than "?parameter=value"
Author Summary
Slyvr89 is in JSP
Post Body

I'm getting back into JSP again but I forget how I handled this before. For things like login information that you want each page on a website to remember, you don't want to just store some userId in the URL ("index.jsp?userId=12345"), otherwise you could type in random numbers and be logged in as someone else. I think I used session.setAttribute before, but I don't remember how I used it.

I don't know how to do a hyperlink to set it though. Last time, I remember sending it to a Servlet and somehow the servlet did setAttribute and then a redirect back to index.jsp or something. Anyone have insight into how it's done?

Author
Account Strength
0%
Account Age
14 years
Verified Email
Yes
Verified Flair
No
Total Karma
14,598
Link Karma
5,756
Comment Karma
8,842
Profile updated: 8 months ago
Posts updated: 1 year ago

Subreddit

Post Details

Location
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
12 years ago