Re: hardcoded DirectActions URL
Re: hardcoded DirectActions URL
- Subject: Re: hardcoded DirectActions URL
- From: Jonathan Rochkind <email@hidden>
- Date: Tue, 12 Aug 2003 13:23:27 -0500
At 07:31 PM 8/12/2003 +0200, Santiago wrote:
I have I problem: if I don't have the session ID in the URL (and in the
first page it isn't there) and I don't have the session ID in the links
(because those links are hardcoded in a file),
Right, that's what you'd have to change if you want the session ID in the
URL. Since every user in every session has their own session ID---you can't
hardcode the URL in a file. You can't have a hardcoded file that you
simply deliver to the application. If you want parts of it to be different
for every user!
You could dynamically construct the file to deliver from the user---perhaps
from a file on disk as source material, perhaps from the db, but either way
you'd have to process it before returning to a user. Perhaps you'd put your
own custom token in the db or source file, something like:
#LinkToTopic:TopicName#
Then, before delivering content to the user, you'd have to do some kind of
search-and-replace in your source material, to turn that into a valid DA
URL to your app, with session.
Or you can just keep session ID in cookies. Or you can avoid using a
session entirely. I can't think of any other option.
Hope this helps,
--Jonathan
then I can't see the way I can get the context (nor the session id which
is what I'm looking for). I'll say with an example because I don't know if
I'm explaining this right.
1.- Someone gets into the web site with the basic URL http://mydomain.org
2.- I have the default request handler set to 'wa', so the application
goes to defaultAction and generates the Main page.
3.- I have code to load the page contents from a file (plain text) with
all the links hardcoded.
4.- PROBLEM: The user wants to go to another page and clicks one of the
links, say MyLinkToOtherPage. This is hardcoded like
<a href="/cgi-
bin/WebObjects/wa/lookFor?page=MyLinkToOtherPage>MyLinkToOtherPage<a>. But
this has no session ID so, when the request arrives to the dispatchRequest
method, it is managed like a NEW request (new in the sense that it is in
another session, of course). I have no context data nor in the URL nor in
the link, so how could I access to the context()? (Chuck, using cookies
will be a solution, but as far as I know still exist people who disable
the cookies stuff)
mmm, I'm going to try another way I just have thought on (still too fuzzy
to explain). By the way, I was aware of the WODev wiki site but the link
to the tarball didn't work. Luckily, Pierre have said that he's going to
fix it. Thanks a lot Pierre.
And thanks to you all for the help
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.