- This topic has 5 replies, 2 voices, and was last updated 19 years, 10 months ago by Riyad Kalla.
-
AuthorPosts
-
Xavier GORSEMemberHello
In my web project i have some included jsp files which use taglibs
When i edit these files , the validation fails and code assist doesn’t work too.
I think that’s because there are not taglibs declaration in these files.
Is there a solution ?
Thanks
Riyad KallaMemberCan you please post all the information we request in the [URL=http://www.myeclipseide.com/PNphpBB2+file-viewtopic-t-393.html]Posting Guidelines[/URL] thread at the top of this forum? That will give us some context so that we can determine if this is an installation issue, a configuration problem, or a bug. Thanks.
Also I would like to see your <taglib> section from your web.xml file, and the code snippets of the JSP files that are giving you problems.
Xavier GORSEMemberSorry for the posting guidelines
Windows XP SP2
Eclispe ( Version: 3.0.2 – Build id: 200503110845)
My eclipse ( Version: 3.8.4 – Build id: 200501171200-3.8.4)
Fresh install of Eclispe and My eclipse
j2sdk1.4.2_05 & Tomcat 5.0.28I have a main jsp include file with taglibs declaration (inc_java.jsp)
<%@ page language="java" import="java.util.*" %> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
For my index.jsp i have
<%@include file="inc_java.jsp" %> blabla html & taglib code <%@include file="inc_pb.jsp" %>
In this index.jsp validation & code assist work well
but when i edit inc_pb.jsp validation & code assist won’t work
In my web.xml there’s no taglib section
Riyad KallaMemberWhat does inc_pb.jsp look like? You didn’t post it above (your setup looks good though).
Xavier GORSEMemberIt’s look like
<c:if test="${true}"> blabla </c:if>
But the problem is the same when i use a scriptlet in inc_pb.jsp which use some classes imported in inc_java.jsp.
<% TreeMap T = new TreeMap(); %>
Riyad KallaMemberAhh, ok:
1) When a java file only exists to be included in another file and cannot stand by itself as a valid JSP file, it is a JSP segment or fragment. It is suggested by spec to name those files “.jspf”.
2) You won’t get validation or autocomplete in them, which is tradgic but shouldn’t effect you too much as includes don’t change terribly often.
3) If you need validation/autocomplete for your includes, then you must treat them like real JSP pages, you will need into <%@include %> your inc_java.jsp page so your pb page can resolve the types and taglibs. -
AuthorPosts