Hi Christoph, as Ralf said "use a path relative to the css file“ so you should try:
body {
background: url("../gfx/background.jpg") repeat;
}
jw
Am 02.10.2014 um 10:58 schrieb Christoph Wick <[email protected]>:
> Hi Ralf, hi list,
>
> thanks for your answer.
>
> Of course, I'm using wonder.
>
> But it doesn't work the way you suggest.
>
> If I replace
>
>> body {
>> background:
>> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg")
>> repeat;
>> }
>
> with
>
>> body {
>> background: url("gfx/background.jpg") repeat;
>> }
>
> the background image is not displayed. CSS's urls need absolute URLs.
>
> The stylesheet itself is a static resource and is linked with
>
>> <wo:ERXStyleSheet filename="css/ourappstylesheet.css" rel="stylesheet"
>> media="screen"></wo:ERXStyleSheet>
>
> C.U.CW
> --
> The three great virtues of a programmer are Laziness, Impatience and Hubris.
> (Randal Schwartz)
>
> On 02.10.2014, at 10:36, Ralf Schuchardt <[email protected]> wrote:
>
>> When you are using Wonder, you can simply use a path relative to the css
>> file in the WebSeverResources directory (e.g. url(gfx/background.jpg) ) and
>> it should work in development and deployment.
>>
>> Ralf
>>
>>
>> Am 02.Okt. 2014 um 10:17 schrieb CHRISTOPH WICK | i4innovation GmbH, Bonn
>> <[email protected]>:
>>
>>> Hi List,
>>>
>>> I have a question because a colleague of mine wants to test Linux as
>>> development platform.
>>>
>>> Background:
>>> -----------
>>> I the css file of OurApp.woa we refer to background images like e.g.
>>>
>>> #a-div {
>>> background:
>>> url("/WebObjects/OurApp.woa/Contents/WebServerResources/gfx/background.jpg");
>>> }
>>>
>>> To make this working during development on the Mac, I put a softlink from
>>>
>>> /MYPATH_TO_ECLIPSE/OUR_APP_PROJECT/build/OurApp.woa -->
>>> /Libary/WebServer/Documents/WebObjects/OurApp.woa
>>>
>>> This works on the Mac, since the WO-build-in development server somehow
>>> scans /Library/WebServer/Documents/ (the default document root for Apache
>>> on Mac) during startup and delivers the resources to the browser.
>>>
>>> Problem:
>>> --------
>>> Since there is no /Library/WebServer/Documents/ on Linux (default is
>>> /var/www/html - at least on Ubuntu), this doesn't work on Linux
>>>
>>> Since my colleague doesn't want to create a folder
>>> /Library/WebServer/Documents/ (let's call this decision sort of "religious"
>>> but nevertheless :-) I was looking for the place where that
>>> "/Library/WebServer/Documents/" information came from.
>>>
>>> The only place I found, was
>>> /PATH_TO_WO_FRAMEWORKS/JavaWebObjects.framework/Resources/WebServerConfig.plist.
>>> Inside this plist there is an entry 'DocumentRoot =
>>> "/Library/WebServer/Documents";'
>>>
>>> Now, my colleague could modify the plist entry and everything works fine,
>>> but ...
>>>
>>> Question:
>>> ---------
>>> Is there any other way to tell the WebObjects development environment to
>>> look for the document root than patching the WebServerConfig.plist inside
>>> the JavaWebObjects.framework folder?
>>>
>>> Side notes:
>>> -----------
>>> I tried to override the documentRoot() method of my Application class to
>>> return the correct path, but it's never called during startup. At least
>>> while in development mode.
>>>
>>> I also tried to set the property "application.documentRoot" - same effect.
>>> Doesn't work.
>>>
>>> Thanks for your help, C.U.CW
>>> --
>>> What are the three enemies of a programmer? Sunlight, oxygen, and the
>>> appalling roar of the birds.
>>>
>>> _______________________________________________
>>> Do not post admin requests to the list. They will be ignored.
>>> Webobjects-dev mailing list ([email protected])
>>> Help/Unsubscribe/Update your Subscription:
>>> https://lists.apple.com/mailman/options/webobjects-dev/rasc%40gmx.de
>>>
>>> This email sent to [email protected]
>>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/webobjects-dev/jw%40oyosys.com
>
> This email sent to [email protected]
signature.asc
Description: Message signed with OpenPGP using GPGMail
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
