Tomcat 6 Hot Deploy Issue

View: New views
7 Messages — Rating Filter:   Alert me  

Tomcat 6 Hot Deploy Issue

by Quadir Kareemullah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi

I am using Java 6 64-bit and STANDALONE Tomcat 6.0.18 on Vista 64-bit. I am working on a web application with struts and tiles. Now when I make changes to my java or jsp files, they are not visible when I reload the page. I have to manually reload the web app to see the changes. My web app configuration is as follows:

$CATALINA_BASE/conf/Catalina/localhost/dashboard.xml

<Context docBase="D:/mydata/projects/PatchworkSystems/development/Dashboard/webapp"
         path="/dashboard"
        reloadable="true" antiJARLocking="true" antiResourceLocking="true" debug="1" />


Any help is greatly appreciated.


Thanks
Quadir
--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************

_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members

Re: Tomcat 6 Hot Deploy Issue

by gingin8199 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

What IDE are you using?

"Ignorance of certain subjects is a great part in wisdom."  Hugo De Groot

-----Original Message-----
From: Quadir Kareemullah <quadir@...>

Date: Sun, 24 May 2009 19:40:16
To: <ajug-members@...>
Subject: [ajug-members] Tomcat 6 Hot Deploy Issue


_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members

Re: Tomcat 6 Hot Deploy Issue

by Quadir Kareemullah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am using Eclipse, but I believe it is irrelevant since Tomcat is running STANDALONE outside Eclipse.

- Quadir

On Sun, May 24, 2009 at 8:18 PM, <gingin8199@...> wrote:
What IDE are you using?

"Ignorance of certain subjects is a great part in wisdom."  Hugo De Groot

-----Original Message-----
From: Quadir Kareemullah <quadir@...>

Date: Sun, 24 May 2009 19:40:16
To: <ajug-members@...>
Subject: [ajug-members] Tomcat 6 Hot Deploy Issue


_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************

_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members

Re: Tomcat 6 Hot Deploy Issue

by Andrew Arrigoni :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I don't have a tomcat in front of me, but Tomcat is supposed to notice when a JSP file has changed and re-compile it. However, Java changes will need to result in a restart since those class files are loaded into the JVM's Permanent Generation memory when they're used. That's one of the beauties of using a fully baked Application Server like Glassfish or JBoss: It makes the hot-deploy a lot cleaner.

Now, when you make changes, are you changing the files directly in the exploded war? Are you making changes else where then merging it in?

For the JSP issue, an overkill way to handle this is any time you make JSP changes, you can delete Tomcat's working directory. This will get rid of all the compiled JSPs and force Tomcat to do it over. 

As for the Java issues, you will need to redeploy the whole War file. From my experience, deleting the exploded and compressed war files then copying the new one into the webapps directory is enough.

I hope some of that helps!

On Sun, May 24, 2009 at 9:11 PM, Quadir Kareemullah <quadir@...> wrote:
I am using Eclipse, but I believe it is irrelevant since Tomcat is running STANDALONE outside Eclipse.

- Quadir


On Sun, May 24, 2009 at 8:18 PM, <gingin8199@...> wrote:
What IDE are you using?

"Ignorance of certain subjects is a great part in wisdom."  Hugo De Groot

-----Original Message-----
From: Quadir Kareemullah <quadir@...>

Date: Sun, 24 May 2009 19:40:16
To: <ajug-members@...>
Subject: [ajug-members] Tomcat 6 Hot Deploy Issue


_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************

_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members

Re: Tomcat 6 Hot Deploy Issue

by Marty Blood :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Well, yes, but I think Jennifer was asking since that might affect where the IDE compiles the code out to.  That might affect the directory you would want to refer to as the base.

Regarding the hot deployment though here's what the Tomcat docs say about reloadable:

Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.

So I don't think it'll pick up your jsp changes anyway unless your build script in Eclipse includes a JSP pre-compiler.

Anyway, best of luck with it.

-Marty

On Sun, May 24, 2009 at 9:11 PM, Quadir Kareemullah <quadir@...> wrote:
I am using Eclipse, but I believe it is irrelevant since Tomcat is running STANDALONE outside Eclipse.

- Quadir


On Sun, May 24, 2009 at 8:18 PM, <gingin8199@...> wrote:
What IDE are you using?

"Ignorance of certain subjects is a great part in wisdom."  Hugo De Groot

-----Original Message-----
From: Quadir Kareemullah <quadir@...>

Date: Sun, 24 May 2009 19:40:16
To: <ajug-members@...>
Subject: [ajug-members] Tomcat 6 Hot Deploy Issue


_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************

_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members

Re: Tomcat 6 Hot Deploy Issue

by Quadir Kareemullah :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Thank you all for replying. I found the correct answer to this at http://stackoverflow.com where I posted the question. Here is the link to the Question and the Answer http://stackoverflow.com/questions/904877/tomcat-6-hot-deploy-issue

It's because of a side effect with having antiResourceLocking="true" set on your context. If you read the documentation on Tomcat here:

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

"Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server: see Bugzilla 37668."

which is here:

https://issues.apache.org/bugzilla/show_bug.cgi?id=37668

There is no workaround as far as I know, if you remove the attribute it will allow you automatic loading of yor JSP's again. We set a deploy time subtitution to put the attribute back in for production. Boo, hiss! Anyways if you remove the antiResourceLocking attribute it will solve the problem you're experiencing.


- Quadir


On Mon, May 25, 2009 at 11:29 AM, Marty Blood <marty.blood@...> wrote:
Well, yes, but I think Jennifer was asking since that might affect where the IDE compiles the code out to.  That might affect the directory you would want to refer to as the base.

Regarding the hot deployment though here's what the Tomcat docs say about reloadable:

Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.

So I don't think it'll pick up your jsp changes anyway unless your build script in Eclipse includes a JSP pre-compiler.

Anyway, best of luck with it.

-Marty


On Sun, May 24, 2009 at 9:11 PM, Quadir Kareemullah <quadir@...> wrote:
I am using Eclipse, but I believe it is irrelevant since Tomcat is running STANDALONE outside Eclipse.

- Quadir


On Sun, May 24, 2009 at 8:18 PM, <gingin8199@...> wrote:
What IDE are you using?

"Ignorance of certain subjects is a great part in wisdom."  Hugo De Groot

-----Original Message-----
From: Quadir Kareemullah <quadir@...>

Date: Sun, 24 May 2009 19:40:16
To: <ajug-members@...>
Subject: [ajug-members] Tomcat 6 Hot Deploy Issue


_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************

_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************

_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members

Re: Tomcat 6 Hot Deploy Issue

by Ramesh Rajamani :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Thanks for Q/A.....
 

Date: Mon, 25 May 2009 13:16:02 -0400
From: quadir@...
To: ajug-members@...
Subject: Re: [ajug-members] Tomcat 6 Hot Deploy Issue


Thank you all for replying. I found the correct answer to this at http://stackoverflow.com where I posted the question. Here is the link to the Question and the Answer http://stackoverflow.com/questions/904877/tomcat-6-hot-deploy-issue

It's because of a side effect with having antiResourceLocking="true" set on your context. If you read the documentation on Tomcat here: http://tomcat.apache.org/tomcat-5.5-doc/config/context.html
"Please note that setting this to true has some side effects, including the disabling of JSP reloading in a running server: see Bugzilla 37668."
which is here:
https://issues.apache.org/bugzilla/show_bug.cgi?id=37668
There is no workaround as far as I know, if you remove the attribute it will allow you automatic loading of yor JSP's again. We set a deploy time subtitution to put the attribute back in for production. Boo, hiss! Anyways if you remove the antiResourceLocking attribute it will solve the problem you're experiencing.

- Quadir


On Mon, May 25, 2009 at 11:29 AM, Marty Blood <marty.blood@...> wrote:
Well, yes, but I think Jennifer was asking since that might affect where the IDE compiles the code out to.  That might affect the directory you would want to refer to as the base.

Regarding the hot deployment though here's what the Tomcat docs say about reloadable:

Set to true if you want Catalina to monitor classes in /WEB-INF/classes/ and /WEB-INF/lib for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the Manager web application, however, to trigger reloads of deployed applications on demand.

So I don't think it'll pick up your jsp changes anyway unless your build script in Eclipse includes a JSP pre-compiler.

Anyway, best of luck with it.

-Marty


On Sun, May 24, 2009 at 9:11 PM, Quadir Kareemullah <quadir@...> wrote:
I am using Eclipse, but I believe it is irrelevant since Tomcat is running STANDALONE outside Eclipse.

- Quadir


On Sun, May 24, 2009 at 8:18 PM, <gingin8199@...> wrote:
What IDE are you using?

"Ignorance of certain subjects is a great part in wisdom."  Hugo De Groot

-----Original Message-----
From: Quadir Kareemullah <quadir@...>

Date: Sun, 24 May 2009 19:40:16
To: <ajug-members@...>
Subject: [ajug-members] Tomcat 6 Hot Deploy Issue


_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************

_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members



_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members




--
************************************************************************************

9.71 # The believers, men and women, are Auliyâ' (helpers, supporters, friends, protectors) of one another, they enjoin (on the people) Al-Ma'rûf (i.e. Islâmic Monotheism and all that Islâm orders one to do), and forbid (people) from Al-Munkar (i.e. polytheism and disbelief of all kinds, and all that Islâm has forbidden); they perform As-Salât (Iqâmat-as-Salât) and give the Zakât, and obey Allâh and His Messenger. Allâh will have His Mercy on them. Surely Allâh is All-Mighty, All-Wise.
9.72 Allâh has promised to the believers -men and women, - Gardens under which rivers flow to dwell therein forever, and beautiful mansions in Gardens of 'Adn (Eden Paradise). But the greatest bliss is the Good Pleasure of Allâh. That is the supreme success.

-- Qur'an Chapter 3 Verses 185-186

************************************************************************************


Get easy photo sharing with Windows LiveT Photos. Drag n' drop
_______________________________________________
ajug-members mailing list
ajug-members@...
http://www.ajug.org/mailman/listinfo/ajug-members