• 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: [Tomcat] - Resources referenced in CSS not displayed
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Tomcat] - Resources referenced in CSS not displayed


  • Subject: RE: [Tomcat] - Resources referenced in CSS not displayed
  • From: GILQUIN Pierre via Webobjects-dev <email@hidden>
  • Date: Thu, 14 May 2020 08:04:32 +0000
  • Ironport-sdr: VtI3q9BZKD4iqHSl0WZHldWZQ2YGId/Vlm9dFP16qbKOGzxjhKBqNg86DMKkvra5jyWtkrPsgs dJgIXzwH3q9w==
  • Ironport-sdr: VDJbLLrxriuxZe4dPmkfgdAVwjFb4oJQ9buife+mVi2AsQQZGJtp0bsadtMqa0QtOMfIxd4A73 RJmKZR0nL1rQ==
  • Thread-topic: [Tomcat] - Resources referenced in CSS not displayed

Hi Xavier,

To fully deploy and serve static files from Tomcat, I do the following things  :

in Application start:
             setApplicationBaseURL("/MyApp/static/");
             setFrameworksBaseURL("/MyApp/static/Frameworks/");

in build.xml for ssdd task:
        <!-- copy web server resources to "static/" folder -->
        <copy
todir="${dest.dir}/${build.app.name}/static/${build.app.name}.woa/Contents/WebServerResources/">
            <fileset dir="WebServerResources" includes="**" />
        </copy>


HTH
Pierre


De : Dev WO via Webobjects-dev [mailto:email@hidden]
Envoyé : jeudi 14 mai 2020 09:52
À : WebObjects Development
Objet : [Tomcat] - Resources referenced in CSS not displayed

Hi list,

I’m struggling with something Tomcat related:
My application’s CSS is working except for referenced items like a background
image or a font.
What I have so far:
-The images and font are present inside the same folder, everything is
correctly deployed under Tomcat and all files are there after Tomcat expand the
war
-No mismatch of case sensitivity for file names either inside the CSS or on the
filesystem
-Everything is working as expected when running from Eclipse or under
WOMonitor/wotaskd

Just as a side note, I don’t really have a say on the deployment (Tomcat), all
static resources must be served through Tomcat and not “split” with a web
server. Customer skills is zero, Deploy/undeploy under Tomcat Manager is
already “a lot” for the customer.

The deployment generates urls like:
http://localhost:8081/CloudManager/WebObjects/CloudManager.woa/wr/wodata=/usr/local/apache-tomcat-9.0.29/webapps/CloudManager/WEB-INF/CloudManager.woa/Contents/WebServerResources/defaultscreen.css
for the CSS, which is ok and working
the CSS has relative path like

@font-face {
  src: url('fonts/ysiweb.woff') format('woff');
…
}
and for the background image
… background-image: url(images/logo.png)…

In the browser’s inspector, I can see the logo.png and .woff font, but even if
they get a 200 status, they actually have no content (transfer size of 175B for
both in the web inspector)
The urls are:
http://localhost:8081/CloudManager/WebObjects/CloudManager.woa/wr/wodata=/usr/local/apache-tomcat-9.0.29/webapps/CloudManager/WEB-INF/CloudManager.woa/Contents/WebServerResources/fonts/ysiweb.woff
and
http://localhost:8081/CloudManager/WebObjects/CloudManager.woa/wr/wodata=/usr/local/apache-tomcat-9.0.29/webapps/CloudManager/WEB-INF/CloudManager.woa/Contents/WebServerResources/images/logo.png

I've tried adding the mime-types manually to the web.xml, but it’s clearly not
the issue here.

I found a thread "Tomcat deployment and CSS images” from 2013 by Miguel Torres,
but he actually changed the context-param WOAppMode to Deployment and “split”
the resources with the Web Server, something I can’t do here.

I’m lost, I don’t understand what’s the issue here.

Any help greatly appreciated:)

Thanks,

Xavier

 _______________________________________________
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: [Tomcat] - Resources referenced in CSS not displayed
      • From: Dev WO via Webobjects-dev <email@hidden>
References: 
 >[Tomcat] - Resources referenced in CSS not displayed (From: Dev WO via Webobjects-dev <email@hidden>)

  • Prev by Date: [Tomcat] - Resources referenced in CSS not displayed
  • Next by Date: Re: [Tomcat] - Resources referenced in CSS not displayed
  • Previous by thread: [Tomcat] - Resources referenced in CSS not displayed
  • Next by thread: Re: [Tomcat] - Resources referenced in CSS not displayed
  • Index(es):
    • Date
    • Thread