Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to get a fresh servlet copy loaded?  RSS feed

 
Joe Kaz
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
re: Sun JSDK 2.1 server
How can I tell the Sun server JSDK 2.1 to relaod a copy of the servlet every time, so I can continually change and re-execute the servlet code during testing, so as to pick up the new changed version each time?
It (quite properly) keeps rerunning the old (initially loaded)version of the code.
Thanks all
Joe Kazenas
USAA
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It all depends on the class loader of the Application server that you're using. Many app servers require you to start/stop the server so that it can pick up the new class file for your servlet. Check the docs for your particular server to see if there's a setting for servlet reloading (different than JSP reloading).
------------------
- Jessica Bradley
HP Bluestone
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Out of curiosity, why are you using JSDK and not Tomcat?
As far as I know, JSDK is about 2 API generations behind.
In tomcat, using reloadable="true" in the server.xml that defines a web application will force reloading of the servlet class whenever the timestamp changes. (But NOT the auxilliary class files, so watch out.)
Bill
------------------
author of:
 
Joe Kaz
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the help.
JSDK was simply an easier "no-brainer" to install locally and to use, for me and my students. I've now gotten Tomcat up OK.
(ps. The JSDK doc says it doesn't even support automatic reloading)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!