Jump to content

Remembering session info between pages


gushie

Recommended Posts

I have a requirement to build some custom JSP pages for report parameter screens. Some of the information required to build these screens comes from a third party system and the credentials for this are supplied as part of a single sign on.

 

I've tried setting the request session attributes from within the authentication filter class and then retrieving it later in the parameter JSP pages using the request.getSession().getAttribute(...) method. However this always returns null which leads me to believe the session state is getting lost somewhere. (The session attributes are getting stored initially, since they contain the relevant value when decorators/main.jsp loads).

 

I'm fairly new to JSP so apologies if there is a fundamental error I'm overlooking. Can anyone offer any suggestions on how not to lose this session info, or another method of storing it.

 

Thanks.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

gushie

 

Another way to do so is to create a hidden <div> and put the value in it. Whenever you submit a form or clicking a hyperlink, use the document.getElementById('id') to get the value and pass along.

 

If you are using webflow, you can also try to put the value in the flowScope in your Java action class.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...