• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Getting a handle to Session when wo app deployed on a J2EE container
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Getting a handle to Session when wo app deployed on a J2EE container


  • Subject: Getting a handle to Session when wo app deployed on a J2EE container
  • From: "Alex Finkel" <email@hidden>
  • Date: Thu, 1 May 2008 12:02:16 -0400

Hi there.  Any help would be appreciated.


We are trying to get a handle to the WebObjects Session object from within a direct action. There is an applet that calls a direct action to upload chunks of data along with other parameters including the wosid.

 

We use the following lines of code to get the Session object. Note that strSessionId has the wosid parameter passed from above.

 

Application tApp = (Application)WOApplication.application();

WOContext woContext = new WOContext(null);

Session tSession = (Session)tApp.restoreSessionWithID(strSessionId, woContext);

 

It works well when deployed on monitor but does not work well on a J2EE container. ( tomcat )

 

Please note that we can use the session() method of the WODirectAction to get the handle. This works well but we want to take a generic approach to get Session objects from sessionid string as we may not always need to do this from within a direct action.

 

Stack trace is below:

 

java.lang.NullPointerException
        at com.webobjects.jspservlet.WOServletSessionStore.restoreSessionWithID(WOServletSessionStore.java:43)
        at com.webobjects.appserver.WOSessionStore.checkOutSessionWithID(WOSessionStore.java:198)
        at com.webobjects.appserver.WOApplication.restoreSessionWithID(WOApplication.java:1546)

 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Getting a handle to Session when wo app deployed on a J2EE container
      • From: Guido Neitzer <email@hidden>
  • Prev by Date: NullPropertyException thrown, even though property allows null
  • Next by Date: Re: Getting a handle to Session when wo app deployed on a J2EE container
  • Previous by thread: Re: NullPropertyException thrown, even though property allows null
  • Next by thread: Re: Getting a handle to Session when wo app deployed on a J2EE container
  • Index(es):
    • Date
    • Thread