Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

JasperException in netbanes n tomcat

Posted on 2009-07-15
24
Medium Priority
?
557 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
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.
Suggested Courses

610 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