• Post Reply Bookmark Topic Watch Topic
  • New Topic

error while calling a class file from jsp

 
prriya pratheep
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
From my JSP page I am calling a function of a java class .I am getting error .


My jsp page where calling is



My class program

I am getting error

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

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

An error occurred at line: 13 in the jsp file: /barCodeProcess.jsp
Generated servlet error:
The method fetchData() is undefined for the type barCodeClasss1


org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:84)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:328)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:397)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:288)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:267)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:255)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:556)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:293)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


note The full stack trace of the root cause is available in the Apache Tomcat/5.5.9 logs.


--------------------------------------------------------------------------------
Help please
Regards
[ August 04, 2008: Message edited by: prriya pratheep ]
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65524
105
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to use UBB code tags when posting code to the forums. Unformatted code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please read this for more information.

You can go back and change your post to add code tags by clicking the .
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only scenario that comes to mind is that you have not recompiled your barCodeClasss1 and put it in the classes folder after addition of the fetchData() method.

Also "barCodeClasss1" with 3 's' is not a really good name for a class, it only leads to more typing errors and reduces readability.


Hope this helps
 
prriya pratheep
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Amit Ghorpade

Thank you for the nice suggestion.Actually I used this name for testing purpose.

I am using eclipse.Hope it will automatically compile.After that i copy the class file to company server and run there

Regards
 
Amit Ghorpade
Bartender
Posts: 2856
10
Fedora Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hope it will automatically compile.


Without any user interaction?

Just check if recompiling and recopying the file works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!