include uploaded by a customer html to jsp

Discussion in 'Java' started by Natasha, Dec 17, 2003.

  1. Natasha

    Natasha Guest

    I need to include header into jsp page. This jsp is a SiteMesh
    decorator. The only thing it should do - apply header and footer to
    the output.
    This jsp page decorates pages generated by Struts and Java.
    This header is an html file and uploaded by a customer and it stored
    in URL like:
    /appName/fileservise?upload/header2.html - I used this path when
    access the file from XSL pages and it worked OK.
    How can I reach this file from jsp?

    When I just put those HTMLs inside applicatin using <jsp:include> it
    was OK, that means there is nothing wrong with Sitemesh. I am just not
    expiriensed with JSP.

    I appriciate any help.
    Thanks.
     
    Natasha, Dec 17, 2003
    #1
    1. Advertising

  2. Natasha

    Chris Smith Guest

    Natasha wrote:
    > I need to include header into jsp page. This jsp is a SiteMesh
    > decorator. The only thing it should do - apply header and footer to
    > the output.
    > This jsp page decorates pages generated by Struts and Java.
    > This header is an html file and uploaded by a customer and it stored
    > in URL like:
    > /appName/fileservise?upload/header2.html - I used this path when
    > access the file from XSL pages and it worked OK.
    > How can I reach this file from jsp?
    >
    > When I just put those HTMLs inside applicatin using <jsp:include> it
    > was OK, that means there is nothing wrong with Sitemesh. I am just not
    > expiriensed with JSP.


    The path in jsp:include is context-relative, so if "/appName" is your
    context path, try "/fileservise?upload/header2.html".

    That said, it still may not work because the path you're asking for is
    broken. Why are you using a broken URL like that, as opposed to
    "/fileservise?file=upload/header2.html"?

    --
    www.designacourse.com
    The Easiest Way to Train Anyone... Anywhere.

    Chris Smith - Lead Software Developer/Technical Trainer
    MindIQ Corporation
     
    Chris Smith, Dec 17, 2003
    #2
    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. Matt G
    Replies:
    1
    Views:
    1,185
    Deepak Kumar Vasudevan
    Aug 22, 2003
  2. DigitalUncle
    Replies:
    0
    Views:
    955
    DigitalUncle
    Nov 2, 2004
  3. Replies:
    0
    Views:
    4,464
  4. Andreas Bogenberger
    Replies:
    3
    Views:
    973
    Andreas Bogenberger
    Feb 22, 2008
  5. Replies:
    5
    Views:
    6,024
    Arne Vajhøj
    Aug 28, 2008
Loading...

Share This Page