DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2006

    Applet -> Servlet Communication Losing Session ID Crossing Firewall

    Hi All,

    I'm baffled, somewhat new to Applet/Servlet work, and in need of some assistance.

    My app has an applet front end and a servlet back end. The user first contacts the servlet, which writes an HTTP response back as an APPLET tag, passing the JSESSIONID as a PARAM tag for the applet. In the applet, I rewrite the server's URL and append ";jsessionid=[the session id]" before using the URL to communicate via a URLConnection, so that the server knows that this is still the same session.

    This works fine as long as everyone is on one side or the other of the firewall, but when I put the server behind the firewall, trying to talk to it from outside the firewall fails (HTTP error 500, i.e. the server messed up.) Upon debugging, I noticed that the requestedSessionID is null, where it normally picks up the session id I supply in the APPLET tag.

    My network keepers assure me that the firewall is not blocking cookies, there are no proxies or NATs or anything in the way, but I'm losing the jsessionid and as a result the server thinks that the reply from the applet is a request for a new session...which kills the app. Argh.

    Does anyone have any ideas as to how I can figure out what is mangling my applet's requests across the firewall? Any information would be very much appreciated!

  2. #2
    Join Date
    Mar 2007
    Did you ever resolve the issue you had with the disappearing jsessionid? I seem to be having a similiar problem. My app runs on the phone and emulator. When running on the emulator behind my firewall, my sessionid is intact. But when running the app over particular phone, i lose my jsessionid. In particular t-mobile on a Sony K750i. Seems to work ok on a Sanyo M1 on Sprint. Not sure if it's carrier or phone related. It it could be my code. What did you discover?


  3. #3
    Join Date
    Apr 2007
    Attach software www.cajoon.com to your Java environment (J2SE, J2EE) and get 'root-cause' for all your exceptions . . .

Similar Threads

  1. Applet Servlet Communication
    By thennam in forum Java
    Replies: 1
    Last Post: 01-07-2006, 11:07 AM
  2. Replies: 3
    Last Post: 06-08-2005, 04:22 AM
  3. Replies: 1
    Last Post: 08-10-2000, 12:35 PM
  4. Replies: 1
    Last Post: 08-10-2000, 12:33 PM
  5. applet servlet communication
    By prasad in forum Java
    Replies: 1
    Last Post: 05-26-2000, 11:11 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.