You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by John Boyer <jo...@rodaxsoft.com> on 2012/08/24 21:54:11 UTC
[Struts 2] How can I receive notification when the web app has been destroyed?
So that I can cleanup resources. How can I receive a notification in a Struts 2 web app when the app has been unloaded, stopped, un-deployed, etc.?
Thank you,
John Boyer
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Struts 2] How can I receive notification when the web app has
been destroyed?
Posted by Paul Benedict <pb...@apache.org>.
Use a servlet listener.
On Aug 24, 2012 2:54 PM, "John Boyer" <jo...@rodaxsoft.com> wrote:
> So that I can cleanup resources. How can I receive a notification in a
> Struts 2 web app when the app has been unloaded, stopped, un-deployed, etc.?
>
> Thank you,
> John Boyer
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
RE: [Struts 2] How can I receive notification when the web app has
been destroyed?
Posted by Martin Gainty <mg...@hotmail.com>.
JMX ClientNotificationListener implementor has a method
public static class ClientListener implements NotificationListener {
will notify you of *any* notifications that might be sent by the MBeans that are registered in the JMX agent's MBean server
http://docs.oracle.com/javase/tutorial/jmx/remote/custom.html
HTH
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Fri, 24 Aug 2012 12:59:23 -0700
> Subject: Re: [Struts 2] How can I receive notification when the web app has been destroyed?
> From: kevind@bluechipexec.com
> To: user@struts.apache.org
>
> As another said.. in web.xml you configure a servlet context listener, in
> your code you provide a class that implements the ServletContextListener
> and you can use it to know when the app is deployed and undeployed.
>
>
> On Fri, Aug 24, 2012 at 12:54 PM, John Boyer <jo...@rodaxsoft.com> wrote:
>
> > So that I can cleanup resources. How can I receive a notification in a
> > Struts 2 web app when the app has been unloaded, stopped, un-deployed, etc.?
> >
> > Thank you,
> > John Boyer
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
Re: valueStack [n].parameterName -- is it still there?
Posted by Dave Newton <da...@gmail.com>.
Yep, sure enough--interesting.
I think I'll start spinning through the docs and updating some stuff; that
was my claim to fame at one point--need to earn those stripes.
Dave
On Mon, Feb 18, 2013 at 12:46 PM, Maurizio Cucchiara
<mc...@apache.org>wrote:
> Looking at the regex on the bottom of the page, I'd say: it's no more
> allowed (http://goo.gl/oUlb6 click on the green button to test the regex
> pattern).
> But the regex could not represent the right behaviour, and I also didn't
> test it.
>
> Twitter :http://www.twitter.com/m_cucchiara
> G+ :https://plus.google.com/107903711540963855921
> Linkedin :http://www.linkedin.com/in/mauriziocucchiara
> VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
>
> Maurizio Cucchiara
>
>
> On 18 February 2013 18:36, Dave Newton <da...@gmail.com> wrote:
>
> > A brief look made me think [\d] was still allowed, but I also didn't play
> > with it to actually find out.
> >
> > Dave
> >
> >
> >
> > On Mon, Feb 18, 2013 at 12:20 PM, Maurizio Cucchiara
> > <mc...@apache.org>wrote:
> >
> > > There is a good chance that this notation went away after S2-009 (
> > > http://goo.gl/NydYr), though I could be wrong .
> > >
> > > Twitter :http://www.twitter.com/m_cucchiara
> > > G+ :https://plus.google.com/107903711540963855921
> > > Linkedin :http://www.linkedin.com/in/mauriziocucchiara
> > > VisualizeMe:
> http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
> > >
> > > Maurizio Cucchiara
> > >
> > >
> > > On 18 February 2013 18:14, Dave Newton <da...@gmail.com> wrote:
> > >
> > > > The [0].foo notation should allow direct access to the nth item on
> the
> > > > stack.
> > > >
> > > > I'm not aware of it intentionally going away, but I also don't use it
> > > > regularly and would need to check.
> > > >
> > > > Dave
> > > >
> > > >
> > > > On Mon, Feb 18, 2013 at 12:05 PM, Lukasz Lenart <
> > lukaszlenart@apache.org
> > > > >wrote:
> > > >
> > > > > 2013/2/18 Chris Mawata <ch...@gmail.com>:
> > > > > > Hi all,
> > > > > > I am using Struts 2.3.4.1 and i noticed the notation
> > > > > > [n].parameterName to get a parameter of a given name
> > > > > > when the first ocurrance is not the one you want is
> > > > > > not working. I can't find any documentation that it was
> > > > > > removed. Can anyone point me to something? I might
> > > > > > not be searching by the technically correct name.
> > > > >
> > > > > I cannot recall such a notation, you can use #attr.parameterName to
> > > > > search throughout the ValueStack
> > > > >
> > > > > http://struts.apache.org/development/2.x/docs/ognl.html
> > > > >
> > > > >
> > > > > Regards
> > > > > --
> > > > > Łukasz
> > > > > + 48 606 323 122 http://www.lenart.org.pl/
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > > For additional commands, e-mail: user-help@struts.apache.org
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > e: davelnewton@gmail.com
> > > > m: 908-380-8699
> > > > s: davelnewton_skype
> > > > t: @dave_newton <https://twitter.com/dave_newton>
> > > > b: Bucky Bits <http://buckybits.blogspot.com/>
> > > > g: davelnewton <https://github.com/davelnewton>
> > > > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
> > > >
> > >
> >
> >
> >
> > --
> > e: davelnewton@gmail.com
> > m: 908-380-8699
> > s: davelnewton_skype
> > t: @dave_newton <https://twitter.com/dave_newton>
> > b: Bucky Bits <http://buckybits.blogspot.com/>
> > g: davelnewton <https://github.com/davelnewton>
> > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
> >
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
Re: valueStack [n].parameterName -- is it still there?
Posted by Maurizio Cucchiara <mc...@apache.org>.
Looking at the regex on the bottom of the page, I'd say: it's no more
allowed (http://goo.gl/oUlb6 click on the green button to test the regex
pattern).
But the regex could not represent the right behaviour, and I also didn't
test it.
Twitter :http://www.twitter.com/m_cucchiara
G+ :https://plus.google.com/107903711540963855921
Linkedin :http://www.linkedin.com/in/mauriziocucchiara
VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
Maurizio Cucchiara
On 18 February 2013 18:36, Dave Newton <da...@gmail.com> wrote:
> A brief look made me think [\d] was still allowed, but I also didn't play
> with it to actually find out.
>
> Dave
>
>
>
> On Mon, Feb 18, 2013 at 12:20 PM, Maurizio Cucchiara
> <mc...@apache.org>wrote:
>
> > There is a good chance that this notation went away after S2-009 (
> > http://goo.gl/NydYr), though I could be wrong .
> >
> > Twitter :http://www.twitter.com/m_cucchiara
> > G+ :https://plus.google.com/107903711540963855921
> > Linkedin :http://www.linkedin.com/in/mauriziocucchiara
> > VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
> >
> > Maurizio Cucchiara
> >
> >
> > On 18 February 2013 18:14, Dave Newton <da...@gmail.com> wrote:
> >
> > > The [0].foo notation should allow direct access to the nth item on the
> > > stack.
> > >
> > > I'm not aware of it intentionally going away, but I also don't use it
> > > regularly and would need to check.
> > >
> > > Dave
> > >
> > >
> > > On Mon, Feb 18, 2013 at 12:05 PM, Lukasz Lenart <
> lukaszlenart@apache.org
> > > >wrote:
> > >
> > > > 2013/2/18 Chris Mawata <ch...@gmail.com>:
> > > > > Hi all,
> > > > > I am using Struts 2.3.4.1 and i noticed the notation
> > > > > [n].parameterName to get a parameter of a given name
> > > > > when the first ocurrance is not the one you want is
> > > > > not working. I can't find any documentation that it was
> > > > > removed. Can anyone point me to something? I might
> > > > > not be searching by the technically correct name.
> > > >
> > > > I cannot recall such a notation, you can use #attr.parameterName to
> > > > search throughout the ValueStack
> > > >
> > > > http://struts.apache.org/development/2.x/docs/ognl.html
> > > >
> > > >
> > > > Regards
> > > > --
> > > > Łukasz
> > > > + 48 606 323 122 http://www.lenart.org.pl/
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > > For additional commands, e-mail: user-help@struts.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > > e: davelnewton@gmail.com
> > > m: 908-380-8699
> > > s: davelnewton_skype
> > > t: @dave_newton <https://twitter.com/dave_newton>
> > > b: Bucky Bits <http://buckybits.blogspot.com/>
> > > g: davelnewton <https://github.com/davelnewton>
> > > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
> > >
> >
>
>
>
> --
> e: davelnewton@gmail.com
> m: 908-380-8699
> s: davelnewton_skype
> t: @dave_newton <https://twitter.com/dave_newton>
> b: Bucky Bits <http://buckybits.blogspot.com/>
> g: davelnewton <https://github.com/davelnewton>
> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
>
Re: valueStack [n].parameterName -- is it still there?
Posted by Dave Newton <da...@gmail.com>.
A brief look made me think [\d] was still allowed, but I also didn't play
with it to actually find out.
Dave
On Mon, Feb 18, 2013 at 12:20 PM, Maurizio Cucchiara
<mc...@apache.org>wrote:
> There is a good chance that this notation went away after S2-009 (
> http://goo.gl/NydYr), though I could be wrong .
>
> Twitter :http://www.twitter.com/m_cucchiara
> G+ :https://plus.google.com/107903711540963855921
> Linkedin :http://www.linkedin.com/in/mauriziocucchiara
> VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
>
> Maurizio Cucchiara
>
>
> On 18 February 2013 18:14, Dave Newton <da...@gmail.com> wrote:
>
> > The [0].foo notation should allow direct access to the nth item on the
> > stack.
> >
> > I'm not aware of it intentionally going away, but I also don't use it
> > regularly and would need to check.
> >
> > Dave
> >
> >
> > On Mon, Feb 18, 2013 at 12:05 PM, Lukasz Lenart <lukaszlenart@apache.org
> > >wrote:
> >
> > > 2013/2/18 Chris Mawata <ch...@gmail.com>:
> > > > Hi all,
> > > > I am using Struts 2.3.4.1 and i noticed the notation
> > > > [n].parameterName to get a parameter of a given name
> > > > when the first ocurrance is not the one you want is
> > > > not working. I can't find any documentation that it was
> > > > removed. Can anyone point me to something? I might
> > > > not be searching by the technically correct name.
> > >
> > > I cannot recall such a notation, you can use #attr.parameterName to
> > > search throughout the ValueStack
> > >
> > > http://struts.apache.org/development/2.x/docs/ognl.html
> > >
> > >
> > > Regards
> > > --
> > > Łukasz
> > > + 48 606 323 122 http://www.lenart.org.pl/
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> > e: davelnewton@gmail.com
> > m: 908-380-8699
> > s: davelnewton_skype
> > t: @dave_newton <https://twitter.com/dave_newton>
> > b: Bucky Bits <http://buckybits.blogspot.com/>
> > g: davelnewton <https://github.com/davelnewton>
> > so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
> >
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
Re: valueStack [n].parameterName -- is it still there?
Posted by Maurizio Cucchiara <mc...@apache.org>.
There is a good chance that this notation went away after S2-009 (
http://goo.gl/NydYr), though I could be wrong .
Twitter :http://www.twitter.com/m_cucchiara
G+ :https://plus.google.com/107903711540963855921
Linkedin :http://www.linkedin.com/in/mauriziocucchiara
VisualizeMe: http://vizualize.me/maurizio.cucchiara?r=maurizio.cucchiara
Maurizio Cucchiara
On 18 February 2013 18:14, Dave Newton <da...@gmail.com> wrote:
> The [0].foo notation should allow direct access to the nth item on the
> stack.
>
> I'm not aware of it intentionally going away, but I also don't use it
> regularly and would need to check.
>
> Dave
>
>
> On Mon, Feb 18, 2013 at 12:05 PM, Lukasz Lenart <lukaszlenart@apache.org
> >wrote:
>
> > 2013/2/18 Chris Mawata <ch...@gmail.com>:
> > > Hi all,
> > > I am using Struts 2.3.4.1 and i noticed the notation
> > > [n].parameterName to get a parameter of a given name
> > > when the first ocurrance is not the one you want is
> > > not working. I can't find any documentation that it was
> > > removed. Can anyone point me to something? I might
> > > not be searching by the technically correct name.
> >
> > I cannot recall such a notation, you can use #attr.parameterName to
> > search throughout the ValueStack
> >
> > http://struts.apache.org/development/2.x/docs/ognl.html
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> e: davelnewton@gmail.com
> m: 908-380-8699
> s: davelnewton_skype
> t: @dave_newton <https://twitter.com/dave_newton>
> b: Bucky Bits <http://buckybits.blogspot.com/>
> g: davelnewton <https://github.com/davelnewton>
> so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
>
Re: valueStack [n].parameterName -- is it still there?
Posted by Dave Newton <da...@gmail.com>.
The [0].foo notation should allow direct access to the nth item on the
stack.
I'm not aware of it intentionally going away, but I also don't use it
regularly and would need to check.
Dave
On Mon, Feb 18, 2013 at 12:05 PM, Lukasz Lenart <lu...@apache.org>wrote:
> 2013/2/18 Chris Mawata <ch...@gmail.com>:
> > Hi all,
> > I am using Struts 2.3.4.1 and i noticed the notation
> > [n].parameterName to get a parameter of a given name
> > when the first ocurrance is not the one you want is
> > not working. I can't find any documentation that it was
> > removed. Can anyone point me to something? I might
> > not be searching by the technically correct name.
>
> I cannot recall such a notation, you can use #attr.parameterName to
> search throughout the ValueStack
>
> http://struts.apache.org/development/2.x/docs/ognl.html
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
e: davelnewton@gmail.com
m: 908-380-8699
s: davelnewton_skype
t: @dave_newton <https://twitter.com/dave_newton>
b: Bucky Bits <http://buckybits.blogspot.com/>
g: davelnewton <https://github.com/davelnewton>
so: Dave Newton <http://stackoverflow.com/users/438992/dave-newton>
Re: valueStack [n].parameterName -- is it still there?
Posted by Lukasz Lenart <lu...@apache.org>.
2013/2/18 Chris Mawata <ch...@gmail.com>:
> Hi all,
> I am using Struts 2.3.4.1 and i noticed the notation
> [n].parameterName to get a parameter of a given name
> when the first ocurrance is not the one you want is
> not working. I can't find any documentation that it was
> removed. Can anyone point me to something? I might
> not be searching by the technically correct name.
I cannot recall such a notation, you can use #attr.parameterName to
search throughout the ValueStack
http://struts.apache.org/development/2.x/docs/ognl.html
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
valueStack [n].parameterName -- is it still there?
Posted by Chris Mawata <ch...@gmail.com>.
Hi all,
I am using Struts 2.3.4.1 and i noticed the notation
[n].parameterName to get a parameter of a given name
when the first ocurrance is not the one you want is
not working. I can't find any documentation that it was
removed. Can anyone point me to something? I might
not be searching by the technically correct name.
Thanks
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [Struts 2] How can I receive notification when the web app has
been destroyed?
Posted by Kevin Duffey <ke...@bluechipexec.com>.
As another said.. in web.xml you configure a servlet context listener, in
your code you provide a class that implements the ServletContextListener
and you can use it to know when the app is deployed and undeployed.
On Fri, Aug 24, 2012 at 12:54 PM, John Boyer <jo...@rodaxsoft.com> wrote:
> So that I can cleanup resources. How can I receive a notification in a
> Struts 2 web app when the app has been unloaded, stopped, un-deployed, etc.?
>
> Thank you,
> John Boyer
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>