Can't you embed a ServletContext attribute (variable) in your links using the EL? The attribute value could come from an init param and get set at app startup.

Erik


tarek.nabil wrote:

Hi everyone,

I still can not find an answer to my question, so I thought I'd repost
this and try to make it clearer. I really apreciate any help.


How can I refer to resources that are outside my module in a way that will not mandate rewriting all the URLs in case I change the location of my module in the hierarchy?

My URL would look like
http://server/my-application/my-module/doSomething.do

And inside the JSP I need to refer to an image inside a folder "images",
for example, the absolute URL should be

http://server/my-application/images/some-image.gif

For that purpose, I can not always use the <html:img> tag, cause some of
the images are background images.

I thought about the <html:rewrite> tag, but

I can not use the page attribute, cause it's only limited to resources
inside the module.

I can not use the href attribute, because I do not want to hardcode the
application name.

I can not use the forward attribute because I do not want to specify a
forward for every image.

Even for the images that are simple images and I can use the <html:img>
tag, I can not use the pageKey attribute, also because it's module
relative and also because then I would need to all the images in the
ApplicationResources.properties file.

Thanks,
Tarek Nabil

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





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



Reply via email to