• 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: Query - Path to WebServerResources
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query - Path to WebServerResources


  • Subject: Re: Query - Path to WebServerResources
  • From: Lachlan Deck <email@hidden>
  • Date: Thu, 28 May 2009 17:39:15 +1000

Hi Peter,

On 28/05/2009, at 12:58 PM, Peter Thompson wrote:

We have just re-deployed to our current development server,

Any change in versions of frameworks along the way?

and the
application is now resolving URL's to the Web Server (i.e.
WebServerResources) differently.

Check the start up logs for WOApplicationBaseURL / WOFrameworksBaseURL.

How are you building btw? What frameworks are you using? Using Wonder?

We are getting URLs like ..../app.woa/WebServerResources/... when we expect
(and have previously got) .../app.woa/Contents/ WebServerResources/... so it
is no longer expecting a Contents directory (so now our images etc... do not
resolve - they do if we copy the whole WebServerResources folder directly
under the WOA folder)

Have you changed any properties in JavaMonitor or the app?

Can someone shed some light on this - particularly how is the URL
determined?

If the aforementioned properties aren't correct (or not set correctly) you can enforce at runtime what you want. For example I do the following during initialisation:


// fix applicationBaseURL
String applicationBaseURL = applicationBaseURL();
{
LOG.info( "WOApplicationBaseURL:" + applicationBaseURL() );
String applicationBaseURLProperty = ERXProperties.stringForKey( "WOApplicationBaseURL" );
if ( !ERXStringUtilities.stringEqualsString( applicationBaseURL, applicationBaseURLProperty ) && applicationBaseURLProperty != null )
{
setApplicationBaseURL( applicationBaseURLProperty );
}
LOG.info( "WOApplicationBaseURL (fixed):" + applicationBaseURL() );
}


// fix frameworks/app webserver resources url.
if ( ERXProperties .booleanForKeyWithDefault ( "ISHFrameworksBaseURL.relativeToApplicationBaseURL", true ) )
{
String realAppName = NSPathUtilities.lastPathComponent( path() );
NSArray< String > components = new NSArray< String >( new String[] {
realAppName, "Contents", "Frameworks"
} );
String newBaseURL = applicationBaseURL();
for ( Enumeration< String > en = components.objectEnumerator(); en.hasMoreElements(); )
{
newBaseURL = NSPathUtilities.stringByAppendingPathComponent( newBaseURL, en.nextElement() );
}
ERXProperties.setStringForKey( newBaseURL, "WOFrameworksBaseURL" );
setFrameworksBaseURL( newBaseURL );
}
LOG.info( "WOFrameworksBaseURL:" + frameworksBaseURL() );


with regards,
--

Lachlan Deck


_______________________________________________ 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: Query - Path to WebServerResources
      • From: "Peter Thompson" <email@hidden>
References: 
 >Query - Path to WebServerResources (From: "Peter Thompson" <email@hidden>)

  • Prev by Date: Is that really difficult to deploy on Jboss??
  • Next by Date: Is there a Webobjects Adaptor for windows?
  • Previous by thread: Query - Path to WebServerResources
  • Next by thread: RE: Query - Path to WebServerResources
  • Index(es):
    • Date
    • Thread