Re: CSS resources using url(...) syntax under Direct Connect
Re: CSS resources using url(...) syntax under Direct Connect
- Subject: Re: CSS resources using url(...) syntax under Direct Connect
- From: "Ruenagel, Frank" <email@hidden>
- Date: Mon, 30 May 2011 10:52:01 +0200
- Thread-topic: Re: CSS resources using url(...) syntax under Direct Connect
I guess, this is a problem of resource-path-names without beginning with "/" or "http://".
For example the following *never* may come up in the generated html of a WO-generated dynamic page:
<style>
div#statistic p#count-right{
background-image: url(images/count-right.jpg);
}
</style>
There has to be "/images..." (or alternative the absolute path),
else the URL is interpreted as relative to the current "page", which is
a WOComponent or DirectAction.
Check the *generated* page for such errors.
Check the logs of your app: any miraculous "page not found" errors around?
I guess, the trick with the "<wo:WOImage>" prevents the browser from sending the
evil request, because of caching.
IMHO, the direct-connect-adaptor from within Eclipse *hides* this error.
Best Regards
Frank
-----Ursprüngliche Nachricht-----
Von: webobjects-dev-bounces+webobjects=email@hidden [mailto:webobjects-dev-bounces+webobjects=email@hidden] Im Auftrag von Paul Dunkler
Bereitgestellt: Montag, 30. Mai 2011 10:21
Bereitgestellt in: WebObjects
Unterhaltung: CSS resources using url(...) syntax under Direct Connect
Betreff: Re: CSS resources using url(...) syntax under Direct Connect
I am currently having the same problems with a little admin application which is accessed via Direct Connec too.
All images which are referenced through the css-file (which itself is referenced through <wo:ERXStyleSheet) can't be loaded. But if i load one of the images before the css file with a "<wo:WOImage>", that particular image is loaded right (even through css).
When running in Eclipse, everything is running fine...
Am 30.05.2011 um 07:32 schrieb Paul Hoadley:
> On 29/05/2011, at 6:25 PM, Paul Hoadley wrote:
>
>> I've hit an issue that seems to be the one described at this point in a long thread about the improved Wonder JavaMonitor:
>>
>> http://osdir.com/ml/webobjects-dev/2010-11/msg00717.html
>>
>> I'm running an app from the command line, and accessing it via Direct Connect. (I'll explain this weird behaviour below.) Specifically, the browser can't find any resources referenced by the url(...) syntax from with CSS files. No complaints are logged anywhere, the app just returns an empty resource. (This is on Mac OS X, and it has nothing to do with case-sensitivity, spaces in filenames or typos: running through Eclipse returns the requested resources just fine.) I followed that thread above through to the end, but didn't see that the issue was resolved-was it? Does anyone know _any_ workaround for this?
>
> Here's one using the hint from that thread that once an image had been displayed using a WOImage component, it was then available to the CSS file's url(...) reference. If I display on the front page of the app a div containing WOImage references to all the image files in WebServerResources, they then appear as intended by the CSS. I can set 'style="display: none;"' on that div and there's no visible difference. Obviously a complete hack, but it's sufficient for this very specific development scenario.
>
>
> --
> Paul.
>
> http://logicsquad.net/
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> yrality.com
>
> This email sent to email@hidden
--
Mit freundlichen Grüßen / Kind regards
Paul Dunkler
_______________________________________________
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
_______________________________________________
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