Struts: module relative path puzzle

Discussion in 'Java' started by Ronald Fischer, Jul 25, 2003.

  1. 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!

    For example, the tag <html:image page='foo'> is transformed to the HMTL tag
    <img src='jsp/foo'>. How does Struts know that the module path is 'jsp'?

    I looked at web.xml and found that the feature of having different modules
    is not used at all. There is only a single entry

    <init-param><param-name>config</param-name>....</init-param>

    but no init-param of the form, say, config/jsp. I guess that struts considers
    this as a degenerated case consisting of one and only one module.

    I also looked at the struts-config files mentioned in the config entry, but
    it consists only of form bean definitions and various action mappings.
    Nowhere is the jsp directory mentioned.

    Could some friendly soul help me to solve the puzzle?

    Ronald
    Ronald Fischer, Jul 25, 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
    Replies:
    0
    Views:
    511
    Ronald Fischer
    Aug 28, 2003
  2. Stratocaster
    Replies:
    1
    Views:
    4,808
    bo123
    Nov 18, 2004
  3. Matt
    Replies:
    3
    Views:
    19,503
    Sudsy
    Jul 8, 2004
  4. Thomas Guettler
    Replies:
    3
    Views:
    740
    Andrei
    Oct 27, 2003
  5. Oren
    Replies:
    1
    Views:
    523
    Michael D. Ober
    Apr 29, 2007
Loading...

Share This Page