You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dan Allen <da...@mojavelinux.com> on 2003/04/12 18:08:51 UTC

getting cached ActionForm out of application scope

In the event that an action form is created after making a typo
(such as using an incorrect type attribute in the form-bean mapping
in struts-config.xml) the bean is "stuck" in application until the
server is restarted.  There needs to be a way to call
RequestProcessor.destroy() or something to reload these beans in the
event this happens.  It is very frustrating when you make this
mistake on a computer where you do not have rights to restart the
server (only the webapps).  Is there anything I can call in a custom
action to clean this up?

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
"Personally, I'm not finding Windows 
to be less expensive to administer, 
but those security holes--that'll kill 'em," 
-- Al Gillen, IDC
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: getting cached ActionForm out of application scope

Posted by Dan Allen <da...@mojavelinux.com>.
> You can programmatically remove stuff from any scope with a call
> removeAttribute() on the page, request, session, or application scopes.
> Watch out for using application scope in clustered environments -- I don't
> think application scope attributes are replicated across the cluster nodes.

Gotcha...yeah I was just trying to figure out what it took for
struts to reread the config file, but as I discovered, stop and
start vs restart of a context in the tomcat manager is obviously
different.  In the first case it clears out the application scope in
the second case it does not, which is kind of wierd, but I can deal
with that.

I was actually the action mapping that was getting stuck.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
'One Microsoft Way' is more than just an address.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: getting cached ActionForm out of application scope

Posted by Max Cooper <ma...@maxcooper.com>.
Dan,

You can programmatically remove stuff from any scope with a call
removeAttribute() on the page, request, session, or application scopes.
Watch out for using application scope in clustered environments -- I don't
think application scope attributes are replicated across the cluster nodes.

-Max

----- Original Message -----
From: "Dan Allen" <da...@mojavelinux.com>
To: "Struts-User List" <st...@jakarta.apache.org>
Sent: Saturday, April 12, 2003 9:08 AM
Subject: getting cached ActionForm out of application scope


> In the event that an action form is created after making a typo
> (such as using an incorrect type attribute in the form-bean mapping
> in struts-config.xml) the bean is "stuck" in application until the
> server is restarted.  There needs to be a way to call
> RequestProcessor.destroy() or something to reload these beans in the
> event this happens.  It is very frustrating when you make this
> mistake on a computer where you do not have rights to restart the
> server (only the webapps).  Is there anything I can call in a custom
> action to clean this up?
>
> Dan
>
> --
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> Daniel Allen, <da...@mojavelinux.com>
> http://www.mojavelinux.com/
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> "Personally, I'm not finding Windows
> to be less expensive to administer,
> but those security holes--that'll kill 'em,"
> -- Al Gillen, IDC
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: getting cached ActionForm out of application scope

Posted by Dan Allen <da...@mojavelinux.com>.
Dan Allen (dan@mojavelinux.com) wrote:

> In the event that an action form is created after making a typo
> (such as using an incorrect type attribute in the form-bean mapping
> in struts-config.xml) the bean is "stuck" in application until the
> server is restarted.  There needs to be a way to call
> RequestProcessor.destroy() or something to reload these beans in the
> event this happens.  It is very frustrating when you make this
> mistake on a computer where you do not have rights to restart the
> server (only the webapps).  Is there anything I can call in a custom
> action to clean this up?

I see, apparently there is a difference between "restart" and "stop
-> start" in the tomcat manager.  This solves my issue.

Dan

-- 
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Daniel Allen, <da...@mojavelinux.com>
http://www.mojavelinux.com/
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 
Results! Why, man, I have gotten a ton of results! 
I know several thousand things that won't work! 
 --Thomas Edison
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org