File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes Problem in JSP compilation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in JSP compilation" Watch "Problem in JSP compilation" New topic
Author

Problem in JSP compilation

Ramesh Shanmugam
Ranch Hand

Joined: Sep 13, 2004
Posts: 132
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


Ramesh Shanmugam - SCJP 1.5
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41182
    
  45
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?


Ping & DNS - my free Android networking tools app
Ramesh Shanmugam
Ranch Hand

Joined: Sep 13, 2004
Posts: 132
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

Joined: Nov 24, 2005
Posts: 14687
    
  16

Are you sure the parameters are correct ?
method a(int,java.lang.String)


[My Blog]
All roads lead to JavaRanch
Ramesh Shanmugam
Ranch Hand

Joined: Sep 13, 2004
Posts: 132
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

Joined: Sep 13, 2004
Posts: 132
and another things is all other methods from that file are accessable. Only this method creates a Problem.
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
Post the part of the method code and the JSP code that access that method.


Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in JSP compilation
 
Similar Threads
ARRRGGGGHHH - Stupid Javabeans - Again! :(
Package not found error in JSP
getRemotePort() and getLocalPort() error
Problems of importing a class
Changing ClassPath