Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Solved! (was: Struts: module relative path puzzle)

Thread Tools

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

Ronald Fischer
Posts: n/a
      08-28-2003 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 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.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
FileUpload control doesn't work (fail in client side early stages) when path is relative i.e "\\path.." Oren ASP .Net 1 04-29-2007 04:20 PM
How do I convert an absolute path into a relative path Nigel Wilkinson Ruby 2 07-25-2005 07:37 PM
absolute path versus relative path in JSP Matt Java 3 07-08-2004 08:31 PM
Make a relative url path from an absolute path to another one Thomas Guettler Python 3 10-27-2003 04:41 PM
Struts: module relative path puzzle Ronald Fischer Java 0 07-25-2003 10:14 AM