This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Servlets and the fly likes How to reload a servlet class .. plz help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

JavaRanch » Java Forums » Java » Servlets
Bookmark "How to reload a servlet class .. plz help" Watch "How to reload a servlet class .. plz help" New topic

How to reload a servlet class .. plz help

amit shukla
Ranch Hand

Joined: Oct 25, 2000
Posts: 45
i made one servlet with the classname as HelloWorld.class .. then i made some changes to the source code recompiled it and again run the servlet using SERVLETRUNNER but it is loading the older version of class file and not the modified version ... i have tried with deleting the old class file .. i'm storing all the files in jsdk2.0/examples .. and accessing the servlet by Http://localhost:8080/servlet/HelloWorld .. Plz help..
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
servletrunner does not reload changed classes, you need to stop and restart the servletrunner. I recommend using a more modern servlet container such as Resin or Tomcat.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
amit shukla
Ranch Hand

Joined: Oct 25, 2000
Posts: 45
Thanx alot frank .. can you plz tell me why the files we save in jsdk/examples directory are mentioned as in servlet folder while accessing .. and how can i access my C drive using http://localhost:8080 ... plz tell me ..
Ranch Hand

Joined: Oct 20, 2000
Posts: 68
Hi amit,
You can access files using servlets very easily as normal java applications does.
why we are using "/servlet" this is standard convention used by SUN for running servlet programs. If you go through the "servlet.xml" of TOMCAT "conf" dir you will find
debug="0" prefix="/servlet/" />
this is where I thing "/servlet" has come.
amit shukla
Ranch Hand

Joined: Oct 25, 2000
Posts: 45
thanx a lot sols .. yaar what i wanted to ask was how our tiny server is accessing the examples folder of jsdk .. and how can i access other resources of my computer or networked computers using servlets as using IP address of the network client gives the access to only servlets in the examples folder if the servletrunner is running on this client or remote computer ..
means i want to use servlets to access remote computer's "c" drive is this possible ...
I agree. Here's the link:
subject: How to reload a servlet class .. plz help
It's not a secret anymore!