Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to reload a servlet class .. plz help

 
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..
 
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 ..
 
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 ...
 
Bras cause cancer. And tiny ads:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic