• 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: hardcoded DirectActions URL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hardcoded DirectActions URL


  • Subject: Re: hardcoded DirectActions URL
  • From: Jonathan Rochkind <email@hidden>
  • Date: Tue, 12 Aug 2003 10:50:16 -0500

At 05:07 PM 8/12/2003 +0200, Santiago wrote:
Hello all

the form <a href=/cgi-bin/WebObjects/wa/myAction?title=xxx>. This works fine except that the application generates a new session (and a new DirectAction) each time a link is clicked -because the lack of ?wosid in the URL, I think-.

Do you want a session? If you specifically want to avoid having a session, you can put &wosid=false, which should be enough to prevent session generation. If it's not, things can be fixed so you never automatically get a session, and those direct action URLs never pass along the session or create a new one. If that's what you wanted.


I'm trying to figure out how to put the wosid in the URL so the Application understand that it should use the existing session. All the methods i've seen come into play after the Application has created the new objects and, by now, I'm a bit confused with the application flow and where can I intervene.

Are you generating your pages dynamically on the fly? If you are, you can generate direct action URLs with the current sessionID tacked on. Use context().directActionURLNamed (or some method name like that on WOContext) to automatically generate direct action URLs with session ID if neccesary.


If you don't want to dynamically regenerate these URLs with each request, then there's really no way to embed the current sessionID in the URL, of course. You can also embed session information in cookies, instead of the URL, to still have a persistent session. Or you could give up a persistent session as described above.

Pierre Frisch has written a wiki-style app in WebObjects, at www.wodev.com. I believe it's open source, and you can get access to the source code by contacting him. It may be useful to see how he has solved various problems, or even to take his code and modify it to suit your own needs.

--Jonathan



Any idea welcome
Greetings, Santi
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Install URL
  • Next by Date: Javadoc for OSX
  • Previous by thread: Re: hardcoded DirectActions URL
  • Next by thread: Re: hardcoded DirectActions URL
  • Index(es):
    • Date
    • Thread