?
Solved

JasperException in netbanes n tomcat

Posted on 2009-07-15
24
Medium Priority
?
555 Views
Last Modified: 2013-12-14
Hi all,
 i'm developing one struts application and uing Netbeans 6.1.
when i run the application i'm getting below error some times. som times its working.
what could be the problem? can any one help me out..

org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 22 in the generated java file
The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory

Stacktrace:
      org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
      org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
      org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:316)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:294)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:281)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)

0
Comment
Question by:websyn
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 13
  • 9
  • 2
24 Comments
 
LVL 92

Expert Comment

by:objects
ID: 24866389
check you don't have any javaee jars in your project, they will conflict with tomcats classes
0
 

Author Comment

by:websyn
ID: 24866710
i did not get you, could you please explain me more clear since i'm new to java
0
 
LVL 92

Expert Comment

by:objects
ID: 24866717
what jars are currently in your projects build path?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:websyn
ID: 24866836
there are sevral files ,   activation.jar
commons-beanutils.jar
commons-collections.jar
commons-dbcp-1.2.1.jar
commons-digester.jar
commons-fileupload.jar
commons-lang.jar
commons-logging.jar
commons-validator.jar
cos.jar
jakarta-oro.jar
junit.jar
log4j-1.2.6.jar
mail.jar
ojdbc14.jar
struts.jar
unittest.jar
jxl-2.6.jar....
0
 
LVL 92

Expert Comment

by:objects
ID: 24866857
they all look ok, is that the lot?
0
 

Author Comment

by:websyn
ID: 24866868
then what could be the problem?
0
 
LVL 28

Expert Comment

by:rrz
ID: 24875374
>The method getJspApplicationContext(ServletContext) is undefined for the type JspFactory  
Since the method getJspApplicationContext is new in  JavaServer Pages 2.1 , you must use Tomcat 6  
In NetBeans  go to Tools | Servers   and   add or select Tomcat 6
0
 

Author Comment

by:websyn
ID: 24876228
i'm using TOMCAT 6.0.16, its already set to to that version
0
 
LVL 28

Expert Comment

by:rrz
ID: 24880852
Maybe objects had the right idea. What jars are in your web app's /WEB-INF/lib   folder  ? Is there just one  jsp-api.jar in Tomcat's  lib folder ?  
0
 

Author Comment

by:websyn
ID: 25352235
priblem  solved
0
 
LVL 92

Expert Comment

by:objects
ID: 25352320
what was the problem?
0
 

Author Comment

by:websyn
ID: 25352343
dont know exactly but i cleared memoery and uninstall n installed the netbeans and created new project and copied src file to that project solved the problem
0
 
LVL 92

Expert Comment

by:objects
ID: 25352376
which would have reloaded the required jars
0
 

Author Comment

by:websyn
ID: 25354389
If i add any new lib to app again i'm getting this err.
so can u tell me how to add lib to web app in Netbeans 6.1.
0
 
LVL 92

Expert Comment

by:objects
ID: 25354399
how and what are you adding?
0
 

Author Comment

by:websyn
ID: 25354411
going to properties -> Select Libraries -> Add JAR/Folder and adding the jar file.
for example i need to add commons-fileupload-1.2.1.jar file. when i add this jar and run the application again i'm getting the error
0
 

Author Comment

by:websyn
ID: 25362481
objects, can u plz help me
0
 

Author Comment

by:websyn
ID: 25362482
objects, can u plz help me
0
 
LVL 92

Expert Comment

by:objects
ID: 25362556
I don't actually use NetBeans but will do my best

> going to properties -> Select Libraries -> Add JAR/Folder and adding the jar file.

properties of what exactly?
0
 

Author Comment

by:websyn
ID: 25362577
Properties of project
0
 
LVL 92

Expert Comment

by:objects
ID: 25362796
Does the jar appear in the Libraries folder of your project
0
 

Author Comment

by:websyn
ID: 25362802
s, its apperaing.
0
 
LVL 92

Accepted Solution

by:
objects earned 1500 total points
ID: 25362970
how are you running it on tomcat?
0
 

Author Closing Comment

by:websyn
ID: 31604096
no comments
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
How to install Selenium IDE and loops for quick automated testing. Get Selenium IDE from http://seleniumhq.org Go to that link and select download selenium in the right hand column That will then direct you to their download page. From that p…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
Suggested Courses
Course of the Month7 days, 22 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question