Meaningless Drivel is fun!
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

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\ cannot resolve symbol
[javac] symbol : method a(int,java.lang.String)
[javac] location:
[javac] latestMessages = new1.a(startNo,strFlag)
[javac] ^
[javac] Note: D:\Tomcat 4.1\work\Standalone\localhost\myProj\ uses or overrides a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[javac] 1 error

Ramesh Shanmugam - SCJP 1.5
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
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

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é

Joined: Nov 24, 2005
Posts: 14688

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
I agree. Here's the link:
subject: Problem in JSP compilation
It's not a secret anymore!