| Author |
Setting Classpath ??? Urgent ! :(
|
Rajeev Ravindran
Ranch Hand
Joined: Aug 27, 2002
Posts: 455
|
|
hi all, im facing a problem with setting the classpath on Tomcat 4.0.. hmm lemme explain it. I kept a servlet inside the package test.common the name of the servlet is GenerateMenu.java ie the servlet path is ..web-inf/classes/test/common/GenerateMenu.java. I want to use a JavaBean to store some values.. i kept the Bean (MenuBean.java) inside classes directory .ie the path of bean is ..web-inf/classes/MenuBean.java i set the classpath to the classes directory.. I was able to call files from another packages like test.dbase.DBConnectionManager from GenerateMenu, but its showing compilation error for the MenuBean which i kept inside the classes directory. the complation o/p is GenerateMenu.java:30: cannot resolve symbol symbol : class MenuBean location: class test.common.GenerateMenu MenuBean menu; ^ GenerateMenu.java:66: cannot resolve symbol symbol : class MenuBean location: class test.common.GenerateMenu menu = new MenuBean(); ^ 2 errors I have to access this bean from JSP, so i don't want to keep it inside any packages !!! is it a right practise ?? can any1 tell me how to solve this ??? thanx Raj
|
SCJP, SCWCD, SCBCD, Oracle Certified Professional (SQL n PL/SQL)
|
 |
Rajni Kumar
Greenhorn
Joined: Mar 05, 2003
Posts: 8
|
|
|
u place the servlet (GenerateMenu.java) in classes folder and compile.
|
 |
Rajeev Ravindran
Ranch Hand
Joined: Aug 27, 2002
Posts: 455
|
|
hi cuttie, thanx for ur reply..anyway i solved it..i had to add import MenuBean; inside the GenarateMenu.java file... silly doubt naa !!! Thnx Raj..
|
 |
 |
|
|
subject: Setting Classpath ??? Urgent ! :(
|
|
|