If I am correct, you should be sure to have this in web.xml : <context-param> <param-name>WOAppMode</param-name> <param-value>Deployment</param-value> </context-param>
In build.xml : <replaceregexp file="${dest.dir}/${build.app.name}/WEB-INF/web.xml" match="Development" replace="Deployment" byline="true" /> By the way, you need to copy the WebResources for framework as well .. Pierre De : Dev WO [mailto:webobje...@anazys.com] Envoyé : jeudi 14 mai 2020 10:21 À : GILQUIN Pierre Cc : WebObjects-Dev Objet : Re: [Tomcat] - Resources referenced in CSS not displayed Thanks Pierre, Just tried it, the files are now also in the “static” tree, but the application still generate the url 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 I’m doing <wo:ERXStyleSheet filename = "defaultscreen.css" framework = "app”/> in the HTML template Thanks for your help, Xavier PS: I see that if I manually do http://localhost:8081/CloudManager/static/CloudManager.woa/Contents/WebServerResources/images/logo.png, the image is displayed, so that seems to be on the right track, but how to make ERXStyleSheet to actually generate this kind of URL... On 14 May 2020, at 10:04, GILQUIN Pierre via Webobjects-dev <webobjects-dev@lists.apple.com<mailto:webobjects-dev@lists.apple.com>> wrote: 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:webobjects-dev@lists.apple.com] 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 (Webobjects-dev@lists.apple.com<mailto:Webobjects-dev@lists.apple.com>) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/webobjects-dev/webobjects%40anazys.com This email sent to webobje...@anazys.com<mailto:webobje...@anazys.com>
_______________________________________________ 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: https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com