JasperException in netbanes n tomcat

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)

websynAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mick BarryJava DeveloperCommented:
check you don't have any javaee jars in your project, they will conflict with tomcats classes
0
websynAuthor Commented:
i did not get you, could you please explain me more clear since i'm new to java
0
Mick BarryJava DeveloperCommented:
what jars are currently in your projects build path?
0
PMI ACP® Project Management

Prepare for the PMI Agile Certified Practitioner (PMI-ACP)® exam, which formally recognizes your knowledge of agile principles and your skill with agile techniques.

websynAuthor Commented:
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
Mick BarryJava DeveloperCommented:
they all look ok, is that the lot?
0
websynAuthor Commented:
then what could be the problem?
0
rrzCommented:
>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
websynAuthor Commented:
i'm using TOMCAT 6.0.16, its already set to to that version
0
rrzCommented:
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
websynAuthor Commented:
priblem  solved
0
Mick BarryJava DeveloperCommented:
what was the problem?
0
websynAuthor Commented:
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
Mick BarryJava DeveloperCommented:
which would have reloaded the required jars
0
websynAuthor Commented:
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
Mick BarryJava DeveloperCommented:
how and what are you adding?
0
websynAuthor Commented:
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
websynAuthor Commented:
objects, can u plz help me
0
websynAuthor Commented:
objects, can u plz help me
0
Mick BarryJava DeveloperCommented:
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
websynAuthor Commented:
Properties of project
0
Mick BarryJava DeveloperCommented:
Does the jar appear in the Libraries folder of your project
0
websynAuthor Commented:
s, its apperaing.
0
Mick BarryJava DeveloperCommented:
how are you running it on tomcat?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
websynAuthor Commented:
no comments
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.