Having deployed my first application on a small home server which is sharing 
the hosting of apache2 web server and tomcat, it is clear to me from 
performance reasons that I need to serve as much static content as possible.

With this application I am able to serve the CSS and the images it refers to 
statically because I can both map the css url over the top of the actual 
place within the tomcat webapps directories where the file is stored, and can 
use the .css extension (and the .gif extension for images) to jkUnmount these 
particular elements of the servelet address space, thus leaving them to 
apache to serve.

This css file has to be indentified to the @Shell component via an asset 
declaration which I do in a "Border" component that I built via an annotation 
in the associated java class of this Border component.

But I have found that if I declare the asset path as "/style.css" then by the 
time it reaches the browser as html it has automatically added /xxxxx to the 
front of it (where xxxxx is the application name). 

However, I now want to develop a second application for my site (I need to do 
this rather than just grow the first because the restart service is needed to 
clear down a session and that sends you back to the application home page - 
which needs to not be the sites real home page), using the same styles. 
Obviously for site consistency (and maintainability during changes) I only 
want one copy of the style sheet to exist.

I have discovered that if I enter the fully qualified url in to the asset 
declaration (ie something like 
@Asset("http://www.chandlerfamily.org.uk/style.css";) ) then this url does not 
have the application name prepended.

HOWEVER - this is going to be a real pig to keep in step as I change from my 
local pc testing environment to the server test environment and then onto the 
final deployment.

Is it possible to actually tell the Asset to not add the application name to 
the asset (or is there another way all together? I could imagine by border 
component putting the html head in as static element and not using @Shell - 
does it do anything important [Like generate the <base> element - is that 
important?])

Advice please



-- 
Alan Chandler
http://www.chandlerfamily.org.uk
Open Source. It's the difference between trust and antitrust.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to