RE: Reloadable Class

2001-12-07 Thread Rob Stokes

I've created a simple ant task to automate the reload. Use it if you like.

Rob Stokes

-Original Message-
From: Knee, Jeff [mailto:[EMAIL PROTECTED]]
Sent: Friday, December 07, 2001 9:47 AM
To: 'Struts Users Mailing List'
Subject: RE: Reloadable Class


This works like a champ!

Thanks, Chris!  (This method is much better than bouncing the enter servlet
container.)

+= Jeff Knee

> -Original Message-
> From: Chris Birch [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 11:38 AM
> To: Struts Users Mailing List
> Subject: RE: Reloadable Class
> 
> 
> Jeff,
> 
> As you're are using Tomcat4 you can reload a web apps context 
> using the
> built-in Tomcat management web app.
> 
> If your web-apps context is /myWebApp/
> 
> Simply enter http://localhost:8080/manager/reload?path=/myWebApp
> 
> This should return a simple string that tells you your 
> context has been
> reloaded and is usually much quicker than restarting.
> 
> The manager app is protected, so you must have a user who can 
> log in with a
> manager role.  If you are using the simple memory realm 
> authentication then
> update $TOMAT_HOME/conf/tomcat-users.xml and add:
> 
> 
> 
> For more information on the manager app see:
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html
> 
> After making code changes building/deploying with ant to 
> test, I always use
> this method as I often have a couple of struts web-apps in my 
> Tomcat server.
> 
> Regards,
> Chris.
> 
> -Original Message-----
> From: Knee, Jeff [mailto:[EMAIL PROTECTED]]
> Sent: 07 December 2001 16:19
> To: 'Struts Users Mailing List'
> Subject: RE: Reloadable Class
> 
> 
> Keith,
> 
> Well... I had hoped that doing a admin/reload.do would do 
> what I wanted but
> it doesn't seem to.
> 
> This just seems to reload the mappings without loading the 
> new class files.
> 
> Here is an example:
> 
> * I have my web-app running and I'm testing.
> * Close the browser window (or not)
> * I make a change to an Action class.
> * I compile it and move it to the correct
> ...webapps\struts-play\WEB-INF\classes... directory
> * Open a browser window and do localhost:8080/my-app/admin/reload.do
> * Go back to my app and test the change.
> 
> Problem:  The old code is still being used.
> 
> However, if I:
> 
> * Run shutdown.bat on Catalina (Tomcat 4) and then run startup.bat
> * Test my change.
> 
> New code is used.
> 
> I'd like to avoid the Catalina up and down maneuver to make 
> my changes "go
> live."  (It seems to me that reload.do should do that but I 
> guess the only
> the mappings get reloaded, the actual classes don't get reloaded.)
> 
> += Jeff Knee
> 
> > -Original Message-
> > From: Keith Bacon [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 07, 2001 8:21 AM
> > To: Struts Users Mailing List
> > Subject: RE: Reloadable Class
> >
> >
> > Jeff,
> > If your web-app is
> >
> > localhost:8080/my-app/
> > localhost:8080/my-app/admin/reolad.do
> > causes your struts-config to be reloaded by the
> > ActionServlet - is that what you want?
> > Keith.
> >
> >
> > --- "Knee, Jeff" <[EMAIL PROTECTED]> wrote:
> > > All,
> > >
> > > For me (with Tomcat4), this doesn't seem to help...
> > > I was thinking that this
> > > was because the _ActionServlet_ wasn't new... just
> > > my _Action_ classes.
> > >
> > > Is there a way to get the ActionServlet to "reset"
> > > without restarting
> > > Tomcat?
> > >
> > > += Jeff Knee
> > >
> > > > -Original Message-
> > > > From: Robert Parker
> > > [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, December 05, 2001 8:59 PM
> > > > To: Struts Users Mailing List; ymsha
> > > > Subject: Re: Reloadable Class
> > > >
> > > >
> > > > In your Tomcat config file - is the reloadble
> > > attribute set
> > > > to true for your
> > > > webapp? (In Tomcat 3.x this will be in the
> > > server.xml file in the conf
> > > > directory)
> > > >
> > > > regards
> > > >
> > > > Rob
> > > > - Original Message -
> > > > From: "ymsha" <[EMAIL PROTECTED]

RE: Reloadable Class

2001-12-07 Thread Knee, Jeff

This works like a champ!

Thanks, Chris!  (This method is much better than bouncing the enter servlet
container.)

+= Jeff Knee

> -Original Message-
> From: Chris Birch [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 11:38 AM
> To: Struts Users Mailing List
> Subject: RE: Reloadable Class
> 
> 
> Jeff,
> 
> As you're are using Tomcat4 you can reload a web apps context 
> using the
> built-in Tomcat management web app.
> 
> If your web-apps context is /myWebApp/
> 
> Simply enter http://localhost:8080/manager/reload?path=/myWebApp
> 
> This should return a simple string that tells you your 
> context has been
> reloaded and is usually much quicker than restarting.
> 
> The manager app is protected, so you must have a user who can 
> log in with a
> manager role.  If you are using the simple memory realm 
> authentication then
> update $TOMAT_HOME/conf/tomcat-users.xml and add:
> 
> 
> 
> For more information on the manager app see:
> http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html
> 
> After making code changes building/deploying with ant to 
> test, I always use
> this method as I often have a couple of struts web-apps in my 
> Tomcat server.
> 
> Regards,
> Chris.
> 
> -Original Message-----
> From: Knee, Jeff [mailto:[EMAIL PROTECTED]]
> Sent: 07 December 2001 16:19
> To: 'Struts Users Mailing List'
> Subject: RE: Reloadable Class
> 
> 
> Keith,
> 
> Well... I had hoped that doing a admin/reload.do would do 
> what I wanted but
> it doesn't seem to.
> 
> This just seems to reload the mappings without loading the 
> new class files.
> 
> Here is an example:
> 
> * I have my web-app running and I'm testing.
> * Close the browser window (or not)
> * I make a change to an Action class.
> * I compile it and move it to the correct
> ...webapps\struts-play\WEB-INF\classes... directory
> * Open a browser window and do localhost:8080/my-app/admin/reload.do
> * Go back to my app and test the change.
> 
> Problem:  The old code is still being used.
> 
> However, if I:
> 
> * Run shutdown.bat on Catalina (Tomcat 4) and then run startup.bat
> * Test my change.
> 
> New code is used.
> 
> I'd like to avoid the Catalina up and down maneuver to make 
> my changes "go
> live."  (It seems to me that reload.do should do that but I 
> guess the only
> the mappings get reloaded, the actual classes don't get reloaded.)
> 
> += Jeff Knee
> 
> > -Original Message-
> > From: Keith Bacon [mailto:[EMAIL PROTECTED]]
> > Sent: Friday, December 07, 2001 8:21 AM
> > To: Struts Users Mailing List
> > Subject: RE: Reloadable Class
> >
> >
> > Jeff,
> > If your web-app is
> >
> > localhost:8080/my-app/
> > localhost:8080/my-app/admin/reolad.do
> > causes your struts-config to be reloaded by the
> > ActionServlet - is that what you want?
> > Keith.
> >
> >
> > --- "Knee, Jeff" <[EMAIL PROTECTED]> wrote:
> > > All,
> > >
> > > For me (with Tomcat4), this doesn't seem to help...
> > > I was thinking that this
> > > was because the _ActionServlet_ wasn't new... just
> > > my _Action_ classes.
> > >
> > > Is there a way to get the ActionServlet to "reset"
> > > without restarting
> > > Tomcat?
> > >
> > > += Jeff Knee
> > >
> > > > -Original Message-
> > > > From: Robert Parker
> > > [mailto:[EMAIL PROTECTED]]
> > > > Sent: Wednesday, December 05, 2001 8:59 PM
> > > > To: Struts Users Mailing List; ymsha
> > > > Subject: Re: Reloadable Class
> > > >
> > > >
> > > > In your Tomcat config file - is the reloadble
> > > attribute set
> > > > to true for your
> > > > webapp? (In Tomcat 3.x this will be in the
> > > server.xml file in the conf
> > > > directory)
> > > >
> > > > regards
> > > >
> > > > Rob
> > > > - Original Message -
> > > > From: "ymsha" <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>
> > > > Sent: Thursday, December 06, 2001 12:43 PM
> > > > Subject: Reloadable Class
> > > >
> > > >
> > > > >
> > > > >
> > > > > > I am using struts with Tomcat.  Eachtime I
> > > build the formbean or
> > > > > > an action servlet, I should re

RE: Reloadable Class

2001-12-07 Thread Chris Birch

Jeff,

As you're are using Tomcat4 you can reload a web apps context using the
built-in Tomcat management web app.

If your web-apps context is /myWebApp/

Simply enter http://localhost:8080/manager/reload?path=/myWebApp

This should return a simple string that tells you your context has been
reloaded and is usually much quicker than restarting.

The manager app is protected, so you must have a user who can log in with a
manager role.  If you are using the simple memory realm authentication then
update $TOMAT_HOME/conf/tomcat-users.xml and add:



For more information on the manager app see:
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html

After making code changes building/deploying with ant to test, I always use
this method as I often have a couple of struts web-apps in my Tomcat server.

Regards,
Chris.

-Original Message-
From: Knee, Jeff [mailto:[EMAIL PROTECTED]]
Sent: 07 December 2001 16:19
To: 'Struts Users Mailing List'
Subject: RE: Reloadable Class


Keith,

Well... I had hoped that doing a admin/reload.do would do what I wanted but
it doesn't seem to.

This just seems to reload the mappings without loading the new class files.

Here is an example:

* I have my web-app running and I'm testing.
* Close the browser window (or not)
* I make a change to an Action class.
* I compile it and move it to the correct
...webapps\struts-play\WEB-INF\classes... directory
* Open a browser window and do localhost:8080/my-app/admin/reload.do
* Go back to my app and test the change.

Problem:  The old code is still being used.

However, if I:

* Run shutdown.bat on Catalina (Tomcat 4) and then run startup.bat
* Test my change.

New code is used.

I'd like to avoid the Catalina up and down maneuver to make my changes "go
live."  (It seems to me that reload.do should do that but I guess the only
the mappings get reloaded, the actual classes don't get reloaded.)

+= Jeff Knee

> -Original Message-
> From: Keith Bacon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 8:21 AM
> To: Struts Users Mailing List
> Subject: RE: Reloadable Class
>
>
> Jeff,
> If your web-app is
>
> localhost:8080/my-app/
> localhost:8080/my-app/admin/reolad.do
> causes your struts-config to be reloaded by the
> ActionServlet - is that what you want?
> Keith.
>
>
> --- "Knee, Jeff" <[EMAIL PROTECTED]> wrote:
> > All,
> >
> > For me (with Tomcat4), this doesn't seem to help...
> > I was thinking that this
> > was because the _ActionServlet_ wasn't new... just
> > my _Action_ classes.
> >
> > Is there a way to get the ActionServlet to "reset"
> > without restarting
> > Tomcat?
> >
> > += Jeff Knee
> >
> > > -Original Message-
> > > From: Robert Parker
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, December 05, 2001 8:59 PM
> > > To: Struts Users Mailing List; ymsha
> > > Subject: Re: Reloadable Class
> > >
> > >
> > > In your Tomcat config file - is the reloadble
> > attribute set
> > > to true for your
> > > webapp? (In Tomcat 3.x this will be in the
> > server.xml file in the conf
> > > directory)
> > >
> > > regards
> > >
> > > Rob
> > > - Original Message -
> > > From: "ymsha" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, December 06, 2001 12:43 PM
> > > Subject: Reloadable Class
> > >
> > >
> > > >
> > > >
> > > > > I am using struts with Tomcat.  Eachtime I
> > build the formbean or
> > > > > an action servlet, I should restart the server
> > and then take
> > > > > the new effect.  It cost me too much time when
> > there are many
> > > > > pages there.  I wonder whether there is a
> > method to solve this
> > > > > problem?
> > > > >
> > > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > >
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > >
> >
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> >
>
>
> __
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Reloadable Class

2001-12-07 Thread Knee, Jeff

Keith,

Well... I had hoped that doing a admin/reload.do would do what I wanted but
it doesn't seem to.

This just seems to reload the mappings without loading the new class files.

Here is an example:

* I have my web-app running and I'm testing.
* Close the browser window (or not)
* I make a change to an Action class.
* I compile it and move it to the correct
...webapps\struts-play\WEB-INF\classes... directory
* Open a browser window and do localhost:8080/my-app/admin/reload.do 
* Go back to my app and test the change.

Problem:  The old code is still being used.

However, if I:

* Run shutdown.bat on Catalina (Tomcat 4) and then run startup.bat
* Test my change.

New code is used.

I'd like to avoid the Catalina up and down maneuver to make my changes "go
live."  (It seems to me that reload.do should do that but I guess the only
the mappings get reloaded, the actual classes don't get reloaded.)

+= Jeff Knee

> -Original Message-
> From: Keith Bacon [mailto:[EMAIL PROTECTED]]
> Sent: Friday, December 07, 2001 8:21 AM
> To: Struts Users Mailing List
> Subject: RE: Reloadable Class
> 
> 
> Jeff,
> If your web-app is 
> 
> localhost:8080/my-app/
> localhost:8080/my-app/admin/reolad.do
> causes your struts-config to be reloaded by the
> ActionServlet - is that what you want?
> Keith.
> 
> 
> --- "Knee, Jeff" <[EMAIL PROTECTED]> wrote:
> > All,
> > 
> > For me (with Tomcat4), this doesn't seem to help...
> > I was thinking that this
> > was because the _ActionServlet_ wasn't new... just
> > my _Action_ classes.
> > 
> > Is there a way to get the ActionServlet to "reset"
> > without restarting
> > Tomcat?
> > 
> > += Jeff Knee
> > 
> > > -Original Message-
> > > From: Robert Parker
> > [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, December 05, 2001 8:59 PM
> > > To: Struts Users Mailing List; ymsha
> > > Subject: Re: Reloadable Class
> > > 
> > > 
> > > In your Tomcat config file - is the reloadble
> > attribute set 
> > > to true for your
> > > webapp? (In Tomcat 3.x this will be in the
> > server.xml file in the conf
> > > directory)
> > > 
> > > regards
> > > 
> > > Rob
> > > - Original Message -
> > > From: "ymsha" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Thursday, December 06, 2001 12:43 PM
> > > Subject: Reloadable Class
> > > 
> > > 
> > > >
> > > >
> > > > > I am using struts with Tomcat.  Eachtime I
> > build the formbean or
> > > > > an action servlet, I should restart the server
> > and then take
> > > > > the new effect.  It cost me too much time when
> > there are many
> > > > > pages there.  I wonder whether there is a
> > method to solve this
> > > > > problem?
> > > > >
> > > > >
> > > >
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > >
> > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail: 
> > > <mailto:[EMAIL PROTECTED]>
> > > 
> > 
> > --
> > To unsubscribe, e-mail:  
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> __
> Do You Yahoo!?
> Send your FREE holiday greetings online!
> http://greetings.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Reloadable Class

2001-12-07 Thread Keith Bacon

Jeff,
If your web-app is 

localhost:8080/my-app/
localhost:8080/my-app/admin/reolad.do
causes your struts-config to be reloaded by the
ActionServlet - is that what you want?
Keith.


--- "Knee, Jeff" <[EMAIL PROTECTED]> wrote:
> All,
> 
> For me (with Tomcat4), this doesn't seem to help...
> I was thinking that this
> was because the _ActionServlet_ wasn't new... just
> my _Action_ classes.
> 
> Is there a way to get the ActionServlet to "reset"
> without restarting
> Tomcat?
> 
> += Jeff Knee
> 
> > -Original Message-
> > From: Robert Parker
> [mailto:[EMAIL PROTECTED]]
> > Sent: Wednesday, December 05, 2001 8:59 PM
> > To: Struts Users Mailing List; ymsha
> > Subject: Re: Reloadable Class
> > 
> > 
> > In your Tomcat config file - is the reloadble
> attribute set 
> > to true for your
> > webapp? (In Tomcat 3.x this will be in the
> server.xml file in the conf
> > directory)
> > 
> > regards
> > 
> > Rob
> > - Original Message -
> > From: "ymsha" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, December 06, 2001 12:43 PM
> > Subject: Reloadable Class
> > 
> > 
> > >
> > >
> > > > I am using struts with Tomcat.  Eachtime I
> build the formbean or
> > > > an action servlet, I should restart the server
> and then take
> > > > the new effect.  It cost me too much time when
> there are many
> > > > pages there.  I wonder whether there is a
> method to solve this
> > > > problem?
> > > >
> > > >
> > >
> > 
> > 
> > --
> > To unsubscribe, e-mail:   
> >
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail: 
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 


__
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Reloadable Class

2001-12-06 Thread Knee, Jeff

All,

For me (with Tomcat4), this doesn't seem to help... I was thinking that this
was because the _ActionServlet_ wasn't new... just my _Action_ classes.

Is there a way to get the ActionServlet to "reset" without restarting
Tomcat?

+= Jeff Knee

> -Original Message-
> From: Robert Parker [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, December 05, 2001 8:59 PM
> To: Struts Users Mailing List; ymsha
> Subject: Re: Reloadable Class
> 
> 
> In your Tomcat config file - is the reloadble attribute set 
> to true for your
> webapp? (In Tomcat 3.x this will be in the server.xml file in the conf
> directory)
> 
> regards
> 
> Rob
> - Original Message -
> From: "ymsha" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Thursday, December 06, 2001 12:43 PM
> Subject: Reloadable Class
> 
> 
> >
> >
> > > I am using struts with Tomcat.  Eachtime I build the formbean or
> > > an action servlet, I should restart the server and then take
> > > the new effect.  It cost me too much time when there are many
> > > pages there.  I wonder whether there is a method to solve this
> > > problem?
> > >
> > >
> >
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Reloadable Class

2001-12-05 Thread Robert Parker

In your Tomcat config file - is the reloadble attribute set to true for your
webapp? (In Tomcat 3.x this will be in the server.xml file in the conf
directory)

regards

Rob
- Original Message -
From: "ymsha" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, December 06, 2001 12:43 PM
Subject: Reloadable Class


>
>
> > I am using struts with Tomcat.  Eachtime I build the formbean or
> > an action servlet, I should restart the server and then take
> > the new effect.  It cost me too much time when there are many
> > pages there.  I wonder whether there is a method to solve this
> > problem?
> >
> >
>


--
To unsubscribe, e-mail:   
For additional commands, e-mail: