In my current position we are developing an application which lives
on two different urls, one for public pages (content) and another
for backend account access and content management.  They both use
the same templates and should look and feel as if there is no
transistion.  The problem is, the assets/ cannot be relative to both
applications since they are on different urls and even different
boxes.  The typical way to access an image is either:

<img src="<%=request.getContextPath()%>/assets/graphics/home.png" />

or

<html:img page="/assets/graphics/home.png" />

now it is necessary to introduce a new configuration parameter,
which is the url prefix of the "common" url for the assets/  I
imagine I would specify this as a parameter in web.xml, but what
would be the best practice mapping to the two options presented
above.  Would it be:

<img
src="<c:out value="{$initParam.assetBaseUrl}"/>/assets/graphics/home.png"/>

and

<html:img page="/assets/graphics/home.png"
context="${initParam.assetBaseUrl}" />

Perhaps struts could add the ability to override the context using
an attribute such as "context".  At this point, you have to begin to
question the benefit of using the taglibs since having to enter the
context for each entry defeats the point of using the "page"
attribute.

Can someone make some sense of all this?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <[EMAIL PROTECTED]>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
...but once you've traveled this far off the track 
You won't settle for less and there's no going back 
 --Patrick O'Leary "Far Off the Track"
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

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

Reply via email to