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

Discussion in 'Java' started by Ronald Fischer, Aug 28, 2003.

  1. 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
     
    Ronald Fischer, Aug 28, 2003
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ronald Fischer

    Struts: module relative path puzzle

    Ronald Fischer, Jul 25, 2003, in forum: Java
    Replies:
    0
    Views:
    1,060
    Ronald Fischer
    Jul 25, 2003
  2. Stratocaster
    Replies:
    1
    Views:
    4,865
    bo123
    Nov 18, 2004
  3. Matt
    Replies:
    3
    Views:
    19,666
    Sudsy
    Jul 8, 2004
  4. Michael Bacarella
    Replies:
    26
    Views:
    1,400
    harri
    Nov 20, 2007
  5. Richard

    Solved another part of the puzzle

    Richard, Jan 8, 2005, in forum: Javascript
    Replies:
    1
    Views:
    84
    Richard
    Jan 8, 2005
Loading...

Share This Page