RE: Query - Path to WebServerResources
Has anyone discovered what would be causing the loss of the Contents/ entry for images. I had an app where this was working fine and just started it again to find my component images all having bad links. 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) ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Query - Path to WebServerResources
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 (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
RE: Query - Path to WebServerResources
Lachlan, Thanks. We have been playing with 5.4 frameworks (currently looking at migration from Tiger to Leopard) but have re-checked and am sure we are using 5.3 frameworks currently. We have 4 separate applications that we build (from same environment using same frameworks) and deploy into the same server - 3 work fine, 1 does not. For the one that does not we have an earlier deployment that if we re-deploy into the same application container it works OK. We do not have logging turned on - how do you get the start-up logs (WOApplicationBaseURL / WOFrameworksBaseURL)? I have re-deployed (application that was is still is failing) printing these (and more) from the Application constructor, as: adaptor()=WODefaultAdaptor applicationBaseURL()=/WebObjects baseURL()=/WebObjects cgiAdaptorURL()=http://server.txt2get.co.nz/cgi-bin/WebObjects directActionRequestHandlerKey()=wa frameworksBaseURL()=/WebObjects/Frameworks host()=server.txt2get.co.nz name()=TXT2GET-TESTING outputPath()=/Users/Shared/Logs/TXT2GET-TESTING-1 path()=/Library/WebObjects/Applications/TXT2Get.woa/Contents port()=2001 webserverConnectURL()=http://server.txt2get.co.nz/cgi-bin/WebObjects/TXT2GET -TESTING.woa/-2001 We are building and deploying directly from Eclipse on Windows using 5.3 frameworks, not using Wonder. No properties have changed in JavaMonitor or the app. I guess what we are trying to work out is how the URL for webserver served up content is determined - what of the above parameters are used and how? And what could have changed to make this work differently? We also have another problem with this application (and we are assuming that it is related to the same issue - and might help in identifying the problem)... our logout functionality uses a WORedirect as follows: WORedirect redirectToLoseSessionID =(WORedirect)pageWithName(WORedirect); NSDictionary parms = new NSDictionary(new Object[] {Boolean.FALSE}, new Object[] {wosid}); context()._generateCompleteURLs(); String homeURL = context().directActionURLForActionNamed(default, parms); redirectToLoseSessionID.setUrl(homeURL); // entry point session().terminate(); But now the initial statement (...pageWithName(WORedirect)] we now get an exception, as: com.txt2get.common.Header |java.lang.IllegalStateException: Unable to find framework named TXT2Get. at com.webobjects.appserver._private.WOComponentDefinition.init(WOComponentDe finition.java:179) at com.webobjects.appserver.WOApplication._componentDefinitionFromClassNamed(WO Application.java:2353) at com.webobjects.appserver.WOApplication._componentDefinition(WOApplication.ja va:2448) at com.webobjects.appserver.WOApplication.pageWithName(WOApplication.java:1943) at com.webobjects.appserver.WOComponent.pageWithName(WOComponent.java:1200) at com.txt2get.common.Header.goLogout(Header.java:231) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.webobjects.foundation.NSKeyValueCoding$ValueAccessor$1.methodValue(NSKey ValueCoding.java:684) at com.webobjects.foundation.NSKeyValueCoding$_MethodBinding.valueInObject(NSKe yValueCoding.java:1160) at com.webobjects.foundation.NSKeyValueCoding$DefaultImplementation.valueForKey (NSKeyValueCoding.java:1268) Again appreciate all the help you can offer. Many thanks, -Original Message- From: Lachlan Deck [mailto:lachlan.d...@gmail.com] Sent: Thursday, 28 May 2009 7:39 p.m. To: Peter Thompson Cc: Webobjects-dev@lists.apple.com Subject: Re: Query - Path to WebServerResources Importance: High 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
Query - Path to WebServerResources
Hello, We have just re-deployed to our current development server, and the application is now resolving URL's to the Web Server (i.e. WebServerResources) differently. 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) E.g. we have a logo defined in the WOD as: logo: WOImage { filename = images/logo.gif; width = 183; height = 56; } On the page this resolves as: http:// http://%3courURL%3e/WebObjects/%3courAPP%3e.woa/WebServerResources/images/l ogo.gif ourURL/WebObjects/ourAPP.woa/WebServerResources/images/logo.gif when we expect (and previously got): http:// http://%20%3courURL%3e/WebObjects/%3courAPP%3e.woa/Contents/WebServerResour ces/images/logo.gif ourURL/WebObjects/ourAPP.woa/Contents/WebServerResources/images/logo.gif Can someone shed some light on this - particularly how is the URL determined? Thanks, Peter Thompson ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com