facebook

include fails – path or config prob?

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

    Hey guys,

    new to jsp and MyEclipse so bear with me here.

    I’m trying to include a jspf frag in my main jsp (as a header), but it doesn’t appear.
    In my web-app structure, I have placed files in the following places:-

    The jspf fragment (header) -> Gallery/WebRoot/WEB-INF/jspf/Header.jspf

    The image called by the fragment -> Gallery/WebRoot/images/logo.gif

    The main jsp that is trying to include the fragment ->
    Gallery/WebRoot/jsp/adminForm.jsp

    When I preview the header fragment, the logo and text appear as intended, so I’m happy that the frag can find the logo.gif.
    But the problem occurs when I use:

    
    
     <%@ include file="../WEB-INF/jspf/Header.jspf " %> 
    
    

    in the body of the main jsp. It shows no errors but the header content fails to materialise.

    Does anyone know where I went wrong?
    I read that frag files should be kept under WEB-INF/jspf and I know that files under WEB-INF can’t be accessed directly, but it shouldn’t affect internal access, should it?!

    regards,
    Jules

    #228087 Reply

    Riyad Kalla
    Member

    Jules,
    please do not rely on the preview mode to correctly preview heavily processed pages like JSP pages or JSF pages, the preview will get a huge face lift for 4.0 but until then only preview your pages on a running app server with a browser to make sure they are working correctly.

    #228337 Reply

    Riyad,

    ok, thanks for the advice :o)

    Jules

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: include fails – path or config prob?

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