• 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
Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image


  • Subject: Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 30 Mar 2005 11:46:28 -0800


On Mar 30, 2005, at 11:05 AM, Kaj Hejer wrote:

Hi!

We have our own handleSessionRestorationErrorInContext in Application.java which just show our own timeout page. This works just fine most of the time :)

But... We have blogg-application. On the page that show an entry in the blogg we get a problem if an entry contains a relative reference to an image like

  <img src="myimage.gif">

The page show ok. But... if we try to click a link on the page we se that our handleSessionRestorationErrorInContext is called.

Why is handleSessionRestorationErrorInContext called here?

What I _think_ is happening:

1. User requests blog page, app returns blog page with wosid cookie for user's session
2. Browser requests myimage.gif, app misinterprets, calls sessionRestorationErrorInContext, returns wosid cookie that either contains an invalid session ID or expires the existing cookie.
3. User clicks on link, request contains bad or missing wosid cookie
4. App returns session expired page.



When writing context.request() to the log in handleSessionRestorationErrorInContext I see that the request is for the following url: "/cgi-bin/WebObjects/nettlogg.woa/wo/myimage.gif"

I'd try to trap things like that before they get to the session handling code. One place is in rewrite rules if using Apache. Another place is in Application.dispatchRequest before calling super. Just return a 404 response.


Chuck


We store session id as a cookie but I guess here "myimage.gif" is looked at as the session id and ofcource no session with this id can be found.

Any ideas on how to work around this problem?

Our handlePageRestorationErrorInContext looks something like the following:

public WOResponse handlePageRestorationErrorInContext(WOContext context) {
System.out.println("UIOApplication: handlePageRestorationErrorInContext: starter");
UIOBacktrackPage backtrackSide = (UIOBacktrackPage) pageWithName("UIOBacktrackPage", context);
return backtrackSide.generateResponse();
}



We are using WO5.2.2 on solaris/windows/osx.


-Kaj :)

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


This email sent to email@hidden
--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects




_______________________________________________
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: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
      • From: Kaj Hejer <email@hidden>
References: 
 >"False" call to handleSessionRestorationErrorInContext when having a relative reference to an image (From: Kaj Hejer <email@hidden>)

  • Prev by Date: Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
  • Next by Date: Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
  • Previous by thread: Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
  • Next by thread: Re: "False" call to handleSessionRestorationErrorInContext when having a relative reference to an image
  • Index(es):
    • Date
    • Thread