Property to set the public host of an application
Property to set the public host of an application
- Subject: Property to set the public host of an application
- From: Samuel Pelletier <email@hidden>
- Date: Tue, 20 Feb 2018 11:13:34 -0500
Hi list,
Yesterday, I created a pull request to finally fix the problem of creating
email and url to the app in background tasks where the WOContext does not have
an URL from the server to know the server name and the WOHost is not a suitable
server to use in an URL. It is now merged in the master branch.
To use these, simply create a context using
ERXWOContext sessionLessContext = ERXWOContext.newContext();
sessionLessContext.generateCompleteURLs();
String url = sessionLessContext.urlWithRequestHandlerKey(...)
or create a component with ERXApplication.instantiatePage(String pageName) or
ERMailUtils.instantiatePage() as both will use ERXWOContext.newContext();
Here are the 2 added properties:
## If your WOHost is not your public host name, specify the public host to use
for complete URL
## generated without a server request like background tasks that send emails.
# er.extensions.ERXApplication.publicHost=www.yourPublicHost.com
## Set to true to switch default request used in background tasks to https
# er.extensions.ERXApplication.publicHostIsSecure=false
Samuel
_______________________________________________
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