aspose file tools*
The moose likes JSP and the fly likes package class path problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "package class path problem" Watch "package class path problem" New topic
Author

package class path problem

jawwad ahmed
Ranch Hand

Joined: Dec 01, 2001
Posts: 179
Well i saved class file of servlet in the
c:\tomcat2\webapps\examples\web-inf\classes\filename.java
i set path :
set classpath=c:\tomcat2\lib\servlet.jar//this work fine
when i make package pk and saved in classes folder
can anybody please tell the classpath of it.
maher dabbas
Greenhorn

Joined: Dec 02, 2001
Posts: 26
I did not quiet understand your problem, but here is some
information that you may use:
In the tomcat server, when you develop your classes and you want to make them available to the web application , you have 2 coices.
1:- to make these classes available to a certain web application.
if you wanna do so , place the classes packed on classes directory under the web-inf directorey of your web application , or put them on a Jar file and place it on the lib directory under the web-inf directory of your web application.
2:- To make the classes available to all of the web applications deployed on the tomcat server , place them packed under $CATALINA_HOME/classes, or put them on a jar file and place them on $CATALINA_HOME/lib.
You don't have to define any class path for the tomcat , because it has it's own ones.
bye.
Sarath Mohan
Ranch Hand

Joined: Mar 17, 2001
Posts: 213

Hello Jawaad Mohd,
If you use pk as package name, compile with -d option.
it will create a class file with inside pk dir., right?
copy this dir into server's class path and restart the server.
Then whenever you access the file you should give packagename.ClassName
e.g. pk.ClassName
Cheers


Sarath Mohan
 
Consider Paul's rocket mass heater.
 
subject: package class path problem