• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

method include not found in class

 
Ranch Hand
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 264
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic