You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@beehive.apache.org by "Burgess, Benjamin" <BB...@tiaa-cref.org> on 2008/03/18 16:25:48 UTC
Modify generated struts configs?
One of the annoying things about Message Bundles is that they only get
reloaded when application gets redeployed or the server is restarted.
This is true of Struts Message Resources as well (which Beehive Message
Bundles are built on). For Struts however, there is a solution:
http://sourceforge.net/project/shownotes.php?release_id=320056&group_id=
49385
In your struts-config, you can declare a factory class and your own
implementation for "message-resources" allowing you to change how
messages are stored. I would like to use this with Beehive, but am not
sure how to go about it. The Message Bundle Jpf annotation doesn't
allow you to specify a factory. Is there some other way to affect what
the generated struts-config files contain, or a way to modify them and
keep them from being overwritten by the Beehive compiler?
Ben
********************************************************************************************
This message, including any attachments, contains confidential information intended
for a specific individual and purpose, and is protected by law. If you are not the intended
recipient, please contact the sender immediately by reply e-mail and destroy all copies.
You are hereby notified that any disclosure, copying, or distribution of this message, or
the taking of any action based on it, is strictly prohibited.
TIAA-CREF
********************************************************************************************
Solved RE: Problem with rolesAllowed and directory only URLs
Posted by "McClure, Doug " <DM...@tiaa-cref.org>.
I solved my own problem. After countless hours trying to solve this, a
little brain jogging by a co-worker made me stumble across the fact that
just hitting .../admin/ wasn't actually triggering my begin action,
which is what I thought it was doing. It was in fact just going
straight to the index.jsp (which begin points to) which was being
controlled by the welcome-file-list. Adding
<welcome-file>begin.do</welcome-file> to the beginning of that list
makes sure that I actually trigger my begin action and the role
authorization along with it.
Doug McClure
Senior Consultant
Adroit Software, Inc
SSC, Bldg 8625, E4-S4
704-988-4634 / 8926-4634
-----Original Message-----
From: McClure, Doug
Sent: Wednesday, March 19, 2008 4:59 PM
To: Beehive Users
Subject: Problem with rolesAllowed and directory only URLs
I am working with Beehive 1.0.1 and I'm running up against a problem
with the rolesAllowed attribute.
Everything works fine, in that users are prevented from accessing pages
when a URL is specified as http://server/app/admin/editRule.do. But if
I go to http://server/app/admin/ directly it skips that role check and
just displays me the main page. I've tried all manner of different
setups for my begin action method, but I just can not get the security
stuff to trigger.
I never did role based security with Struts, so I've no experience with
how to solve it there.
Any ideas?
Doug McClure
Senior Consultant
Adroit Software, Inc
SSC, Bldg 8625, E4-S4
704-988-4634 / 8926-4634
************************************************************************
********************
This message, including any attachments, contains confidential
information intended
for a specific individual and purpose, and is protected by law. If you
are not the intended
recipient, please contact the sender immediately by reply e-mail and
destroy all copies.
You are hereby notified that any disclosure, copying, or distribution of
this message, or
the taking of any action based on it, is strictly prohibited.
TIAA-CREF
************************************************************************
********************
********************************************************************************************
This message, including any attachments, contains confidential information intended
for a specific individual and purpose, and is protected by law. If you are not the intended
recipient, please contact the sender immediately by reply e-mail and destroy all copies.
You are hereby notified that any disclosure, copying, or distribution of this message, or
the taking of any action based on it, is strictly prohibited.
TIAA-CREF
********************************************************************************************
Problem with rolesAllowed and directory only URLs
Posted by "McClure, Doug " <DM...@tiaa-cref.org>.
I am working with Beehive 1.0.1 and I'm running up against a problem
with the rolesAllowed attribute.
Everything works fine, in that users are prevented from accessing pages
when a URL is specified as http://server/app/admin/editRule.do. But if
I go to http://server/app/admin/ directly it skips that role check and
just displays me the main page. I've tried all manner of different
setups for my begin action method, but I just can not get the security
stuff to trigger.
I never did role based security with Struts, so I've no experience with
how to solve it there.
Any ideas?
Doug McClure
Senior Consultant
Adroit Software, Inc
SSC, Bldg 8625, E4-S4
704-988-4634 / 8926-4634
********************************************************************************************
This message, including any attachments, contains confidential information intended
for a specific individual and purpose, and is protected by law. If you are not the intended
recipient, please contact the sender immediately by reply e-mail and destroy all copies.
You are hereby notified that any disclosure, copying, or distribution of this message, or
the taking of any action based on it, is strictly prohibited.
TIAA-CREF
********************************************************************************************
RE: Modify generated struts configs?
Posted by "Burgess, Benjamin" <BB...@tiaa-cref.org>.
It most certainly does help (I was hoping there would be something like
the strutsMerge attribute).
Thanks for the good work and fast reply!
Ben
-----Original Message-----
From: Carlin Rogers [mailto:carlin.rogers@gmail.com]
Sent: Tuesday, March 18, 2008 11:52 AM
To: Beehive Users
Subject: Re: Modify generated struts configs?
Hi Ben,
Yes, this is still an area that could be improved on in the
annotations for message bundles. Another user noted the issue as well.
http://mail-archives.apache.org/mod_mbox/beehive-user/200610.mbox/%3Cba6
911de0610170007m78dc280fr4ba80f56a1f703c4@mail.gmail.com%3E
However, there is a workaround you can use for NetUI. Here's the idea I
noted...
"have a simple struts module config file that contains the desired
<message-resources> element. Then on your Controller annotation set
the strutsMerge attribute with the path to your struts module config.
This will merge in the <message-resources> element into the generated
struts module config for the page flow controller."
Hope that helps,
Carlin
On Tue, Mar 18, 2008 at 9:25 AM, Burgess, Benjamin
<BB...@tiaa-cref.org> wrote:
> One of the annoying things about Message Bundles is that they only get
> reloaded when application gets redeployed or the server is restarted.
> This is true of Struts Message Resources as well (which Beehive
Message
> Bundles are built on). For Struts however, there is a solution:
>
>
>
>
http://sourceforge.net/project/shownotes.php?release_id=320056&group_id=
> 49385
>
>
>
> In your struts-config, you can declare a factory class and your own
> implementation for "message-resources" allowing you to change how
> messages are stored. I would like to use this with Beehive, but am
not
> sure how to go about it. The Message Bundle Jpf annotation doesn't
> allow you to specify a factory. Is there some other way to affect
what
> the generated struts-config files contain, or a way to modify them
and
> keep them from being overwritten by the Beehive compiler?
>
>
>
> Ben
>
>
>
************************************************************************
********************
> This message, including any attachments, contains confidential
information intended
> for a specific individual and purpose, and is protected by law. If
you are not the intended
> recipient, please contact the sender immediately by reply e-mail and
destroy all copies.
> You are hereby notified that any disclosure, copying, or distribution
of this message, or
> the taking of any action based on it, is strictly prohibited.
>
> TIAA-CREF
>
************************************************************************
********************
>
********************************************************************************************
This message, including any attachments, contains confidential information intended
for a specific individual and purpose, and is protected by law. If you are not the intended
recipient, please contact the sender immediately by reply e-mail and destroy all copies.
You are hereby notified that any disclosure, copying, or distribution of this message, or
the taking of any action based on it, is strictly prohibited.
TIAA-CREF
********************************************************************************************
Re: Modify generated struts configs?
Posted by Carlin Rogers <ca...@gmail.com>.
Hi Ben,
Yes, this is still an area that could be improved on in the
annotations for message bundles. Another user noted the issue as well.
http://mail-archives.apache.org/mod_mbox/beehive-user/200610.mbox/%3Cba6911de0610170007m78dc280fr4ba80f56a1f703c4@mail.gmail.com%3E
However, there is a workaround you can use for NetUI. Here's the idea I noted...
"have a simple struts module config file that contains the desired
<message-resources> element. Then on your Controller annotation set
the strutsMerge attribute with the path to your struts module config.
This will merge in the <message-resources> element into the generated
struts module config for the page flow controller."
Hope that helps,
Carlin
On Tue, Mar 18, 2008 at 9:25 AM, Burgess, Benjamin
<BB...@tiaa-cref.org> wrote:
> One of the annoying things about Message Bundles is that they only get
> reloaded when application gets redeployed or the server is restarted.
> This is true of Struts Message Resources as well (which Beehive Message
> Bundles are built on). For Struts however, there is a solution:
>
>
>
> http://sourceforge.net/project/shownotes.php?release_id=320056&group_id=
> 49385
>
>
>
> In your struts-config, you can declare a factory class and your own
> implementation for "message-resources" allowing you to change how
> messages are stored. I would like to use this with Beehive, but am not
> sure how to go about it. The Message Bundle Jpf annotation doesn't
> allow you to specify a factory. Is there some other way to affect what
> the generated struts-config files contain, or a way to modify them and
> keep them from being overwritten by the Beehive compiler?
>
>
>
> Ben
>
>
> ********************************************************************************************
> This message, including any attachments, contains confidential information intended
> for a specific individual and purpose, and is protected by law. If you are not the intended
> recipient, please contact the sender immediately by reply e-mail and destroy all copies.
> You are hereby notified that any disclosure, copying, or distribution of this message, or
> the taking of any action based on it, is strictly prohibited.
>
> TIAA-CREF
> ********************************************************************************************
>