Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Servlet Session in RAP
Servlet Session in RAP [message #1710058] Sat, 03 October 2015 09:31 Go to next message
Eclipse UserFriend
Hello,

I am adding an attribute in a servlet session using following code
protected void doPost(HttpServletRequest req, HttpServletResponse resp)
			throws ServletException, IOException {
req.getSession().setAttribute("USER",userObject);
}


and i am trying to access in in RAP ApplicationWorkbenchWindowAdvisor class postWindowOpen method like following

RWT.getRequest().getSession().getAttribute(USER)


above scenario is not working after i migrate to RAP version 3.0. in RAP 2.0 it was working fine.
Re: Servlet Session in RAP [message #1710586 is a reply to message #1710058] Wed, 07 October 2015 14:08 Go to previous messageGo to next message
Eclipse UserFriend
waiting for the kind reply
Re: Servlet Session in RAP [message #1710640 is a reply to message #1710586] Thu, 08 October 2015 03:22 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
is the HTTP session the same in both places?
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Servlet Session in RAP [message #1712146 is a reply to message #1710058] Wed, 21 October 2015 10:04 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I have the same problem. In our app we authenticate the user with the help of Spring's security framework. On first access the user is redirected a login page, and after successful authentication the valid security details are written into the session. After this the user is redirected to the RAP application, and the valid security is read from the session and stored in RAP UI display thread as a ThreadLocal. This worked fine with previous versions, but in the 3.0 version doesn't work anymore. The reason is what Arif said, that the login request and the rap ui have the same session, but different servletcontext, so the security details attribute is not accessible. Although OSGI http registry enables to register resources and servlets with a predefined httpcontext, but it doesn't work either because the RWTServlet's httpcontext isn't accessible. (As I see it is created in ApplicationReferenceImpl as a wrapped httpcontext.)
It seems to me that currently there is no way to share session attributes between the RWT app and other servlets (including those which are created through the http registry extension). Is there any plan to change this behaviour?

Regards,
Ivan Nemeth


[Updated on: Wed, 21 October 2015 10:44] by Moderator

Re: Servlet Session in RAP [message #1712149 is a reply to message #1712146] Wed, 21 October 2015 10:32 Go to previous messageGo to next message
Eclipse UserFriend
Hi,
please file a bugzilla with a simple test project to reproduce it and we
will look on it asap.
Regards,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: Servlet Session in RAP [message #1712166 is a reply to message #1712149] Wed, 21 October 2015 12:28 Go to previous message
Eclipse UserFriend
Hi Ivan,

created a bug report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=480326

Thanks,
Ivan Nemeth
Previous Topic:Hover and MouseListener on Composite with children
Next Topic:titilearediallog
Goto Forum:
  


Current Time: Sat Jul 05 01:50:23 EDT 2025

Powered by FUDForum. Page generated in 0.04076 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top