Paths in JSP Includes

I can successfully use a JSP Include line in my code if the included file is in the same folder as the code, but all attempts to point to another folder on the same server have been unsuccessful.
I need to go "up" four levels and then down three in another directory. I've tried using "..\..\" and also going out to the root and then down - no luck.
Example: my code is in C:\abc\def\ghi\jkl\mno and I need to include a file in C:\pqr\stu\vwx
Any help would be appreciated. Thanks.

that folder needs to be in your web project's context root.
for Example, assume that your web project name is myWeb ( also is the folder Name)
Here your project root is myWeb, and you can only inlude any JSP under myWeb folder, not out side of it.
c:\java\projects\myWeb\jsp\
and you have sub folders under jsp
c:\java\projects\myWeb\jsp\accounts\
c:\java\projects\myWeb\jsp\personal
c:\java\projects\myWeb\jsp\finance

Similar Messages

  • Problem with include and relative path in jsp

    Precompile jsp with wlappc in 9.2, I got the error "The include file was not found" when the jsp use <%@ include file="../includes/dataEntry/code_error.html" %>
              This code used to work with 8.1. I notice that someone has report the same problem with 9.0 and you have patch for it. Is it fix in 9.2 or do I require a patch as well?
              Thanks,
              Khuemy

    When you precompile, can you say "Keepgenerated=TRUE". It might help you track
              down the difference with the URL. You should only get a 404 error when the
              resource is not found at runtime, which is independant of when you compile. The
              difference should be in how the URL is compiled.
              Chris
              ali wrote:
              > I am using WLS 6.0 SP1, when I use relative path in <jsp:forward> in my JSPs
              > it forwards ok if I am using directly JSPs but if I am using pre-compiled
              > JSPs (and have proper servlet-mappings
              > in my web.xml), I get 404 error with the relative-path, if I change it to
              > absolute path with pre-compiled JSPs it forwards ok , then.
              > any ideas why this is so?
              > thanks,
              

  • Relatiive Path problem when using JSP:include in web portlet

    Hi
    I am using Oracle Portal 9.0.2, and thus OC4J as the J2EE platform.
    I have created a JSP web portlet that is supposed to inlude a specific static html file, which name is passed to it using a portlet parameter. It works, but I had to create a symbolic link from the applicable J2EE applications's htdocs directory in order to access the content:
    /j2ee/OC4J_Portal/applications/<application>/htdocs/<portlet>/content/
    where /content/ is a symbolic link to another directory altogether.
    I can then access the content from within the portlet with a JSP include tag that looks like :
    docPath = "/htdocs/<portlet>/html/"+doc_path;
    %>
    <br>Include:
    <jsp:include page="<%=docPath%>" flush="true"/>
    I would like to access the content using the JSP include without having to use the symbolic link. Is there a way to do this. I tried using an Apache alias, but that did not work.
    Regards
    Harry

    Hi
    Thanx
    In the end we build up a static URL to the document to be included using:
    String contentLocation="content/";
    docPath = contentLocation+getAdditionalDocPath();;
    out.println("docPath="+docPath);
    String docPathAndName = portletRequest.getParameter("doc_path");
    %>
    <!--
    This java script function calls the display content page with the
    page parameter doc_path (which is in return passes it to the display
    content portlet) in order to retrieve and display specific document
    with a JSP:include tag
    -->
    <script language="JavaScript">
    function generateSectionPath(docName) {
    this.location="http://<%=portletRequest.getServerName()%>:<%=portletRequest.getServerPort()%>/pls/portal/url/page/<%=getPageGroup()%>/content?doc_path="+"<%=docPath%>"+docName;
    <script language="JavaScript">
    function generateRelativePath(docName) {
    this.location="http://<%=portletRequest.getServerName()%>:<%=portletRequest.getServerPort()%>/pls/portal/url/page/<%=getPageGroup()%>/content?doc_path="+docName;
    </script>
    <br>Include:
    <%
    if (portletRequest.getParameter("doc_path") == null) {
    out.println("Error - no doc path specified");
    } else { 
    try { %>
    <jsp:include page="<%=docPathAndName%>" flush="true"/>
    <% } catch (Exception e) {
    out.println("Error retrieving document:"+e.toString());
    } // end if
    %>
    Each link from one included HTML file to another becomes a JS function that points the browser to the portal page that includes the portlet that includes thwe JSP that has the include tag to include the html document that is to be displayed.
    The current relative path the the html document (from a predefined root in the file system that is symbolically linked to the same directory as where the including JSP lives) is stored in a session variable, and appended to the document name that is passed to the page.
    If a full document path, as opposed to just the name, is stored, that no appending is done. However, the path is stripped out and stored in a session variable.
    Ths thing is, sometimes a document name, and sometimes a path is passed to the page. Therefore the requirement to know the path when it is not available. A name only will always be passed subsequent to a request for a document with the full path specified, therefore the session variable mechanism works.
    Thanx for the input
    Harry

  • JSP:  Include file paths

    Hi;
    I'm using Tomcat 3.2.
    I am trying to use the path "../common/copyright.html" for an include
    path. It isn't working.
    For some reason it seems you can't "go backwards" with a file path
    with Tomcat 3.2/JSP include file paths.
    Is there a way around this or does anyone know anything about it?
    ( I read the specs, they weren't of much help and I couldn't find
    much be searching google.)
    Thanks in advance
    Steve

    Try using the full (or absolute) path. If that does not work, then talk to Tomcat developers. If it does, then look at where the JSP pages lies in relation to the path you are trying to use the "../" method on.
    Example:
    JSP path: www.you.com/jsp/pages/hello.jsp
    Include path: ../jsp/pages/open.jsp
    This will cause an error becuase the path of the JSP page does not exist within the include path.

  • Jsp:include not working - Please Help.

    I am trying to do a jsp:include page but I must have the syntax wrong for the declaration of the filename. There shouldn't be a problem with my included file since it only has the word "TEST" in it. Both files are in the same directory. The error I'm getting is a 404 error.
    Message:File not found: null
    Target Servlet: File Serving Enabler
    StackTrace:
    If you look at the code, you'll see that I am doing two includes, one using the directive and one using jsp:include. The directive one comes up fine but not the jsp:include. Thanks for any help. Here's my code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML><HEAD>
    <META name="GENERATOR" content="IBM WebSphere Page Designer V3.5.3 for Windows">
    <META http-equiv="Content-Style-Type" content="text/css">
    <TITLE>This is the page title</TITLE>
    </HEAD><BODY>
    <center>
    <table border="1">
    <tr>
    <td align="center"><jsp:include page="navigationTest2.html" flush="true"/></td>
    <td align="center"><%@ include file="navigationTest2.html" %></td>
    </tr>
    </table>
    </center>
    </BODY></HTML>

    Yeah I know, I tried that. I did notice that the directive include doesn't accept the path the same way. If I put in the full path /test/navigationTest1.html the compile would tell me couldn't read file, but the path of the file it was trying to read was /test/test/navigationTest1.html. I took the /test out and just left the / and could not read the file in the root dir, of course, because it's in the test dir. So now I have the full path /test/navigationTest1.html in the jsp:include and no path in the directive include and same results.

  • JSP include directive not working with Tomcat 5.0

    Hi.
    I'm developing a small JSF webapp under Tomcat 5.0. My idea was to use the include directive to display a navigation panel on every JSP page.
    I took the code straight from the Java Web Services Tutorial; the resulting page looks like this:
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page"
              xmlns:f="http://java.sun.com/jsf/core"
              xmlns:h="http://java.sun.com/jsf/html"
           version="2.0">
    <jsp:directive.page contentType="text/html;charset=iso-8859-1"/>
    <%@ include file="/jsp/panelpage_header.inc" %>
         <h:outputText value="Welcome!"/>
    <%@ include file="/jsp/panelpage_footer.inc" %>
    </jsp:root>However, when I try to load the page, a compilation error occurrs:
    org.apache.jasper.JasperException: /trias/welcome2.jsp(11,2) The content of elements must consist of well-formed character data or markup.
         org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
    ...I checked the path to the included files, and it seems to be okay. The files themselves contain the JSF tags for the view, html-head, html-body etc. The compiler doesn't even care if the files exist or not because it aborts immediately when it reaches the first include-statement.
    Did anyone see this kind of error before?

    Ok, the solution with jsp:directive.include works,
    if header.inc and footer.inc themselves are well
    formed too. If I understood the concept right this is
    because header and footer are processed during
    request time and therefore interpreted as
    'standalone' pages.This isn't true. The include directive (<jsp:directive.include>) is run a Compile Time. The code is inserted directly into the surrounding JSP (unlike <jsp:include> which forwards the request at runtime). The finished JSP, after the include, is then processed and needs to be well-formed XML.
    >
    But: What can I do when these two files define a tag
    that should enclose my current page (for example,
    header opens a panelGrid-Tag, and footer closes it).
    For this case I thought the use of the
    @include-directive would be neccessary to combine the
    three pages during compilation. By this the resulting
    page would be well-formed although header and footer
    are not.It should be, as long as you are using <jsp:directive.include>, and the rest of the included pages are also well formed (no <% %> tags, nothing else out of place...).
    Honestly, I haven't done much work with JSP documents, so I haven't run into this problem. But I do believe everything I said is correct.
    What I would do is double check the correctness of the rest of the included pages and see if your error isn't something else.

  • Using jsp:include in iPlanet6SP2

    I'm trying to include a common jsp file, say [proj_common]/common.jsp, from
    another jsp file, say [proj_parent]/parent.jsp, using <jsp:include>. After
    deployment both files sit under their respective folders (for example in
    c:\iplanet\ias6\ias\APPS\modules) as [proj_common]/common.jsp and
    [proj_parent]/parent.jsp. I've included a relative path from [proj_parent]
    to [proj_common], and here's the code I've added in
    [proj_parent]/parent.jsp:
    <jsp:include page="../[proj_common]/common.jsp">
    <jsp:param name="p1" value="v1"/>
    </jsp:include>
    I'm using only static HTML in common.jsp as a test. The following error then
    occured when I view [proj_parent]/parent.jsp :
    500 SC_INTERNAL_SERVER_ERROR
    Error: 500 SC_INTERNAL_SERVER_ERROR
    javac error:
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:1: Identifier expected.
    package jsp.APPS.[proj_parent]....[proj_common];
    ^ (pointing under 2nd dot of ....)
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:11: Superclass HttpServlet of
    class common not found.
    public class common extends HttpServlet {
    ^ (pointing under HttpServlet)
    2 errors
    I believe this is not a path error (since that error explicitly tells me the
    included file cannot be found). I have read other previous messages and
    learn that there is a problem with <jsp:include> and relative paths... Also
    a test when both files are in the same directory shows no problem at all. Is
    there a solution to this problem of parsing relative paths in SP2?
    Thanks and regards,
    Anthony Yuen

    Another strange thing happened:
    We have been including html and jsp files. From a certain point the system was
    not able to include html files. When we renamed html includes to jsp, it was
    working again.
    Has anyone experienced the same thing?
    Does anyone know the resolution?
    Regards,
    Gyorgy
    Anthony Yuen wrote:
    I'm trying to include a common jsp file, say [proj_common]/common.jsp, from
    another jsp file, say [proj_parent]/parent.jsp, using <jsp:include>. After
    deployment both files sit under their respective folders (for example in
    c:\iplanet\ias6\ias\APPS\modules) as [proj_common]/common.jsp and
    [proj_parent]/parent.jsp. I've included a relative path from [proj_parent]
    to [proj_common], and here's the code I've added in
    [proj_parent]/parent.jsp:
    <jsp:include page="../[proj_common]/common.jsp">
    <jsp:param name="p1" value="v1"/>
    </jsp:include>
    I'm using only static HTML in common.jsp as a test. The following error then
    occured when I view [proj_parent]/parent.jsp :
    500 SC_INTERNAL_SERVER_ERROR
    Error: 500 SC_INTERNAL_SERVER_ERROR
    javac error:
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:1: Identifier expected.
    package jsp.APPS.[proj_parent]....[proj_common];
    ^ (pointing under 2nd dot of ....)
    c:\iplanet\ias6\ias\APPS\modules\[proj_parent]\WEB-INF\compiled_jsp\jsp\APPS
    \[proj_parent]\..\[proj_common]\common.java:11: Superclass HttpServlet of
    class common not found.
    public class common extends HttpServlet {
    ^ (pointing under HttpServlet)
    2 errors
    I believe this is not a path error (since that error explicitly tells me the
    included file cannot be found). I have read other previous messages and
    learn that there is a problem with <jsp:include> and relative paths... Also
    a test when both files are in the same directory shows no problem at all. Is
    there a solution to this problem of parsing relative paths in SP2?
    Thanks and regards,
    Anthony Yuen

  • Jsp:include an html file in a subdir

    I have the following directory structure and files
    $CONTEXT/articles.jsp
    $CONTEXT/articles/article1.html
    $CONTEXT/articles/images/image01.gif
    When I browse to
    http://$SERVER/$CONTEXT/articles/article1.html
    the article and its image display fine. The file article1.html references the image via an href to "images/image01.gif".
    However, when I try to access the article from articles.jsp via a <jsp:include page="articles/article1.html" flush="true"/>, the article1.html can't find its image. Obviously this is a problem with the relative path to the image.
    I want to be able to correctly view article1.html from directly browsing it and from including it from articles.jsp. How can I include the article1.html from articles.jsp and somehow allow article1.html to find its images? Is this possible?
    Best regards and thanks,
    John

    I have just tried what you say doesn't work, but I have no problem getting it to work. You may want to check your syntax.
    My directory structure is as follows
    SERVERNAME/CONTENT/jspinclude.jsp
    SERVERNAME/CONTENT/inc/inc.html
    SERVERNAME/CONTENT/inc/images/myimage.gif
    my jsp file looks like this:
    <HTML>
    <HEAD>
    <TITLE>Untitled Document</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY bgcolor="#FFFFFF" text="#000000">
    This is a test of a jsp.include
    <jsp:include page="inc/inc.html" flush="true" />
    </BODY>
    </HTML>
    my html file looks like this
    <HTML>
    <HEAD>
    <TITLE>Untitled Document</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </HEAD>
    <BODY bgcolor="#FFFFFF" text="#000000">
    <P>This is some sample text</P>
    <P><IMG src="images/myimage.gif"> </P>
    </BODY>
    </HTML>
    This seems to work fine. Perhaps the problem exists somewhere else.
    Rob

  • Using variables in jsp:include

    Hello,
    I'm still working wih the JSP 1.2 specs and I want to use a variable in my jsp:include.
    For example <jsp:incude page="${vUrl}/>
    Where vUrl is defined as
    <c:url value="/doesnotmatter" var="vUrl"/>
    Something like that ...
    I also tried to nest a <c:out> withing my <jsp:include> tag but without success.
    Thanks in advance ...

    u can do it like this:
    <jsp:include flush="true" page='<%=path%>' />

  • Nested jsp:include includes wrong file

    Hi,
    I've encountered a somewhat strange problem that's upsetting me for more than 3 hours by now. I've searched on the Web, Usenet, Tomcat Bugzilla, and the java.sun.com forums, but still didn't find a solution.
    Let me explain my current JSP/servlet flow:
    A servlet retrieves an article from a database, puts the article data into a bean, sets that bean as request attribute and includes a JSP to display the content of this bean (your basic MVC pattern). This works fine.
    The page being included by the "retrieve" servlet is actually a layout page (index.jsp) including the JSP (article.jsp) which displays the bean data, so the servlet actually includes "index.jsp?c=article.jsp" (with the bean as request attribute).
    In that index.jsp, there's a jsp:include that should include the output from another MVC-style servlet/JSP-block: Servlet "poll" creates a PollBean from a database, puts that as attribute into the request and includes "polls/show.jsp".
    Here's a simplified representation of my page layout:
    +---------+---+       The outer box is the "index.jsp", which
    |         |   |      
    |         |   |       a) includes the servlet "retrieve"
    |    1    | 2 |          which in turn includes "article.jsp"
    |         |   |          at position 1 and
    |         |   |
    |         |   |       b) includes the servlet "poll"
    |         |   |          which in turn _should_ include "polls/show.jsp"
    |         |   |          at position 2
    +---------+---+Well now, my problem is: Somehow Tomcat manages it to include the "article.jsp" TWICE at position 1 AND 2, although the jsp:include at positon 2 reads (that's hardcoded):
    <jsp:include page="/poll?action=latest&limit=1" />
    And in the PollServlet (as you guess, mapped to "/poll") the file to be included is hardcoded to "polls/show.jsp".
    If there wouldn't be anything included at position 2, that would pretty clearly be an error with wrong relative paths used in the jsp:include at position 2. But what really scares me is that the "article.jsp" get's included at position 2 although some debugging statements show that the PollBean is actually in the request after the jsp:include at position 2 has been executed.
    I just don't get it why "article.jsp" is included twice, and although the poll servlet is called, the "polls/show.jsp" doesn't show up anywhere.
    I've tried to flush the "out"-JSPWriter of "index.jsp" at several different key locations in the code, even flushed() in the PollServlet after including "polls/show.jsp" but that didn't help.
    If you need some proof of this weird behavior, ask in this thread and I'll post the link the website where that happens.
    Thanks in advance,
    phil

    Try deleting all the compiled JSPs (usually in a
    directory called "work") then requesting the pageThat's what I did, too. I've gone through the whole make-Tomcat-start-all-over procedure:
    - reloaded via webapp manager: nope
    - stopped/started via webapp manager: nope
    - clear /work/ directory and restarted Tomcat: nope
    Didn't help anything.
    Have you debugged your PollServlet to see if it's
    returning/including the right (hard-coded) page?Mmh.. What should I debug there? There's not much to debug, if stuff is hard-coded like ...
    I just found the error in my code! duh I was just looking in Eclipse for a piece of code to post here when I saw my mistake:
    The CMS I'm currently adding the poll feature to is more flexible than I thought (and that although I wrote it myself!):
    The article-retrieve servlet is called by this URL:
    /retrieve?nextPage=article.jsp&id=12345And my poll servlet is called by
    /poll?action=latest&limit=1Normally this would include the "polls/show.jsp" from the PollServlet because the code in PollServlet reads:
    // Use nextPage from request or show by default
    nextPage = request.getParameter("nextPage");
    if(nextPage == null) nextPage = "polls/show.jsp";But when the PollServlet got called from the "index.jsp?c=retrive&nextPage=article.jsp&id=123" page, there actually was a "nextPage" param and it's value was "article.jsp". And because there was still an ArticleBean in the request (from the ArticleRetrieveServlet), this "article.jsp" included by the PollServlet displayed the article a second time.
    I fixed it by including my PollServlet's output with the "nextPage" parameter explicitly set:
    /poll?action=latest&limit=1&nextPage=polls/show.jsp
    The other way to test is to change your hard-coded
    page to some arbitrary HTML page so you know that at
    least it IS being included.That's something I didn't think about :)
    The other thing to test is to request this page
    (action) directly. So type
    /poll?action=latest&limit=1 into the browser and see
    what you get.Already did that, no problems.
    Sorry I can't be of more help... but I would bet the
    farm that it's not a problem with Tomcat.You're right. I'd really be shocked to have me find 2 bugs in Tomcat within the last to weeks (although the bug was already fixed in a newer version of Tomcat)
    Also... You may want to consider using Struts for your
    MVC if you can.Lots of people keep telling me that, but I'll want to do a general cleanup of the code first - maybe then I'll convert to Struts. After all I'm a freelancer and currently don't have time to learn Struts.
    Thanks for your help,
    phil

  • jsp: include cannot relate to css

    I created a jsp file (navigator.jsp) which uses css and it worked alright. I tried to include navigator.jsp in another jsp file namely layout.jsp.....The code of layout.jsp looks some thing like this
    <body>
    <jsp:include page="navigator.jsp" flush="true"/>
    </body>.
    When layout.jsp is run, the contents of navigator.jsp gets displayed without the effect of the css. In other words the css file is completely ignored. Is there anything to add in layout.jsp? Please help.

    Check out properly. This is the error you are facing shear coz of linking of css. As it is working with inline css.
    May be some problem with your code, just check the view source. One more sugg, download your css from the same path you are giving in linking css.
    example : /check.css
    then : http://example.project.com/exampleproject/check.css and check it wheather it is accessible from there. then paste the same path in jsp file which you are embedding into second jsp.
    It should work. And dont worry about marking thread answer, when you feel your answer properly answered then only think about it
    Cheers
    Sachin Kokcha

  • Include using jsp:include for a file from the docroot directory.

    Hello,
    I try to include one file from the doocroot but only can import files from the context (War deployed).
    when I put
    <jsp:include page="/foo.htm">
    to include this file: http://www.mydomain.com/foo.html
    it try to show this file: http://www.mydomain.com/mycontext/foo.html
    it puts ever the context before the name of my file.
    How can I include this file.
    Thanks
    PD: obviously 'foo.html' is in the doocroot.

    From within a JSP you have a reference to a PageContext called pageContext. This has a method getServletContext(). From the ServletContext you can find the real path the servlet lives in. So...
    File basePath = new File(pageContext.getServletContext().getRealPath("/"));Now basePath contains your path $Catalina/webapps/webservices. Then it's just a matter of working relative to that, e.g.:
    File usersFile = new File(basePath, "users.txt");

  • Jsp include not finding header and footers in EAR

              Background:
              WL 6.0 sp1 (upgrading from WL 5.1)
              EAR file with multiple JAR's and one WAR
              Problem:
              The include tags within the jsp's do not find the pages. All the jsp's work as
              well as links, but includes do not pull up information. In our current setup
              we have includes with the relative path "../includes". This will work in an exploded
              EAR and WAR but not in the contained state (as well as in WL 5.1). For it to
              work in actual WAR and EAR files the relative path would have to be just "includes"???
              Is there something that can be done to remedy this??
              thanks sam.
              

              Background:
              WL 6.0 sp1 (upgrading from WL 5.1)
              EAR file with multiple JAR's and one WAR
              Problem:
              The include tags within the jsp's do not find the pages. All the jsp's work as
              well as links, but includes do not pull up information. In our current setup
              we have includes with the relative path "../includes". This will work in an exploded
              EAR and WAR but not in the contained state (as well as in WL 5.1). For it to
              work in actual WAR and EAR files the relative path would have to be just "includes"???
              Is there something that can be done to remedy this??
              thanks sam.
              

  • Capture output of Perl script with jsp:include

    The company's main web site has a CGI script written in Perl that generates a header, and another one that generates a footer. I would like to deploy a JSP that incorporates the header and footer without having to re-implement the header/footer Perl code in Java.
    Can the <jsp:include> tag include the output from these Perl scripts?

    Well, I tried it. The answer seems to be no.
    I created a simple CGI hello-world thingie and tested it, works fine from a browser (I'm doing all this remotely on a friend's Gentoo box so I know it's not just cached in my browser or anything).
    Then I created a simple JSP and used a fully-qualified URL pointing to the executable CGI script. While the JSP compiles and renders (I had some text in the JSP itself too), the part where it's supposed to include the content of the Perl script doesn't even appear.
    I also tried putting the CGI script into my webapp directory and specifying a relative path to the script, and it doesn't seem to get executed either. To confirm that I'm doing everything right, I put together a simple HTML file that has the same output and changed the "page" attribute to point to that file instead. Sure enough, the output appears.
    So the answer to my question appears to be: no, the output of a Perl CGI cannot be included into a JSP with the <jsp:include> tag. But I'm going to double-check on the Tomcat-user mailing list.

  • Jsp:include strange behaviour

    Hi All
    I have a file called bottom.jsp and I want to include this file in all other jsp files in my site. This works fine for the pages that are in the same dir as bottom.jsp but for other pages that have not the same dir as bottom.jsp the links in the bottom.jsp do not refer to their correct destinations anymore.
    All helps appreciated.

    Hi,
    try changing the link in the header.html which points to target.jsp and make it relative to your application root..... then you can use it in any directory...
    header.html in D:\Tests\Web\HeaderTest
    <div align="center">Link</div>
    Hope this works :-)
    Hi Again
    But it seems that your suggestion is not working (or
    maybe something's wrong again with me). My Directory
    structure is:
    D:\Tests
    ���\Web
    ������\HeaderTest
    ���������\
    EB-INF
    ���������\
    ub
    and I have defined a Context in Tomcat like this:
    <Context
         path="/headertest"
         docBase="D:\Tests\Web\HeaderTest"
         debug="0"
         privileged="true"
    />
    and my files are:
    header.html in D:\Tests\Web\HeaderTest
    <div align="center"><a
    href="target.jsp">Link</a></div>
    target.jsp in D:\Tests\Web\HeaderTest
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt
    ">
    <%@ page contentType="text/html; charset=utf-8"
    language="java" import="java.sql.*" errorPage="" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    </head>
    <body>
         Sample Page
    </body>
    </html>
    index.jsp in D:\Tests\Web\HeaderTest\sub
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
    Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dt
    ">
    <%@ page contentType="text/html; charset=utf-8"
    language="java" import="java.sql.*" errorPage="" %>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    </head>
    <body>
         <%@include file="/header.html" %>
    </body>
    </html>
    I have also tried the jsp:include action but again I
    can't get it working. When I include the header.html
    file, I want the link to refer to the
    http://localhost:8080/headertest/target.jsp but I
    don't know why it refers to
    http://localhost:8080/target.jsp which is not
    available.
    Any ideas?
    Lots of thanks again.

Maybe you are looking for

  • Data load to Cube

    Hi All, I am new to SAP BI, I am trying loading data from data source to DSO and then from DSO to a Cube. I am getting data in DSO, but when I run DTP for DSO to cube the data does not come in cube. There is no status message for error while executin

  • Quicktime 7.3 Overrun error

    I upgraded to 7.2 then did the 7.3 Quicktime + iTunes update right after now I am unable to start iTunes or Quicktime. Here is the error I receive when starting Quicktime http://blacktemplars.org/files/quicktime/overrun_error.png I tried uninstalling

  • Attachment from SUS to ERP

    Hello All, We have SUS-MM integration implemented. We would like to know if anyone has implemented attachment from SUS to MM. Thanks, Ajay

  • Dangers of Working on Two Machines?

    Are there any inherent problems in maintaining a copy of my iWeb "domain" file on two machines? Do they both get updated every time i open iWeb? Must the "second" copy be saved in my home folder's Library/Application/Support/iWeb/ folder ?? All is wo

  • TS3694 how to solve 1015 error message

    how to solve 1015 error messege