Re: DirectAction URLs
Re: DirectAction URLs
- Subject: Re: DirectAction URLs
- From: Chuck Hill <email@hidden>
- Date: Tue, 6 Sep 2005 20:39:28 -0700
See in WOContext:
public String completeURLWithRequestHandlerKey(String requestHandlerKey,
String
aRequestHandlerPath,
String aQueryString,
boolean isSecure,
int somePort)
Chuck
On Sep 6, 2005, at 7:56 PM, David Schneider-Joseph wrote:
Hmm, that's one way to do it. Another idea I figured out is using
the WOApplication.servletConnectURL() method. Unfortunately, that
doesn't include the port, but my production server will be on port
80 so it won't be an issue, and it does get the rest of the path
correctly. I'm sure I could hack the URL string to add WOPort in
there, but it doesn't seem worth it.
Thanks for the suggestion. :)
On Sep 6, 2005, at 10:32 PM, Greg wrote:
In my application I have a Preference EO that is just a key/value
pair that gets written to the database. In the application I have
a shared editing context for the preferences so that they are only
fetched the once. I also have a configuration class that wraps a
lot of the preferences. One specific config option is host. So all
I have to do is reference the host via
application.configuration.host and it will resolve correctly from
the database. Also all paths etc are configuration options as well.
HTH,
Greg
On 07/09/2005, at 11:19 AM, David Schneider-Joseph wrote:
Hi all,
I have a mailing list administration software I'm developing.
There is a direct action URL for unsubscribe requests, and I want
to include this URL in the email. It would be easy for me to
just copy and paste the URL as it is now. But what if:
A) I move to a different host or port?
B) I change the application base directory?
I want to just be able to refer to the class and method of the
action, and get the corresponding URL, so that I do not have
redundancy in my code. Is there any simple way to do that? Keep
in mind that I also want to pass along form values to the method.
Thanks in advance.
David Schneider-Joseph
http://www.davidsj.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40framedphotographics.com
This email sent to email@hidden
David Schneider-Joseph
http://www.davidsj.com/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-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