Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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
Author

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
Sheriff

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 frankcarver.me ~ 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 ..
P SOLAIAPPAN
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
<RequestInterceptor
className="org.apache.tomcat.request.InvokerInterceptor"
debug="0" prefix="/servlet/" />
this is where I thing "/servlet" has come.
solaiappan
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 ...
 
wood burning stoves
 
subject: How to reload a servlet class .. plz help
 
Similar Threads
SERVLET IS NOT RUNNING PLZ HELP ME
Installing servlet
Cant run a Servlet
Servlet web.xml url- pattern
tomcat- set JAVA_HOME point to jdk..