MyEclipse Forums
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
mackking
Post subject: JSP validation generating incorrect errors [Closed]  PostPosted: Nov 29, 2004 - 09:16 PM



Joined: Aug 07, 2004
Posts: 8

If I do JSP validation on the following code:

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:

Code:

<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:
Code:

  <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
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 29, 2004 - 09:21 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Mack,
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

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mackking
Post subject:   PostPosted: Nov 30, 2004 - 03:27 PM



Joined: Aug 07, 2004
Posts: 8

OK, but we've got the following IN our web.xml

Code:

<!-- 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?
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 30, 2004 - 03:49 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

I think I was barking up the wrong tree:
Quote:

<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


Is your struts.jar file in your Java Build Path under your Library tab? Does this project build correctly if you rrebuild the entire thing?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mackking
Post subject:   PostPosted: Nov 30, 2004 - 04:07 PM



Joined: Aug 07, 2004
Posts: 8

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.

Quote:

Does this project build correctly if you rrebuild the entire thing?


Yes.
 
 View user's profile Send private message  
Reply with quote Back to top
support-rkalla
Post subject:   PostPosted: Nov 30, 2004 - 04:17 PM
Registered Member
Registered Member


Joined: Jan 06, 2004
Posts: 23824

Can you create a little sample project that exhibits this behavior and use FIle > Export > ZIP and send it to support@myeclipseide.com and reference this thread?

_________________
Riyad
MyEclipse Support
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
mackking
Post subject:   PostPosted: Nov 30, 2004 - 05:39 PM



Joined: Aug 07, 2004
Posts: 8

Strangely 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:

Code:

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);
 
 View user's profile Send private message  
Reply with quote Back to top
mackking
Post subject:   PostPosted: Nov 30, 2004 - 05:43 PM



Joined: Aug 07, 2004
Posts: 8

Strangely, 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.
 
 View user's profile Send private message  
Reply with quote Back to top
mackking
Post subject: Bah... I've figured it out...  PostPosted: Dec 02, 2004 - 02:06 PM



Joined: Aug 07, 2004
Posts: 8

I 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.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 6 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2004 The PNphpBB Group
Credits