• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem in JSP compilation

 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I have a JSP file from where i call a Java File. in the java file i have a mothod a(). When method was invoked in JSP it gives Error. but i could able to access all other methods from that java file.

Here is the Error i get when i compile the JSP page.
org.apache.jasper.JasperException: Unable to compile class for JSP

An error occurred at line: -1 in the jsp file: null

Generated servlet error:
[javac] Since fork is true, ignoring compiler setting.
[javac] Compiling 1 source file
[javac] Since fork is true, ignoring compiler setting.
[javac] D:\Tomcat 4.1\work\Standalone\localhost\myProj\List_jsp.java:332: cannot resolve symbol
[javac] symbol : method a(int,java.lang.String)
[javac] location: class.com.Newjava
[javac] latestMessages = new1.a(startNo,strFlag)
[javac] ^
[javac] Note: D:\Tomcat 4.1\work\Standalone\localhost\myProj\List_jsp.java uses or overrides a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 1 error
 
Ulf Dittmer
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Without seeing the JSP source it's rather hard to diagnose what might be going wrong. Since adding that method, have you recompiled the class, copied it into an appropriate location in WEB-INF/classes and restarted the web app?
 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Ulf Dittmer,

i have recompiled the class and removed the old class and placed the New class into the web-inf classes folder. Done twice. But still the same problem exists.

Thanks in advance
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure the parameters are correct ?
method a(int,java.lang.String)
 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes the parameters are correct. I have tested it with my system. it works fine. When i move it to another system it creating problem.

BTW both the systems have same configurations like same Tomcat version ,Same JDK version etc...
 
Ramesh Shanmugam
Ranch Hand
Posts: 132
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and another things is all other methods from that file are accessable. Only this method creates a Problem.
 
Vishnu Prakash
Ranch Hand
Posts: 1026
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Post the part of the method code and the JSP code that access that method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic