HttpSession lose Weblogic

743 views
Skip to first unread message

Maurice

unread,
Jun 24, 2008, 12:51:27 PM6/24/08
to Google Web Toolkit
Hi Everyone,

I have a little problem, i'm starting with GWT, and i have been
reading a lot about handling HttpSession objects and RPC calls, but i
haven't been able to solve this so, a little help pease??.

I have a java class that extends from an HttpServlet, in here I put
some attributes to the session using the
request.getSession().setAttribute ("XX", "XX") method, then i just
redirect to a JSP file with a RequestDispatcher.forwad, this jsp file
is created with only GWT widgets, so far everything its ok, now, I
need to fill one of my GWT widgets with information from the
HttpSession object, so I made a RPC call to another servlet with a
method that calls a getThreadLocalRequest().getSession() method, but
it keeps returning me a new session and if i use a getSession (false),
it returns "null" all the time, so the attributes I set beffore are
not there anymore, any idea of what could be happening??

Thanks a lot ...

meng

unread,
Jun 24, 2008, 10:47:26 PM6/24/08
to Google Web Toolkit
are you setting too many cookies? is your session timeout?

Mauricio Rodríguez

unread,
Jun 25, 2008, 12:02:01 AM6/25/08
to Google-We...@googlegroups.com
Actually I'm not setting any cookies, and yes, my session has a timeout but it's set to 900 seconds in the weblogic.xml file and 15 minutes in the web.xml file, additionally i can get the session parametres in the JSP with a traditional <jsp:useBean> tag, but when I try to get the session in the RemoteServiceServlet there's when I keep loosing the session.

meng

unread,
Jun 25, 2008, 1:42:31 AM6/25/08
to Google Web Toolkit
try to add a HttpSessionListener to see when the sessions are
destroyed and created....

last time my problem was that i set too many (>20) cookies and then
the jsessionid cookie is lost...

On Jun 25, 12:02 pm, "Mauricio Rodríguez" <mrr...@gmail.com> wrote:
> Actually I'm not setting any cookies, and yes, my session has a timeout but
> it's set to 900 seconds in the weblogic.xml file and 15 minutes in the
> web.xml file, additionally i can get the session parametres in the JSP with
> a traditional <jsp:useBean> tag, but when I try to get the session in the
> RemoteServiceServlet there's when I keep loosing the session.
>

meng

unread,
Jun 25, 2008, 1:43:21 AM6/25/08
to Google Web Toolkit
and use firebug to see whether your jsessionid is sent as cookie
together with your rpc request...

On Jun 25, 12:02 pm, "Mauricio Rodríguez" <mrr...@gmail.com> wrote:
> Actually I'm not setting any cookies, and yes, my session has a timeout but
> it's set to 900 seconds in the weblogic.xml file and 15 minutes in the
> web.xml file, additionally i can get the session parametres in the JSP with
> a traditional <jsp:useBean> tag, but when I try to get the session in the
> RemoteServiceServlet there's when I keep loosing the session.
>

Mauricio Rodríguez

unread,
Jun 25, 2008, 3:27:01 PM6/25/08
to Google-We...@googlegroups.com
Ok, I've added the HttpSessionListener, it seems like a session is being created when i first add the attributes in my HttpServlet, then when I make the RPC call to the RemoteServiceServlet a new session is being created again!!!, but the first one was never destroyed, so where is it??, any clue??

Thanks again ...

Skippy

unread,
Jul 9, 2008, 3:38:56 AM7/9/08
to Google Web Toolkit
Hi,

I think I'm seeing the same problem. I'm using WebLogic 10.0 MP1 on
Windows XP and Vista.

When I use:

HttpSession session = request.getSession();

.. I can find my session, but when I use:

HttpSession session = getThreadLocalRequest().getSession();

.. I do not retieve the session I want.

Did you discover a solution to the problem you were having?

Regards,
John
> > > > > Thanks a lot ...- Hide quoted text -
>
> - Show quoted text -

Mauricio Rodríguez

unread,
Jul 21, 2008, 9:47:15 PM7/21/08
to Google-We...@googlegroups.com
Sorry, i haven't, everyone has told me it should work fin but i haven't made it work yet, i keep getting a different HttpSession object, a new one actually, so my parameters are lost every time, i've been trying to make my own session handle methods but that's not quite finished yet, i'll let you know, but if you find an answer please let me know also.

Skippy

unread,
Jul 24, 2008, 5:11:15 AM7/24/08
to Google Web Toolkit
Hi,

Our problem is solved without changing the above code. We found that
by enabling cookies and url-rewriting in our weblogic.xml file (in the
session-descriptor) did the trick.

<cookies-enabled>true</cookies-enabled>
<url-rewriting-enabled>true</url-rewriting-enabled>

Regards,
John
> > > - Show quoted text -- Hide quoted text -

Mauricio Rodríguez

unread,
Jul 26, 2008, 6:24:22 PM7/26/08
to Google-We...@googlegroups.com
Really??, well i'll try it then, thanks a lot ...
Reply all
Reply to author
Forward
0 new messages