Thanks for the helpful information. I was able to get jetty & tomcat to serve 
static resources by placing them in a static folder at the root of my web app. 
The only wrinkle was that WO was generating links to my application bundle 
resources without the “Contents” part of the URL as in your screenshot (i.e. I 
was getting /static/MyApp.woa/WebServerResources as opposed to 
/static/MyApp.woa/Contents/WebServerResources). Adjusting my 
WOApplicationBaseURL fixed that, though.

I’m still curious to know how Maven folks are automating this sort of thing 
when packaging as a true war. In  particular, I'd like to know if there is a 
way to automatically copy all webserver-resources from each embedded WO 
framework, as well as the application itself, into the container’s static 
folder. Right now I’m manually copying the web server resources from each 
framework, as well as the app, but I’m sure there’s a better way to do so, 
perhaps via a Maven plugin. . 

Also seems as though with my webserver resources included in the static folder, 
I’m including an extra copy of the  webserver resources already bundled in each 
jar file. I suppose there is a way to suppress inclusion of the 
webserver-resources when building the jar packages for each framework and 
application project, but I haven’t had the time to investigate yet.

Thanks again for the help,

F

-- 
Faizel Dakri
list...@dakri.com



> On 2014-Dec-31, at 10:43 AM, John Huss <johnth...@gmail.com> wrote:
> 
> I wouldn't bother with a split install.  Just serve the web server resources 
> directly from tomcat/jetty.  That's one of the main advantages of using a war 
> in the first place - a much simpler deployment that just works.  Everything 
> third question on this list is from someone having a problem deploying their 
> app.
> 
> Both tomcat and jetty will automatically serve static files placed in the 
> "static" folder like the screenshot below:
> 
> <war.png>
> 
> You can make WO generate the correct path by setting frameworksBaseURL or 
> extending ERXServletApplication.
> 
> For ANT here's the code to copy the files:
> 
> <copy 
> todir="${dest.dir}/${build.app.name}/static/${build.app.name}.woa/Contents/WebServerResources/">
> 
> <fileset dir="WebServerResources" includes="**" />
> 
> </copy>
> 
> 
> <copy todir="${dest.dir}/${build.app.name}/static/Frameworks/">
> 
> <fileset dir="${dest.dir}/${build.app.name}.woa/Contents/Frameworks/">
> 
> <include name="*.framework/WebServerResources/**"/>
> 
> </fileset>
> 
> </copy>
> 
> 
> 
> On Tue Dec 30 2014 at 12:01:49 PM Faizel Dakri <list...@dakri.com> wrote:
> How are maven folks doing split installs when packaging as a true war
> for tomcat (or whatever container)? I've recently converted my app to a
> true war, but the webserver resources are now bundled in the war and
> there is no webserver-resources archive generated anymore (at least not
> that I can find).
> 
> I have many static resources that are inside embedded frameworks and
> these are now packaged inside the framework jar files which are embedded
> in my war file. Some of these static resources are css files that have
> relative file urls in them, but these don't get get resolved when
> serving static files via the container, which is why I'm wondering how
> to build a split install package that bundles all static resources for
> the app, as well as its frameworks.
> 
> I recall there being support (i.e. Generating a tar archive with all
> static resources) for this in the traditional ant-based builds and when
> packaging as a woa in maven, but could not find a way when packaging as
> war in maven. Am I missing something?
> 
> Thanks for any advice or pointers.
> 
> F
> 
> --
> Faizel Dakri
> list...@dakri.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/johnthuss%40gmail.com
> 
> This email sent to johnth...@gmail.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

Reply via email to