facebook

can’t reference other files in WEB-INF in a given jsp

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #248926 Reply

    piampri
    Member

    Hi,

    I’m getting an error when trying to include a reference to another jsp within a particular jsp using the include directive. Here is the code fragment:

    <%@include file=”/WEB-INF/footer.jspf”%>

    where footer.jspf is a jsp fragement located in the said location. Does anyone know why I end up getting this error thrown:

    Severity Description Resource In Folder Location Creation Time Id
    2 File “/WEB-INF/footer.jspf” not found. NOTE: No JSP line number was avaliable so line 1 was used for the marker. welcome.jsp Jsp_Ex02 line 1 March 19, 2006 8:27:56 PM 268

    Thanks,

    #248956 Reply

    Riyad Kalla
    Member

    Try to use relative paths, so if it’s in the same dir, try just “footer.jspf”

    Also a popular convention is to store all the JSPs under a WEB-INF/jsp directory so they don’t get in the way of your XMLs or TLDs.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: can’t reference other files in WEB-INF in a given jsp

You must be logged in to post in the forum log in