Author Login
Post Reply
user Digest 12 May 2008 20:30:13 -0000 Issue 8024
Topics (messages 186363 through 186368):
Re: [s2] Getting the current Action name in a JSP?
186363 by: Musachy Barroso
186364 by: Allen, Daniel
186366 by: Musachy Barroso
186367 by: Allen, Daniel
186368 by: Volker Karlmeier
global-exceptions-mappings help
186365 by: Dan Crosta
Administrivia:
---------------------------------------------------------------------
To post to the list, e-mail: user@(protected)
To unsubscribe, e-mail: user-digest-unsubscribe@(protected)
For additional commands, e-mail: user-digest-help@(protected)
----------------------------------------------------------------------

Attachment:
user_186363.ezm (zipped)%{#struts.actionMapping} ->Action Mapping
%{#action} -> Last executed action
musachy
On Mon, May 12, 2008 at 3:05 PM, Dave Newton <newton.dave@(protected):
> --- "Allen, Daniel" <Daniel.Allen@(protected):
> > So that's what #action gets? That's really useful, thanks!
>
> Wait, what? I'm not sure that #action is mapped to anything, and if it
> was, it'd be the action itself, not its configuration.
>
> Dave
>
>
>
> > -----Original Message-----
> > From: Musachy Barroso [mailto:musachy@(protected)]
> > Sent: Monday, May 12, 2008 1:52 PM
> > To: Struts Users Mailing List
> > Subject: Re: [s2] Getting the current Action name in a JSP?
> >
> > Under "struts.actionMapping" there will be an object of type
> > "
org.apache.struts2.dispatcher.mapper.ActionMapping" with fields:
> > extension, name, namespace, params and method. Another tip, if you
> > have the "debug" interceptor applied to your action you can add
> > debug=browser to the url and you will be able to browse the values
> > stored in the stack.
> >
> > musachy
> >
> > On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel
> > <Daniel.Allen@(protected)>
> > wrote:
> > > Thanks for the tip, but to clarify, what I want to know is whether
> > that
> > > action reference has an easy, built-in way to get its name and
> > > namespace, as configured in struts.xml.
> > >
> > > For example, I have in struts.xml
> > > <action name="doSample" class="package.DoSampleAction">
> > > <result name="success">sample.jsp</result
> > > </action>
> > >
> > > Can I put into sample.jsp a reference to something built-in like
> > > <s:property value="#action.name">? Or will I have to actually edit
> > the
> > > DoSampleAction.java to create a getConfiguredName() property
> > before I
> > > can do that? I didn't see anything in the API document for
> > > ActionSupport.
> > >
> > > ~DVA
> > >
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > Sent: Monday, May 12, 2008 12:45 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: [s2] Getting the current Action name in a JSP?
> > >
> > > "#action" will give you a reference to the last executed action.
> > >
> > > musachy
> > >
> > > On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
> > <Daniel.Allen@(protected)>
> > > wrote:
> > > > Hi, all.
> > > >
> > > > I'm using Sitemesh decorators on my Struts2 project to create a
> > > generic
> > > > header menu. However, I'd like to use a CSS class to highlight
> > the
> > > menu
> > > > item for where the user currently is. Is there a good way to
> > get
> > the
> > > > current action name and namespace just with JSP code? I know I
> > can
> > > get
> > > > it using Java code and then put it into my JSPs by accessing
> > the
> > > action
> > > > property via OGNL. I'm just wondering if there is a built-in
> > way
> > to
> > > get
> > > > that information.
> > > >
> > > > Thanks,
> > > > ~Dan Allen
> > > >
> > > > --
> > > > This message may contain confidential, proprietary, or legally
> > > privileged information. No confidentiality or privilege is waived
> > by
> > any
> > > transmission to an unintended recipient. If you are not an
> > intended
> > > recipient, please notify the sender and delete this message
> > immediately.
> > > Any views expressed in this message are those of the sender, not
> > those
> > > of any entity within the KBC Financial Products group of companies
> > > (together referred to as "KBC FP").
> > > >
> > > > This message does not create any obligation, contractual or
> > > otherwise, on the part of KBC FP. It is not an offer (or
> > solicitation
> > of
> > > an offer) of, or a recommendation to buy or sell, any financial
> > product.
> > > Any prices or other values included in this message are indicative
> > only,
> > > and do not necessarily represent current market prices, prices at
> > which
> > > KBC FP would enter into a transaction, or prices at which similar
> > > transactions may be carried on KBC FP's own books. The information
> > > contained in this message is provided "as is", without
> > representations
> > > or warranties, express or implied, of any kind. Past performance
> > is
> > not
> > > indicative of future returns.
> > > >
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > > --
> > > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived by
> > any
> > transmission to an unintended recipient. If you are not an intended
> > recipient, please notify the sender and delete this message
> > immediately.
> > Any views expressed in this message are those of the sender, not
> > those
> > of any entity within the KBC Financial Products group of companies
> > (together referred to as "KBC FP").
> > >
> > > This message does not create any obligation, contractual or
> > otherwise, on the part of KBC FP. It is not an offer (or solicitation
> > of
> > an offer) of, or a recommendation to buy or sell, any financial
> > product.
> > Any prices or other values included in this message are indicative
> > only,
> > and do not necessarily represent current market prices, prices at
> > which
> > KBC FP would enter into a transaction, or prices at which similar
> > transactions may be carried on KBC FP's own books. The information
> > contained in this message is provided "as is", without
> > representations
> > or warranties, express or implied, of any kind. Past performance is
> > not
> > indicative of future returns.
> > >
> > >
> > >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived by
> > any transmission to an unintended recipient. If you are not an
> > intended recipient, please notify the sender and delete this message
> > immediately. Any views expressed in this message are those of the
> > sender, not those of any entity within the KBC Financial Products
> > group of companies (together referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or
> > otherwise, on the part of KBC FP. It is not an offer (or solicitation
> > of an offer) of, or a recommendation to buy or sell, any financial
> > product. Any prices or other values included in this message are
> > indicative only, and do not necessarily represent current market
> > prices, prices at which KBC FP would enter into a transaction, or
> > prices at which similar transactions may be carried on KBC FP's own
> > books. The information contained in this message is provided "as is",
> > without representations or warranties, express or implied, of any
> > kind. Past performance is not indicative of future returns.
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_186364.ezm (zipped)Ok, thanks for the clarification.
What is the Java type of #struts? I'd like to take a look at the docs to
see what else I can get out of that.
~DVA
-----Original Message-----
From: Musachy Barroso [mailto:musachy@(protected)]
Sent: Monday, May 12, 2008 3:07 PM
To: Struts Users Mailing List
Subject: Re: [s2] Getting the current Action name in a JSP?
%{#struts.actionMapping} ->Action Mapping
%{#action} -> Last executed action
musachy
On Mon, May 12, 2008 at 3:05 PM, Dave Newton <newton.dave@(protected)>
wrote:
> --- "Allen, Daniel" <Daniel.Allen@(protected):
> > So that's what #action gets? That's really useful, thanks!
>
> Wait, what? I'm not sure that #action is mapped to anything, and if
it
> was, it'd be the action itself, not its configuration.
>
> Dave
>
>
>
> > -----Original Message-----
> > From: Musachy Barroso [mailto:musachy@(protected)]
> > Sent: Monday, May 12, 2008 1:52 PM
> > To: Struts Users Mailing List
> > Subject: Re: [s2] Getting the current Action name in a JSP?
> >
> > Under "struts.actionMapping" there will be an object of type
> > "
org.apache.struts2.dispatcher.mapper.ActionMapping" with fields:
> > extension, name, namespace, params and method. Another tip, if you
> > have the "debug" interceptor applied to your action you can add
> > debug=browser to the url and you will be able to browse the values
> > stored in the stack.
> >
> > musachy
> >
> > On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel
> > <Daniel.Allen@(protected)>
> > wrote:
> > > Thanks for the tip, but to clarify, what I want to know is
whether
> > that
> > > action reference has an easy, built-in way to get its name and
> > > namespace, as configured in struts.xml.
> > >
> > > For example, I have in struts.xml
> > > <action name="doSample" class="package.DoSampleAction">
> > > <result name="success">sample.jsp</result
> > > </action>
> > >
> > > Can I put into sample.jsp a reference to something built-in like
> > > <s:property value="#action.name">? Or will I have to actually
edit
> > the
> > > DoSampleAction.java to create a getConfiguredName() property
> > before I
> > > can do that? I didn't see anything in the API document for
> > > ActionSupport.
> > >
> > > ~DVA
> > >
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > Sent: Monday, May 12, 2008 12:45 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: [s2] Getting the current Action name in a JSP?
> > >
> > > "#action" will give you a reference to the last executed action.
> > >
> > > musachy
> > >
> > > On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
> > <Daniel.Allen@(protected)>
> > > wrote:
> > > > Hi, all.
> > > >
> > > > I'm using Sitemesh decorators on my Struts2 project to create
a
> > > generic
> > > > header menu. However, I'd like to use a CSS class to
highlight
> > the
> > > menu
> > > > item for where the user currently is. Is there a good way to
> > get
> > the
> > > > current action name and namespace just with JSP code? I know
I
> > can
> > > get
> > > > it using Java code and then put it into my JSPs by accessing
> > the
> > > action
> > > > property via OGNL. I'm just wondering if there is a built-in
> > way
> > to
> > > get
> > > > that information.
> > > >
> > > > Thanks,
> > > > ~Dan Allen
> > > >
> > > > --
> > > > This message may contain confidential, proprietary, or
legally
> > > privileged information. No confidentiality or privilege is
waived
> > by
> > any
> > > transmission to an unintended recipient. If you are not an
> > intended
> > > recipient, please notify the sender and delete this message
> > immediately.
> > > Any views expressed in this message are those of the sender, not
> > those
> > > of any entity within the KBC Financial Products group of
companies
> > > (together referred to as "KBC FP").
> > > >
> > > > This message does not create any obligation, contractual or
> > > otherwise, on the part of KBC FP. It is not an offer (or
> > solicitation
> > of
> > > an offer) of, or a recommendation to buy or sell, any financial
> > product.
> > > Any prices or other values included in this message are
indicative
> > only,
> > > and do not necessarily represent current market prices, prices
at
> > which
> > > KBC FP would enter into a transaction, or prices at which
similar
> > > transactions may be carried on KBC FP's own books. The
information
> > > contained in this message is provided "as is", without
> > representations
> > > or warranties, express or implied, of any kind. Past performance
> > is
> > not
> > > indicative of future returns.
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > > --
> > > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived
by
> > any
> > transmission to an unintended recipient. If you are not an intended
> > recipient, please notify the sender and delete this message
> > immediately.
> > Any views expressed in this message are those of the sender, not
> > those
> > of any entity within the KBC Financial Products group of companies
> > (together referred to as "KBC FP").
> > >
> > > This message does not create any obligation, contractual or
> > otherwise, on the part of KBC FP. It is not an offer (or
solicitation
> > of
> > an offer) of, or a recommendation to buy or sell, any financial
> > product.
> > Any prices or other values included in this message are indicative
> > only,
> > and do not necessarily represent current market prices, prices at
> > which
> > KBC FP would enter into a transaction, or prices at which similar
> > transactions may be carried on KBC FP's own books. The information
> > contained in this message is provided "as is", without
> > representations
> > or warranties, express or implied, of any kind. Past performance is
> > not
> > indicative of future returns.
> > >
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived
by
> > any transmission to an unintended recipient. If you are not an
> > intended recipient, please notify the sender and delete this
message
> > immediately. Any views expressed in this message are those of the
> > sender, not those of any entity within the KBC Financial Products
> > group of companies (together referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or
> > otherwise, on the part of KBC FP. It is not an offer (or
solicitation
> > of an offer) of, or a recommendation to buy or sell, any financial
> > product. Any prices or other values included in this message are
> > indicative only, and do not necessarily represent current market
> > prices, prices at which KBC FP would enter into a transaction, or
> > prices at which similar transactions may be carried on KBC FP's own
> > books. The information contained in this message is provided "as
is",
> > without representations or warranties, express or implied, of any
> > kind. Past performance is not indicative of future returns.
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
--
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.

Attachment:
user_186366.ezm (zipped)My bad on that one, "#struts.actionMapping" won't return anything (no
#struts object, 'struts.actionMapping' is an string)
You need to use:
#context['struts.actionMapping']
musachy
//these values are for internal struts use, so use at your own risk :)
On Mon, May 12, 2008 at 3:10 PM, Allen, Daniel <Daniel.Allen@(protected):
> Ok, thanks for the clarification.
>
> What is the Java type of #struts? I'd like to take a look at the docs to
> see what else I can get out of that.
>
>
> ~DVA
>
> -----Original Message-----
> From: Musachy Barroso [mailto:musachy@(protected)]
>
>
> Sent: Monday, May 12, 2008 3:07 PM
> To: Struts Users Mailing List
> Subject: Re: [s2] Getting the current Action name in a JSP?
>
> %{#struts.actionMapping} ->Action Mapping
> %{#action} -> Last executed action
>
> musachy
>
> On Mon, May 12, 2008 at 3:05 PM, Dave Newton <newton.dave@(protected)>
> wrote:
> > --- "Allen, Daniel" <Daniel.Allen@(protected):
> > > So that's what #action gets? That's really useful, thanks!
> >
> > Wait, what? I'm not sure that #action is mapped to anything, and if
> it
> > was, it'd be the action itself, not its configuration.
> >
> > Dave
> >
> >
> >
> > > -----Original Message-----
> > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > Sent: Monday, May 12, 2008 1:52 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: [s2] Getting the current Action name in a JSP?
> > >
> > > Under "struts.actionMapping" there will be an object of type
> > > "
org.apache.struts2.dispatcher.mapper.ActionMapping" with fields:
> > > extension, name, namespace, params and method. Another tip, if you
> > > have the "debug" interceptor applied to your action you can add
> > > debug=browser to the url and you will be able to browse the values
> > > stored in the stack.
> > >
> > > musachy
> > >
> > > On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel
> > > <Daniel.Allen@(protected)>
> > > wrote:
> > > > Thanks for the tip, but to clarify, what I want to know is
> whether
> > > that
> > > > action reference has an easy, built-in way to get its name and
> > > > namespace, as configured in struts.xml.
> > > >
> > > > For example, I have in struts.xml
> > > > <action name="doSample" class="package.DoSampleAction">
> > > > <result name="success">sample.jsp</result
> > > > </action>
> > > >
> > > > Can I put into sample.jsp a reference to something built-in like
> > > > <s:property value="#action.name">? Or will I have to actually
> edit
> > > the
> > > > DoSampleAction.java to create a getConfiguredName() property
> > > before I
> > > > can do that? I didn't see anything in the API document for
> > > > ActionSupport.
> > > >
> > > > ~DVA
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > > Sent: Monday, May 12, 2008 12:45 PM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: [s2] Getting the current Action name in a JSP?
> > > >
> > > > "#action" will give you a reference to the last executed action.
> > > >
> > > > musachy
> > > >
> > > > On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
> > > <Daniel.Allen@(protected)>
> > > > wrote:
> > > > > Hi, all.
> > > > >
> > > > > I'm using Sitemesh decorators on my Struts2 project to create
> a
> > > > generic
> > > > > header menu. However, I'd like to use a CSS class to
> highlight
> > > the
> > > > menu
> > > > > item for where the user currently is. Is there a good way to
> > > get
> > > the
> > > > > current action name and namespace just with JSP code? I know
> I
> > > can
> > > > get
> > > > > it using Java code and then put it into my JSPs by accessing
> > > the
> > > > action
> > > > > property via OGNL. I'm just wondering if there is a built-in
> > > way
> > > to
> > > > get
> > > > > that information.
> > > > >
> > > > > Thanks,
> > > > > ~Dan Allen
> > > > >
> > > > > --
> > > > > This message may contain confidential, proprietary, or
> legally
> > > > privileged information. No confidentiality or privilege is
> waived
> > > by
> > > any
> > > > transmission to an unintended recipient. If you are not an
> > > intended
> > > > recipient, please notify the sender and delete this message
> > > immediately.
> > > > Any views expressed in this message are those of the sender, not
> > > those
> > > > of any entity within the KBC Financial Products group of
> companies
> > > > (together referred to as "KBC FP").
> > > > >
> > > > > This message does not create any obligation, contractual or
> > > > otherwise, on the part of KBC FP. It is not an offer (or
> > > solicitation
> > > of
> > > > an offer) of, or a recommendation to buy or sell, any financial
> > > product.
> > > > Any prices or other values included in this message are
> indicative
> > > only,
> > > > and do not necessarily represent current market prices, prices
> at
> > > which
> > > > KBC FP would enter into a transaction, or prices at which
> similar
> > > > transactions may be carried on KBC FP's own books. The
> information
> > > > contained in this message is provided "as is", without
> > > representations
> > > > or warranties, express or implied, of any kind. Past performance
> > > is
> > > not
> > > > indicative of future returns.
> > > > >
> > > > >
> > > > >
> > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > > For additional commands, e-mail: user-help@(protected)
> > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > > > --
> > > > This message may contain confidential, proprietary, or legally
> > > privileged information. No confidentiality or privilege is waived
> by
> > > any
> > > transmission to an unintended recipient. If you are not an intended
> > > recipient, please notify the sender and delete this message
> > > immediately.
> > > Any views expressed in this message are those of the sender, not
> > > those
> > > of any entity within the KBC Financial Products group of companies
> > > (together referred to as "KBC FP").
> > > >
> > > > This message does not create any obligation, contractual or
> > > otherwise, on the part of KBC FP. It is not an offer (or
> solicitation
> > > of
> > > an offer) of, or a recommendation to buy or sell, any financial
> > > product.
> > > Any prices or other values included in this message are indicative
> > > only,
> > > and do not necessarily represent current market prices, prices at
> > > which
> > > KBC FP would enter into a transaction, or prices at which similar
> > > transactions may be carried on KBC FP's own books. The information
> > > contained in this message is provided "as is", without
> > > representations
> > > or warranties, express or implied, of any kind. Past performance is
> > > not
> > > indicative of future returns.
> > > >
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > > --
> > > This message may contain confidential, proprietary, or legally
> > > privileged information. No confidentiality or privilege is waived
> by
> > > any transmission to an unintended recipient. If you are not an
> > > intended recipient, please notify the sender and delete this
> message
> > > immediately. Any views expressed in this message are those of the
> > > sender, not those of any entity within the KBC Financial Products
> > > group of companies (together referred to as "KBC FP").
> > >
> > > This message does not create any obligation, contractual or
> > > otherwise, on the part of KBC FP. It is not an offer (or
> solicitation
> > > of an offer) of, or a recommendation to buy or sell, any financial
> > > product. Any prices or other values included in this message are
> > > indicative only, and do not necessarily represent current market
> > > prices, prices at which KBC FP would enter into a transaction, or
> > > prices at which similar transactions may be carried on KBC FP's own
> > > books. The information contained in this message is provided "as
> is",
> > > without representations or warranties, express or implied, of any
> > > kind. Past performance is not indicative of future returns.
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
> --
> This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
>
> This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd

Attachment:
user_186367.ezm (zipped)Oh, ok. I was just in the middle of poking around the debug info to see
why that wasn't working.
Thanks,
~DVA
-----Original Message-----
From: Allen, Daniel
Sent: Monday, May 12, 2008 3:11 PM
To: Struts Users Mailing List
Subject: RE: [s2] Getting the current Action name in a JSP?
Ok, thanks for the clarification.
What is the Java type of #struts? I'd like to take a look at the docs to
see what else I can get out of that.
~DVA
-----Original Message-----
From: Musachy Barroso [mailto:musachy@(protected)]
Sent: Monday, May 12, 2008 3:07 PM
To: Struts Users Mailing List
Subject: Re: [s2] Getting the current Action name in a JSP?
%{#struts.actionMapping} ->Action Mapping
%{#action} -> Last executed action
musachy
On Mon, May 12, 2008 at 3:05 PM, Dave Newton <newton.dave@(protected)>
wrote:
> --- "Allen, Daniel" <Daniel.Allen@(protected):
> > So that's what #action gets? That's really useful, thanks!
>
> Wait, what? I'm not sure that #action is mapped to anything, and if
it
> was, it'd be the action itself, not its configuration.
>
> Dave
>
>
>
> > -----Original Message-----
> > From: Musachy Barroso [mailto:musachy@(protected)]
> > Sent: Monday, May 12, 2008 1:52 PM
> > To: Struts Users Mailing List
> > Subject: Re: [s2] Getting the current Action name in a JSP?
> >
> > Under "struts.actionMapping" there will be an object of type
> > "
org.apache.struts2.dispatcher.mapper.ActionMapping" with fields:
> > extension, name, namespace, params and method. Another tip, if you
> > have the "debug" interceptor applied to your action you can add
> > debug=browser to the url and you will be able to browse the values
> > stored in the stack.
> >
> > musachy
> >
> > On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel
> > <Daniel.Allen@(protected)>
> > wrote:
> > > Thanks for the tip, but to clarify, what I want to know is
whether
> > that
> > > action reference has an easy, built-in way to get its name and
> > > namespace, as configured in struts.xml.
> > >
> > > For example, I have in struts.xml
> > > <action name="doSample" class="package.DoSampleAction">
> > > <result name="success">sample.jsp</result
> > > </action>
> > >
> > > Can I put into sample.jsp a reference to something built-in like
> > > <s:property value="#action.name">? Or will I have to actually
edit
> > the
> > > DoSampleAction.java to create a getConfiguredName() property
> > before I
> > > can do that? I didn't see anything in the API document for
> > > ActionSupport.
> > >
> > > ~DVA
> > >
> > >
> > >
> > >
> > >
> > > -----Original Message-----
> > > From: Musachy Barroso [mailto:musachy@(protected)]
> > > Sent: Monday, May 12, 2008 12:45 PM
> > > To: Struts Users Mailing List
> > > Subject: Re: [s2] Getting the current Action name in a JSP?
> > >
> > > "#action" will give you a reference to the last executed action.
> > >
> > > musachy
> > >
> > > On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
> > <Daniel.Allen@(protected)>
> > > wrote:
> > > > Hi, all.
> > > >
> > > > I'm using Sitemesh decorators on my Struts2 project to create
a
> > > generic
> > > > header menu. However, I'd like to use a CSS class to
highlight
> > the
> > > menu
> > > > item for where the user currently is. Is there a good way to
> > get
> > the
> > > > current action name and namespace just with JSP code? I know
I
> > can
> > > get
> > > > it using Java code and then put it into my JSPs by accessing
> > the
> > > action
> > > > property via OGNL. I'm just wondering if there is a built-in
> > way
> > to
> > > get
> > > > that information.
> > > >
> > > > Thanks,
> > > > ~Dan Allen
> > > >
> > > > --
> > > > This message may contain confidential, proprietary, or
legally
> > > privileged information. No confidentiality or privilege is
waived
> > by
> > any
> > > transmission to an unintended recipient. If you are not an
> > intended
> > > recipient, please notify the sender and delete this message
> > immediately.
> > > Any views expressed in this message are those of the sender, not
> > those
> > > of any entity within the KBC Financial Products group of
companies
> > > (together referred to as "KBC FP").
> > > >
> > > > This message does not create any obligation, contractual or
> > > otherwise, on the part of KBC FP. It is not an offer (or
> > solicitation
> > of
> > > an offer) of, or a recommendation to buy or sell, any financial
> > product.
> > > Any prices or other values included in this message are
indicative
> > only,
> > > and do not necessarily represent current market prices, prices
at
> > which
> > > KBC FP would enter into a transaction, or prices at which
similar
> > > transactions may be carried on KBC FP's own books. The
information
> > > contained in this message is provided "as is", without
> > representations
> > > or warranties, express or implied, of any kind. Past performance
> > is
> > not
> > > indicative of future returns.
> > > >
> > > >
> > > >
> >
---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > > For additional commands, e-mail: user-help@(protected)
> > > >
> > > >
> > >
> > >
> > >
> > > --
> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> > > --
> > > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived
by
> > any
> > transmission to an unintended recipient. If you are not an intended
> > recipient, please notify the sender and delete this message
> > immediately.
> > Any views expressed in this message are those of the sender, not
> > those
> > of any entity within the KBC Financial Products group of companies
> > (together referred to as "KBC FP").
> > >
> > > This message does not create any obligation, contractual or
> > otherwise, on the part of KBC FP. It is not an offer (or
solicitation
> > of
> > an offer) of, or a recommendation to buy or sell, any financial
> > product.
> > Any prices or other values included in this message are indicative
> > only,
> > and do not necessarily represent current market prices, prices at
> > which
> > KBC FP would enter into a transaction, or prices at which similar
> > transactions may be carried on KBC FP's own books. The information
> > contained in this message is provided "as is", without
> > representations
> > or warranties, express or implied, of any kind. Past performance is
> > not
> > indicative of future returns.
> > >
> > >
> > >
> >
---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > > For additional commands, e-mail: user-help@(protected)
> > >
> > >
> >
> >
> >
> > --
> > "Hey you! Would you help me to carry the stone?" Pink Floyd
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
> > --
> > This message may contain confidential, proprietary, or legally
> > privileged information. No confidentiality or privilege is waived
by
> > any transmission to an unintended recipient. If you are not an
> > intended recipient, please notify the sender and delete this
message
> > immediately. Any views expressed in this message are those of the
> > sender, not those of any entity within the KBC Financial Products
> > group of companies (together referred to as "KBC FP").
> >
> > This message does not create any obligation, contractual or
> > otherwise, on the part of KBC FP. It is not an offer (or
solicitation
> > of an offer) of, or a recommendation to buy or sell, any financial
> > product. Any prices or other values included in this message are
> > indicative only, and do not necessarily represent current market
> > prices, prices at which KBC FP would enter into a transaction, or
> > prices at which similar transactions may be carried on KBC FP's own
> > books. The information contained in this message is provided "as
is",
> > without representations or warranties, express or implied, of any
> > kind. Past performance is not indicative of future returns.
> >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@(protected)
> > For additional commands, e-mail: user-help@(protected)
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
"Hey you! Would you help me to carry the stone?" Pink Floyd
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
--
This message may contain confidential, proprietary, or legally
privileged information. No confidentiality or privilege is waived by any
transmission to an unintended recipient. If you are not an intended
recipient, please notify the sender and delete this message immediately.
Any views expressed in this message are those of the sender, not those
of any entity within the KBC Financial Products group of companies
(together referred to as "KBC FP").
This message does not create any obligation, contractual or otherwise,
on the part of KBC FP. It is not an offer (or solicitation of an offer)
of, or a recommendation to buy or sell, any financial product. Any
prices or other values included in this message are indicative only, and
do not necessarily represent current market prices, prices at which KBC
FP would enter into a transaction, or prices at which similar
transactions may be carried on KBC FP's own books. The information
contained in this message is provided "as is", without representations
or warranties, express or implied, of any kind. Past performance is not
indicative of future returns.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
--
This message may contain confidential, proprietary, or legally privileged information. No confidentiality or privilege is waived by any transmission to an unintended recipient. If you are not an intended recipient, please notify the sender and delete this message immediately. Any views expressed in this message are those of the sender, not those of any entity within the KBC Financial Products group of companies (together referred to as "KBC FP").
This message does not create any obligation, contractual or otherwise, on the part of KBC FP. It is not an offer (or solicitation of an offer) of, or a recommendation to buy or sell, any financial product. Any prices or other values included in this message are indicative only, and do not necessarily represent current market prices, prices at which KBC FP would enter into a transaction, or prices at which similar transactions may be carried on KBC FP's own books. The information contained in this message is provided "as is", without representations or warranties, express or implied, of any kind. Past performance is not indicative of future returns.

Attachment:
user_186368.ezm (zipped)-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi,
for myself, I solved the problem by a little routine in my (base) action
class.
I don't know if this is the recommended way to to it, but it works for me.
~ @SuppressWarnings("unchecked")
~ protected String getActionName() {
~ Enumeration<String> params =
getServletRequest().getParameterNames();
~ String action=null;
~ while (params.hasMoreElements()) {
~ String key=params.nextElement();
~ if (key.startsWith("action:")) {
~ action=key.substring(7);
~ break;
~ }
~ }
~ return action;
~ }
Regards
~ Volker
Allen, Daniel schrieb:
| Oh, ok. I was just in the middle of poking around the debug info to see
| why that wasn't working.
|
| Thanks,
| ~DVA
|
| -----Original Message-----
| From: Allen, Daniel
| Sent: Monday, May 12, 2008 3:11 PM
| To: Struts Users Mailing List
| Subject: RE: [s2] Getting the current Action name in a JSP?
|
| Ok, thanks for the clarification.
|
| What is the Java type of #struts? I'd like to take a look at the docs to
| see what else I can get out of that.
|
| ~DVA
|
| -----Original Message-----
| From: Musachy Barroso [mailto:musachy@(protected)]
| Sent: Monday, May 12, 2008 3:07 PM
| To: Struts Users Mailing List
| Subject: Re: [s2] Getting the current Action name in a JSP?
|
| %{#struts.actionMapping} ->Action Mapping
| %{#action} -> Last executed action
|
| musachy
|
| On Mon, May 12, 2008 at 3:05 PM, Dave Newton <newton.dave@(protected)>
| wrote:
|> --- "Allen, Daniel" <Daniel.Allen@(protected):
|> > So that's what #action gets? That's really useful, thanks!
|>
|> Wait, what? I'm not sure that #action is mapped to anything, and if
| it
|> was, it'd be the action itself, not its configuration.
|>
|> Dave
|>
|>
|>
|> > -----Original Message-----
|> > From: Musachy Barroso [mailto:musachy@(protected)]
|> > Sent: Monday, May 12, 2008 1:52 PM
|> > To: Struts Users Mailing List
|> > Subject: Re: [s2] Getting the current Action name in a JSP?
|> >
|> > Under "struts.actionMapping" there will be an object of type
|> > "
org.apache.struts2.dispatcher.mapper.ActionMapping" with fields:
|> > extension, name, namespace, params and method. Another tip, if you
|> > have the "debug" interceptor applied to your action you can add
|> > debug=browser to the url and you will be able to browse the values
|> > stored in the stack.
|> >
|> > musachy
|> >
|> > On Mon, May 12, 2008 at 1:35 PM, Allen, Daniel
|> > <Daniel.Allen@(protected)>
|> > wrote:
|> > > Thanks for the tip, but to clarify, what I want to know is
| whether
|> > that
|> > > action reference has an easy, built-in way to get its name and
|> > > namespace, as configured in struts.xml.
|> > >
|> > > For example, I have in struts.xml
|> > > <action name="doSample" class="package.DoSampleAction">
|> > > <result name="success">sample.jsp</result
|> > > </action>
|> > >
|> > > Can I put into sample.jsp a reference to something built-in like
|> > > <s:property value="#action.name">? Or will I have to actually
| edit
|> > the
|> > > DoSampleAction.java to create a getConfiguredName() property
|> > before I
|> > > can do that? I didn't see anything in the API document for
|> > > ActionSupport.
|> > >
|> > > ~DVA
|> > >
|> > >
|> > >
|> > >
|> > >
|> > > -----Original Message-----
|> > > From: Musachy Barroso [mailto:musachy@(protected)]
|> > > Sent: Monday, May 12, 2008 12:45 PM
|> > > To: Struts Users Mailing List
|> > > Subject: Re: [s2] Getting the current Action name in a JSP?
|> > >
|> > > "#action" will give you a reference to the last executed action.
|> > >
|> > > musachy
|> > >
|> > > On Mon, May 12, 2008 at 12:10 PM, Allen, Daniel
|> > <Daniel.Allen@(protected)>
|> > > wrote:
|> > > > Hi, all.
|> > > >
|> > > > I'm using Sitemesh decorators on my Struts2 project to create
| a
|> > > generic
|> > > > header menu. However, I'd like to use a CSS class to
| highlight
|> > the
|> > > menu
|> > > > item for where the user currently is. Is there a good way to
|> > get
|> > the
|> > > > current action name and namespace just with JSP code? I know
| I
|> > can
|> > > get
|> > > > it using Java code and then put it into my JSPs by accessing
|> > the
|> > > action
|> > > > property via OGNL. I'm just wondering if there is a built-in
|> > way
|> > to
|> > > get
|> > > > that information.
|> > > >
|> > > > Thanks,
|> > > > ~Dan Allen
|> > > >
|> > > > --
|> > > > This message may contain confidential, proprietary, or
| legally
|> > > privileged information. No confidentiality or privilege is
| waived
|> > by
|> > any
|> > > transmission to an unintended recipient. If you are not an
|> > intended
|> > > recipient, please notify the sender and delete this message
|> > immediately.
|> > > Any views expressed in this message are those of the sender, not
|> > those
|> > > of any entity within the KBC Financial Products group of
| companies
|> > > (together referred to as "KBC FP").
|> > > >
|> > > > This message does not create any obligation, contractual or
|> > > otherwise, on the part of KBC FP. It is not an offer (or
|> > solicitation
|> > of
|> > > an offer) of, or a recommendation to buy or sell, any financial
|> > product.
|> > > Any prices or other values included in this message are
| indicative
|> > only,
|> > > and do not necessarily represent current market prices, prices
| at
|> > which
|> > > KBC FP would enter into a transaction, or prices at which
| similar
|> > > transactions may be carried on KBC FP's own books. The
| information
|> > > contained in this message is provided "as is", without
|> > representations
|> > > or warranties, express or implied, of any kind. Past performance
|> > is
|> > not
|> > > indicative of future returns.
|> > > >
|> > > >
|> > > >
|> >
| ---------------------------------------------------------------------
|> > > > To unsubscribe, e-mail: user-unsubscribe@(protected)
|> > > > For additional commands, e-mail: user-help@(protected)
|> > > >
|> > > >
|> > >
|> > >
|> > >
|> > > --
|> > > "Hey you! Would you help me to carry the stone?" Pink Floyd
|> > >
|> > >
|> >
| ---------------------------------------------------------------------
|> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
|> > > For additional commands, e-mail: user-help@(protected)
|> > >
|> > >
|> > > --
|> > > This message may contain confidential, proprietary, or legally
|> > privileged information. No confidentiality or privilege is waived
| by
|> > any
|> > transmission to an unintended recipient. If you are not an intended
|> > recipient, please notify the sender and delete this message
|> > immediately.
|> > Any views expressed in this message are those of the sender, not
|> > those
|> > of any entity within the KBC Financial Products group of companies
|> > (together referred to as "KBC FP").
|> > >
|> > > This message does not create any obligation, contractual or
|> > otherwise, on the part of KBC FP. It is not an offer (or
| solicitation
|> > of
|> > an offer) of, or a recommendation to buy or sell, any financial
|> > product.
|> > Any prices or other values included in this message are indicative
|> > only,
|> > and do not necessarily represent current market prices, prices at
|> > which
|> > KBC FP would enter into a transaction, or prices at which similar
|> > transactions may be carried on KBC FP's own books. The information
|> > contained in this message is provided "as is", without
|> > representations
|> > or warranties, express or implied, of any kind. Past performance is
|> > not
|> > indicative of future returns.
|> > >
|> > >
|> > >
|> >
| ---------------------------------------------------------------------
|> > > To unsubscribe, e-mail: user-unsubscribe@(protected)
|> > > For additional commands, e-mail: user-help@(protected)
|> > >
|> > >
|> >
|> >
|> >
|> > --
|> > "Hey you! Would you help me to carry the stone?" Pink Floyd
|> >
|> >
| ---------------------------------------------------------------------
|> > To unsubscribe, e-mail: user-unsubscribe@(protected)
|> > For additional commands, e-mail: user-help@(protected)
|> >
|> >
|> > --
|> > This message may contain confidential, proprietary, or legally
|> > privileged information. No confidentiality or privilege is waived
| by
|> > any transmission to an unintended recipient. If you are not an
|> > intended recipient, please notify the sender and delete this
| message
|> > immediately. Any views expressed in this message are those of the
|> > sender, not those of any entity within the KBC Financial Products
|> > group of companies (together referred to as "KBC FP").
|> >
|> > This message does not create any obligation, contractual or
|> > otherwise, on the part of KBC FP. It is not an offer (or
| solicitation
|> > of an offer) of, or a recommendation to buy or sell, any financial
|> > product. Any prices or other values included in this message are
|> > indicative only, and do not necessarily represent current market
|> > prices, prices at which KBC FP would enter into a transaction, or
|> > prices at which similar transactions may be carried on KBC FP's own
|> > books. The information contained in this message is provided "as
| is",
|> > without representations or warranties, express or implied, of any
|> > kind. Past performance is not indicative of future returns.
|> >
|> >
|> >
| ---------------------------------------------------------------------
|> > To unsubscribe, e-mail: user-unsubscribe@(protected)
|> > For additional commands, e-mail: user-help@(protected)
|> >
|> >
|>
|>
|> ---------------------------------------------------------------------
|> To unsubscribe, e-mail: user-unsubscribe@(protected)
|> For additional commands, e-mail: user-help@(protected)
|>
|>
|
|
|
- --
- -------------------------------
Volker Karlmeier
Friedrich-Freye-Str. 61
45481 Mülheim/Ruhr
Tel. : (+49) 208-7785675
Mobil: (+49) 176-21056587
Mail : Volker@(protected)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
iD8DBQFIKKi0aEMQXBIqssERAuiXAKCVNa8stXzS8+ZM3OAAzDFpuoYLVwCfdXJA
Rg8TTCtklezWFFAvc146L9s=
=CSjC
-----END PGP SIGNATURE-----

Attachment:
user_186365.ezm (zipped)I think I've followed the instructions at [1] closely, and ended up with
this in my struts.xml:
<struts> <package name="mypackage" extends="struts-default">
<interceptors> <interceptor name="exception"
class="
com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor"/>
<interceptor-stack name="defaultStack"> <interceptor-ref
name="exception"/> </interceptor-stack> </interceptors>
<global-exception-mappings> <exception-mapping
exception="
java.lang.Exception" result="Exception"/>
</global-exception-mappings> </package> </struts>
I have no <action>s defined in struts.xml because I'm using annotations for
action configuration. Is this setup incompatible with global exception
mappings? I didn't see anything obvious in the annotations documentation
about exception handling.
Thanks,
- d
[1] http://struts.apache.org/2.0.11.1/docs/exception-configuration.html