Session handling in VisionX Webapp
5 posts
• Page 1 of 1
Session handling in VisionX Webapp
Hi I wanted to save some attribute in session and then i am redirecting to google for authorization(https://www.googleapis.com/oauth2/v1/userinfo). Later from saved attribute i want to perform some more task.
- Code: Select all
HttpContext hctxt = HttpContext.getCurrentInstance();
Object request = hctxt.getRequest();
//final GoogleAuthHelper helper = new GoogleAuthHelper();
if(((ServletRequest) request).getParameter("code") != null && ((ServletRequest) request).getParameter("state") != null)
{
if (request instanceof HttpServletRequest)
{
tmp = ((HttpServletRequest)request).getHeader("User-Agent");
tmpsession = ((HttpServletRequest)request).getSession().getId();
System.out.println(tmp + "/br " + tmpsession);
//helper.getUserInfoJson(tmpsession);
}
}
- loknath
- Posts: 5
- Joined: Tue Jul 23, 2019 10:31 am
Re: Session handling in VisionX Webapp
Simply put your properties into the launcher. Set preserve on refresh enabled.The application is saved in the http session and your properties are available in your application.
-
Support@SIB - Posts: 353
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Session handling in VisionX Webapp
Do we have any sample tutorials or code to do same. I am new to VisionX
- loknath
- Posts: 5
- Joined: Tue Jul 23, 2019 10:31 am
Re: Session handling in VisionX Webapp
The preserveOnRefresh is documented here.
With VisionX, use the Web application settings wizard to set this feature.
With VisionX, use the Web application settings wizard to set this feature.
-
Support@SIB - Posts: 353
- Joined: Mon Sep 28, 2009 1:56 pm
Re: Session handling in VisionX Webapp
To put custom properties, use following documentation.
-
Support@SIB - Posts: 353
- Joined: Mon Sep 28, 2009 1:56 pm
5 posts
• Page 1 of 1