This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes method include not found in class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "method include not found in class" Watch "method include not found in class" New topic
Author

method include not found in class

Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 207
Error(276,1): method include(java.lang.String, boolean) not found in class javax.servlet.jsp.PageContext

Getting this error when I try to compile my JSP on Oracle 10g R3.

On Oracle 10g R2, it works fine.

When double clicked on the error, IDE takes me to the following line.


<jsp:include page="../include/subHeader.jsp" />

I have tried compiling subHeader.jsp, it is compileable independently.

Anyone having any clue?
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 207
The snippet of the servlet that is generated by Oracle 10g R2 is




Couldn't see the servlet generated by Oracle 10g R3, because it deletes the servlet as soon as it finds an error in the generated servlet.

But Yes, Finally I could get hold of the servlet generated by Oracle 10g R3.

Here is the code.



I wrote a batch script which keeps on copying the generated servlet to another location (without any delay).
As soon as the servlet is generated, i copied it.

Well Can someone please make me understand, what was wrong in the <jsp:include tag because developer will not write vendor specific code.>
Yogesh Gandhi
Ranch Hand

Joined: Dec 05, 2008
Posts: 207
I was able to catch the root cause of the problem.

My Jdeveloper had path set of D:\LOSHDB\jars\j2ee.jar which might be older version of j2ee.
(In older version of j2ee, it generates include(String) method in the servlet)


Oracle JDeveloper 10g R3 supports newer version.
I had to add JSP Runtime library to the classpath and keep it on top of j2ee.jar, it made it compile.
(In newer version it generates, include(String, boolean) in the servlet.

Point to Remember :
If you are compiling JSPs using a specific editor, make sure you add JSP Runtime into its classpath.
You will not face problems, what ever version it may be.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: method include not found in class
 
Similar Threads
java lang AbstractMethodError:
bothersome ServletException
failed to generate excel report using jasper report and JSF
cant find constructor in packaged jar
weblogic 8+JNDI