• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

class imported but cannot use method

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I created a BankCommons java file, compiled nd packaged the class file under WEB-INF/classes/com/onlinebank/

I imported the class in the jsp file as <@page import="com.onlinebank.BankCommons.*" % >

I ran it through tomcat....the class is being imported..no error there.....but when i try to use one of the method in the class as : BankCommons.update, ...it throws an error that BankCommons cannot be resolved...

Please help!
 
Ranch Hand
Posts: 10191
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try clearing up Tomcat's cache which you can find under the TOMCAT_HOME/Catalina/Work directory.
 
neelesh kumar
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cleared the cache....no effect
 
Joe Harry
Ranch Hand
Posts: 10191
3
Mac PPC Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

neelesh kumar wrote:Cleared the cache....no effect



I do not remember the exact path, but there is a folder with the name of your Webapp that contains all your compiled JSP files. I guess that folder needs to be cleared.
 
Sheriff
Posts: 67269
170
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Advice #1: Stop using Java code in a JSP. Scriptlets have been obsolete for 13 years now. 13 years!

Advice #2: Fix your import statement. It's wrong. (No, I'm not going to tell you how. Try it in a Java class and you'll see the problem.)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!