Forums Register Login

Accessing one's own packages in servlets

+Pie Number of slices to send: Send
Guys, Please help me in acessing ones own packages in Servlets...
do we have to set the path for its classes...i am just the starter...
How will we do that...if thats the case?
+Pie Number of slices to send: Send
Three ways I know of:

1. by command line
2. by environment variable
3. by options file
+Pie Number of slices to send: Send
Update your classpath by adding the dirctory that your package is in to it. I.e the directory that's right above your package directory.
+Pie Number of slices to send: Send
Of course setting the classpath is only useful for compiling the servlets and classes. The system classpath is ignored by the container serving the web application when deployed.

To deploy the classes, they must be place in one of the locations defined by the Servlet Specification. For example, WEB-INF/classes for standalone classes, or WEB-INF/lib for jar files. There are also container-defined locations to share classes across web apps.
I don't like that guy. The tiny ad agrees with me.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 565 times.
Similar Threads
packages
Running Servlets, have a question
servlet deployment
How many types of servlets are there
Error allocating a servlet instance.
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 07:22:03.