- This topic has 8 replies, 2 voices, and was last updated 19 years, 11 months ago by mackking.
-
AuthorPosts
-
mackkingMemberIf I do JSP validation on the following code:
<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html" %> <%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html:html> <head> <title>My JSP 'testing.jsp' starting page</title> </head> <body> This is my JSP page. <br> <html:form action="someting" > <html:submit>Submit</html:submit> </html:form> </body> </html:html>
I get the following validation errors:
<html:html> cannot resolve symol: symbol : method doAfterBody() <html:form> cannot resolve symol: symbol : variable EVAL_BODY_AGAIN <html:submit> cannot resolve symol: symbol : variable EVAL_BODY_AGAIN
I should mention that the Eclipse project this code is under is not an “original” MyEclipse project, but one that has had WebProject Capabilities added to it.
Project directory structure is as follows:
<project>/ /src /web /web/jsp /web/WEB-INF
When I added the WebProject Capabilities, I set the Web-Root folder to be ‘web’.
Any help would be appreciated as we are seeing these misleading errors on ALL our JSPs, for both Struts tags as well as our own custom tags.
Version Details:
Eclipse: 3.0.1
MyEclipse: 3.8.2+QF20041020
Riyad KallaMemberMack,
Please read this post to better understand what the URI for taglibs is used for and how it is resolved: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-31.html#251
mackkingMemberOK, but we’ve got the following IN our web.xml
<!-- Template Tag Library Descriptor --> <taglib> <taglib-uri>/WEB-INF/tld/security.tld</taglib-uri> <taglib-location>/WEB-INF/tld/security.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/tld/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/tld/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/tld/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/tld/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/tld/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/tld/struts-logic.tld</taglib-location> </taglib>
Should this mean that the TLDs would get picked up by rule #1 from the FAQ?
Riyad KallaMemberI think I was barking up the wrong tree:
<html:html> cannot resolve symol: symbol : method doAfterBody()
<html:form> cannot resolve symol: symbol : variable EVAL_BODY_AGAIN
<html:submit> cannot resolve symol: symbol : variable EVAL_BODY_AGAINIs your struts.jar file in your Java Build Path under your Library tab? Does this project build correctly if you rrebuild the entire thing?
mackkingMember@support-rkalla wrote:
I think I was barking up the wrong tree:
Is your struts.jar file in your Java Build Path under your Library tab?
Yes.
Does this project build correctly if you rrebuild the entire thing?
Yes.
Riyad KallaMemberCan you create a little sample project that exhibits this behavior and use FIle > Export > ZIP and send it to support@genuitec.com and reference this thread?
mackkingMemberStrangely enough, that’s proving harder then you’d think. *sigh*
I have just witnessed a different error message though. On the <html:html> of the same jsp I got the following:
handlePageExcetion(java.lang.Exception) in javax.servlet.jsp.PageContext cannot be applied to (java.lang.Throwable): if(_jspx_page_context != null) _jspx_page_context.handlePageException(t);
mackkingMemberStrangely, if I do a “Remove Validation Markes” and then re-validate the JSP, the error on the <html:html> tag reverts back to the doAfterBody error.
mackkingMemberI guess you can close this thread now, I’ve figured out the problem.
We have a support project in Eclipse that contains the various JARs we compile against in them. As it turns out, there were 2 different versions of servlet.jar in there, and depending on which one you had set for the classpath you either would, or wouldn’t get the validation errors on the JSP.
I’m guessing the problem JAR is an older version that supports an older Servlet or JSP standard, but the JAR isn’t named very informatively, and the Manifest file is useless.
Thanks for the help guys.
-
AuthorPosts