• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

calling java file from jsp

 
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
i am quite new to jsp. my aim is to call a java method from jsp but it gives compile time error. The code is:





And the WriteLog class file is in WEB-INF/classes folder.
The error given is---> cannot resolve symbol WriteLog

help appreciated
cheers
amal shah
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You'll need to import the WriteLog class.
 
amal shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
what i infer from your statement is to put WriteLog class in a package say "abc" and the abc folder in WEB-INF/classes folder and have a import statement. But still it say's---> cannot resolve symbol.

help appreciated
cheers
amal shah
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does the import statement look like? Have you restarted the web app since putting the class file into the WEB-INF/classes/abc directory?
 
amal shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello,



i did restart the tomcat....but still it gives the same compile time error

help appreciated
cheers
amal shah
 
Ranch Hand
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi amal

you must put your WriteLog.class file in that folder
not WriteLog.java file so please check onto it.........
may this solves your problem........



Dhwani:>Swimmers never weep.
 
amal shah
Ranch Hand
Posts: 92
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,
of-course,class file was put into it...i.e. WEB-INF/classes/abc folder....not able to solve the problem..


help appreciated
cheers
amal shah
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by amal shah:
...of-course,class file was put into it...i.e. WEB-INF/classes/abc folder...



This implies that it should be obvious to everyone that you put the class file in that directory. Since, in your first post, you wrote "And the WriteLog class file is in WEB-INF/classes folder." it is anything but obvious.
See AvoidRedHerrings to find out how you have just wasted the time of those trying to help you.

Maybe there are some other details that you haven't mentioned yet?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic