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