netbeans bundled tomat, reloadable = true tip

How to reload the context of a servlet without restarting tomcat for bundled embedded tomcat server. Just a little hint to as I spent a good hour looking to do this to no avail: Basically, tomcat running under netbeans is configured differently.

Using Netbeans 5.5.1, bundled Tomcat 5.5.17 – if you click on tomcat in netbeans and have a look at the properties, look at the “Catalina Base” directory.

for me, its:

C:\Documents and Settings\tim\.netbeans\5.5.1\apache-tomcat-5.5.17_base

and then look in \conf\Catalina\localhost\ this where your web application configuration files are actually held. You need to edit the appropriate xml file.  (my_super_application.xml) and here, within the context node, add in the

reloadable=”true”

<Context docBase= “C:\mypath\build\web” path=”/my_super_applicationServlet” reloadable=”true” />
Then restart tomcat, and change some code, then compile the servlet, or build the application, and after a second it will reload that context.

NOTE: these didn’t work, editing context.xml in web application directory, context.xml and server.xml in

C:\Program Files\netbeans-5.5.1\ enterprise3\apache-tomcat-5.5.17\conf  directory (catalina home)

One thought on “netbeans bundled tomat, reloadable = true tip

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s