File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes calling bean method in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "calling bean method in servlet" Watch "calling bean method in servlet" New topic
Author

calling bean method in servlet

Ilja Smoli
Ranch Hand

Joined: Dec 02, 2001
Posts: 64
Hi, i guess its newbie question , but im stuck on this
im trying to call javabean method in servlet.
My settings: Tomcat 3.3, classpath set to c:\tomcat\lib\common\servlet.jar\
win2k
bean:

Then i try to call method getQuery in servlet:

Servlet compilation gives error:
Mega.java:12: cannot resolve symbol
symbol : class aTest
location: class ee.lynx.ladu.Mega
aTest lala = new aTest();
^
Mega.java:12: cannot resolve symbol
symbol : class aTest
location: class ee.lynx.ladu.Mega
aTest lala = new aTest();
^
2 errors

Any suggestions?
thx in advance..
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
You have to add the path to your package to your classpath.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Krishna Srinivasan
Ranch Hand

Joined: Jul 28, 2003
Posts: 1844

set ur classpath properly.& then try it.


Krishna Srinivasan
Spring Tutorials, OCAJP Mock Questions, 400+ OCPJP Mock Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: calling bean method in servlet
 
Similar Threads
compilation error while running simple servlet code
error with compiling servlet
what's wrong with this?
servlet will not compile aargh
How to solve this one