Solved! (was: Struts: module relative path puzzle)

R

Ronald Fischer

(e-mail address removed) on 2003-07-25 03:15:01 PST:
When using an <html:image ...> tag, I can specify the image either
via page='FILENAME' or via src='FILENAME'. In the former case, FILENAME
is looked up relative to the current module, while in the latter, it
is used relative to the base directory of my application.

On my attempt to understand an existing web application, I found by looking
at the generated code that the page and the src attributes indeed resolve
to different pathes, but I have not found the place where the module relative
path is defined!

I was finally able to solve the mystery myself:

The struts-config.xml may define a parameter "pagePattern", which
defines how to turn a page relative path into a context relative
path. If this parameter is undefined, Struts silently assumes that
it has the value

"$M$P"

$M means to use the module name and $P indicates the path of FILENAME
itself. Therefore, by default, the module relative path simply resolves
to the module name.

Ronald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top