X-CGP-ClamAV-Result: CLEAN X-VirusScanner: Niversoft's CGPClamav Helper v1.25a (ClamAV 0.103.12/27778) X-Junk-Score: 0 [] X-KAS-Score: 0 [] Return-Path: Received: from fortimail.cybercat.ca ([148.59.136.201] verified) by post.selbstdenker.com (CommuniGate Pro SMTP 6.3.18) with ESMTPS id 34740371 for webobjects-dev@wocommunity.org; Wed, 08 Oct 2025 14:17:17 +0200 Received-SPF: pass receiver=post.selbstdenker.com; client-ip=148.59.136.201; envelope-from=samuel@samkar.com Received: from smtpclient.apple (lnsm1-toronto12-142-120-228-112.internet.virginmobile.ca [142.120.228.112]) (user=samuel%samkar.com mech=PLAIN bits=0) by fortimail.cybercat.ca with ESMTP id 598CH4TU011922-598CH4TV011922 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 8 Oct 2025 08:17:04 -0400 From: Samuel Pelletier Content-Type: multipart/alternative; boundary="Apple-Mail=_00C67E90-006B-4F8E-A0DC-B28CCCF09063" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81\)) Subject: Re: [WO-DEV] Dynamic URL in CSS Date: Wed, 8 Oct 2025 08:16:54 -0400 References: To: WebObjects & WOnder Development In-Reply-To: Message-Id: <0DE5BD89-B3E3-46A6-AEFE-266A20DFCB58@samkar.com> X-Mailer: Apple Mail (2.3826.700.81) X-FEAS-Auth-User: samuel%samkar.com X-FE-Last-Public-Client-IP: 142.120.228.112 X-FE-Policy-ID: 1:3:2:SYSTEM --Apple-Mail=_00C67E90-006B-4F8E-A0DC-B28CCCF09063 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Markus, I have some of these in css files and it works if you use relative urls = in your css like this: background-image: = url(../img/rapportOrientation/logo/texte.svg); The base path is the effective css file path, this exemple is expanded = to this when running in Eclipse: = http://127.0.0.1:2324/cgi-bin/WebObjects/GCAGestion.woa/_wr_/wodata=3D/Use= rs/sam/work/KavijuWoMaven/GCARapports/src/main/webserver-resources/img/rap= portOrientation/couvertureInteractive/promoteur.jpg In my project, webserver-resources contains css, fonts, img, js and and = scss folders. Regards, Samuel > Le 1 oct. 2025 =C3=A0 08:53, Markus Ruggiero (rucotec) = a =C3=A9crit : >=20 > I have a large customer application that has nicely structured CSS = files. Unfortunately in one of them there are some absolute references = to WebServerResources >=20 > background-image: url(=E2=80=9C/MyApp/images/logo.png");=20 >=20 > This fails when the file is in WebServerResources. Up to now my = customer had all resources served statically from Apache. This works in = production but is not portable and breaks in Eclipse on my dev machine.=20= >=20 > What would be the best way to convert such CSS URLs? I cannot just put = a WOResourceURL in there or some such because the definition is in a = separate .css file in WebServerResources, not in a WOComponent. >=20 > How to best deal with such things? >=20 > Thanks for any tip and help > ---markus--- >=20 >=20 >=20 --Apple-Mail=_00C67E90-006B-4F8E-A0DC-B28CCCF09063 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi = Markus,

I have some of these in css files and it = works if you use relative urls in your css like = this:

background-image: = url(../img/rapportOrientation/logo/texte.svg);

Th= e base path is the effective css file path, this exemple is expanded to = this when running in Eclipse:


In = my project, webserver-resources contains css, fonts, img, js and and = scss = folders.

 Regards,

= Samuel


Le 1 = oct. 2025 =C3=A0 08:53, Markus Ruggiero (rucotec) = <markus.ruggiero@rucotec.ch> a =C3=A9crit :

I = have a large customer application that has nicely structured CSS files. = Unfortunately in one of them there are some absolute references to = WebServerResources

background-image: url(=E2=80=9C/MyApp/images/logo.png")

This fails when = the file is in WebServerResources. Up to now my customer had all = resources served statically from Apache. This works in production but is = not portable and breaks in Eclipse on my dev = machine. 

What would = be the best way to convert such CSS URLs? I cannot just put a = WOResourceURL in there or some such because the definition is in a = separate .css file in WebServerResources, not in a = WOComponent.

How to best = deal with such things?

Thanks for any tip and help
---markus---




= --Apple-Mail=_00C67E90-006B-4F8E-A0DC-B28CCCF09063--