• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to reload a servlet class .. plz help

 
amit shukla
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
amit shukla
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic