Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Problem in JSP compilation

 
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
 
Rancher
Posts: 43016
76
  • 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
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • 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.
 
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.
 
    Bookmark Topic Watch Topic
  • New Topic