You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by otisg <ot...@ureach.com> on 2003/05/01 17:12:32 UTC

Paths to resources from app modules in common pages?

Hello,

We are using Struts 1.1 (rc1) and making use or the new module
feature.
There are some pages in the application that need to be used
from both the core application and from the module.  An example
of that would be a common error page.

The problem that we are seeing is that this common page needs to
reference resources (e.g. images) that are only in the core
application, and not in the module, which does not work if the
page is called from a module: the relative links to those
resources are expanded to the wrong value.

For instance, we have /app as the core web app, and /app/mod as
the web application's module.

Consider an image foo.gif present in /app/images.
If the common page uses <img>, this will work when the common
page is called from the core application, as that ends up
getting 'expanded to /app/images/foo.gif, which is correct.

However, if this page gets called from /app/mod, that will
expand to /app/mod/images/foo.gif, which is not what we want.
We still want to get to /app/foo.gif, without hard-coding the
application path, the /app part, in the page.

What is the best way to make this common page work when called
from both the core application and from the application module?

Thank you,
Otis



________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org