Author Login
Post Reply
user Digest 30 Jun 2008 14:45:59 -0000 Issue 8117
Topics (messages 188286 through 188315):
Re: Spring Security and Struts2 Using tiles
188286 by: JerryK
188310 by: Alberto A. Flores
ParamPrepareParamsStack interceptor , how does this work???
188287 by: akoo
188288 by: Lukasz Lenart
188291 by: Jeromy Evans
188292 by: Lukasz Lenart
Re: [S2] autocompleter action extension
188289 by: Pierre Goupil
Re: Struts Themes Problem - help
188290 by: Narayana S
action param-element not working ?
188293 by: Hanson Char
188301 by: Lukasz Lenart
Validation doubt
188294 by: Narayana S
188299 by: Lukasz Lenart
188300 by: Jeromy Evans
Struts2 - OGNL Calling static method
188295 by: Ramanathan RV
188297 by: Jeromy Evans
for review - split content type handler manager in REST plugin
188296 by: Jeromy Evans
188298 by: Jeromy Evans
Struts2 + applicationContext.xml
188302 by: Kibo
188303 by: Lukasz Lenart
188304 by: Dave Newton
188305 by: Lukasz Lenart
188306 by: Dave Newton
188307 by: Lukasz Lenart
188308 by: Frans Thamura
188311 by: Alberto A. Flores
188315 by: Brad A Cupit
Where does o.a.s2.spring.interceptor.SessionContextAutowiringInterceptor live?
188309 by: Dave Newton
188312 by: Musachy Barroso
Re: [S2] adding interceptor to all my actions
188313 by: Vanja Petreski
Retrieve an hashtable entry within a jsp using struts tag and a bean as the key
188314 by: Paolo Niccolò Giubelli
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_188286.ezm (zipped)
I was able to get this working with Acegi, by setting the Dispatcher property
in web.xml
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>INCLUDE</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>
But, now when i try this with Spring Security 2.0.1, i am facing the same
problem as you have described here. Have you found any solution so far?
Alberto A. Flores wrote:
>
> Folks,
>
> My understanding is that Spring Security does not secure resources on
> *forwards* (I believe tiles2 do forward/chaining). In an application
> using Struts2, Spring and Tiles2, these forwards work just fine. Has
> anyone had success using these three frameworks together using Spring
> Security? I tried it today and It turned out that the security tag
> (http://www.springframework/security/tags/):
>
> <security:authorization property="principal.username"/>
>
> never fetches anything. Furthermore, the code:
>
> SecurityContextHolder.getContext().getAuthentication()
>
> returns null (in the forwarded jsp page). Has anyone know what to do in
> this case? I'm beginning to think I can not use Spring Security at all.
>
> Regards,
>
> --
>
> Alberto A. Flores
> http://www.linkedin.com/in/aflores
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_188310.ezm (zipped)I had to put those efforts on the side as it was in a prototype and
proof of concept phase. However, I have just began (today) to officially
make serious effort into making it work (if at all possible) for our
project. I should have a better answer by the end of the day... but any
feedback would be much appreciated...
JerryK wrote:
> I was able to get this working with Acegi, by setting the Dispatcher property
> in web.xml
> <url-pattern>/*</url-pattern>
> <dispatcher>REQUEST</dispatcher>
> <dispatcher>INCLUDE</dispatcher>
> <dispatcher>FORWARD</dispatcher>
> </filter-mapping>
>
> But, now when i try this with Spring Security 2.0.1, i am facing the same
> problem as you have described here. Have you found any solution so far?
>
>
>
> Alberto A. Flores wrote:
>> Folks,
>>
>> My understanding is that Spring Security does not secure resources on
>> *forwards* (I believe tiles2 do forward/chaining). In an application
>> using Struts2, Spring and Tiles2, these forwards work just fine. Has
>> anyone had success using these three frameworks together using Spring
>> Security? I tried it today and It turned out that the security tag
>> (http://www.springframework/security/tags/):
>>
>> <security:authorization property="principal.username"/>
>>
>> never fetches anything. Furthermore, the code:
>>
>> SecurityContextHolder.getContext().getAuthentication()
>>
>> returns null (in the forwarded jsp page). Has anyone know what to do in
>> this case? I'm beginning to think I can not use Spring Security at all.
>>
>> Regards,
>>
>> --
>>
>> Alberto A. Flores
>> http://www.linkedin.com/in/aflores
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@(protected)
>> For additional commands, e-mail: user-help@(protected)
>>
>
--
Alberto A. Flores
http://www.linkedin.com/in/aflores

Attachment:
user_188287.ezm (zipped)
I have page with a list of products and links to edit that particular
product.
<tr>
<td class="listtablecell leftpadding"><s:property
value="name"/></td>
<td class="listtablecell leftpadding"><s:property
value="color"/></td>
<td class="listtablecell leftpadding"><s:property
value="design"/></td>
<td class="listtablecell leftpadding"><s:property
value="material"/></td>
<td class="listtablecell leftpadding"><s:property
value="size"/></td>
<td class="listtablecell rightpadding
numeric"><s:property value="price"/></td>
<td class="listtablecell rightpadding numeric"><s:url
id="editUrl" value="editproduct.action">
<s:param name="productId" value="id"/></s:url><s:a
href="%{editUrl}">Edit</s:a></td>
</tr>
My ProductAction class implements preparable interface in the manner below
public void prepare() throws Exception {
if(productId == 0)
{
product = new Product();
}
else
{
product = ProductManager.findProduct(productId);
}
}
with product being the model class with the customary name, price,
description etc, etc fields.
Running the code through the debugger I notice that the prepare method gets
invoked with the right productId and product is Initialized by the
ProductManager with the correct values for all it's fields. However after
prepare method has been executed the doIntercept() of the PrepareInterceptor
gets invoked after which the product model which was already initialized
correctly has been completly blammed with all of the fields set to null.
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_188288.ezm (zipped)Hi
2008/6/29 akoo <ogenium@(protected)>:
> public void prepare() throws Exception {
> if(productId == 0)
> {
> product = new Product();
> }
> else
> {
> product = ProductManager.findProduct(productId);
> }
> }
You should use prepare() to prepopulate lists / comboboxs/ etc not to
create your domain objects.
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_188291.ezm (zipped)Lukasz Lenart wrote:
>
> You should use prepare() to prepopulate lists / comboboxs/ etc not to
> create your domain objects.
>
>
> Regards
>
The OP's approach is appropriate when using the param-prepare-params
pattern. Sometimes it's essential that the domain objects are
instantiated/loaded in a prepare method prior to setting their params.
eg. #1. if it's impossible for S2 to instantiate it (when there's no
default constructor or an unknown concrete type).
eg. #2.where a parameter is required to load the domain object prior to
setting its it's params
For the OP:
You haven't indicated whether you're using a getter (getProduct()) or
ModelDriven<Product>. It appears to me that your problem is unrelated to
the paramsPrepareParams stack and more related to your parameters name.
The first invocation of the params interceptor will set all params of
your action (productId, name, color etc). In this case, a Product does
not exist but the productId is set.
The prepare method is invoked and your Product created loaded.
The second invocation of the params interceptor will set all params of
your action again (productid, name, color). In this case a Product does
exist, but you're not setting its own parameters.
I suspect you haven't applied the ModelDriven<Product> interface. You
need to use that if you want to call your parameter "name".
Otherwise you need a getProduct() method with param names such as
"product.name" and "product.color".
regards,
Jeromy Evans

Attachment:
user_188292.ezm (zipped)Upss! My mistake, I should read documentation much more careful ;-)
Thanks Jeromy for explanation!
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_188289.ezm (zipped)You're absolutely right ! I'll stick to the .xhtml extension, as I have no
need for .html.
Thanks !
Pierre
2008/6/26 Laurie Harper <laurie@(protected)>:
> My guess is that using an action extension of .html creates a conflict with
> the Dojo template resources, which are .html files. If you look at your
> access logs (or use Firebug to see what XHR requests are being made during
> page rendering), you'll see what I mean.
>
> The easiest thing to do is pick a different action extension (maybe .htm or
> .xhtml). If you really need to be able to use .html as the action extension,
> you'll have to figure out how to prevent Dojo template requests from being
> treated as action requests.
>
> L.
>
>
> Pierre Goupil wrote:
>
>> Hello all,
>>
>> I would like my S2 project to be mapped to .html actions, so I have
>> set this up :
>>
>> - struts.action.extension=html in my struts.properties
>>
>> - <constant name="xwork.action.extension" value="html" /> in my
>> xwork-default.xml
>>
>> - <constant name="struts.action.extension" value="html" /> in my
>> struts-default.xml.
>>
>> Please note that for the two last ones, I have simply added the
>> property to the original file provided in the jar.
>>
>> It works, in the sense that my actions respond and display my JSPs as
>> desired. BUT I can't figure out how to have the auto-completer tag to
>> work. If I use the .html extension, I get the following exception :
>>
>> ---
>> Could not find action or result
>> There is no Action mapped for action name ComboBox. - [unknown location]
>> at
>>
com.opensymphony.xwork2.DefaultActionProxy.prepare (
DefaultActionProxy.java:186)
>> at
>>
org.apache.struts2.impl.StrutsActionProxyFactory.createActionProxy (
StrutsActionProxyFactory.java:41)
>> at
>>
org.apache.struts2.dispatcher.Dispatcher.serviceAction (
Dispatcher.java:494)
>> at
>>
org.apache.struts2.dispatcher.FilterDispatcher.doFilter (
FilterDispatcher.java:419)
>> at
>>
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter (
ApplicationFilterChain.java:235)
>> at
>>
org.apache.catalina.core.ApplicationFilterChain.doFilter (
ApplicationFilterChain.java:206)
>> at
>>
org.apache.catalina.core.StandardWrapperValve.invoke (
StandardWrapperValve.java:233)
>> at
>>
org.apache.catalina.core.StandardContextValve.invoke (
StandardContextValve.java:175)
>> at
>>
org.apache.catalina.core.StandardHostValve.invoke (
StandardHostValve.java:128)
>> at
>>
org.apache.catalina.valves.ErrorReportValve.invoke (
ErrorReportValve.java:102)
>> at
>>
org.apache.catalina.core.StandardEngineValve.invoke (
StandardEngineValve.java:109)
>> at
>>
org.apache.catalina.connector.CoyoteAdapter.service (
CoyoteAdapter.java:286)
>> at
>>
org.apache.coyote.http11.Http11Processor.process (
Http11Processor.java:844)
>> at
>>
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
>> at
>>
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
>> at
java.lang.Thread.run (
Thread.java:619)
>> ---
>>
>> I think this is because Struts is looking for an .action action
>> extension : if I revert back to the default .action extension, it all
>> works. But as you can guess, I would like to be able to use whatever
>> extension I wish to.
>>
>> A clue, anyone ?
>>
>> Thanx in advance,
>>
>> Pierre GOUPIL
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_188290.ezm (zipped)Hi Dave,
Thanks for your reply. i found solution to my issue. when i am using
simple theme i need to use fielderror tag with param tag. like ..
<s:fielderror>
<s:param>clientname</s:param>
</s:fielderror>
thanks for your time.
On Fri, Jun 27, 2008 at 4:32 PM, Dave Newton <newton.dave@(protected):
> --- On Fri, 6/27/08, Narayana S <narayanasgs1@(protected):
> > but here it introduced one more problem, with the xhtml
> > theme we get the field level validation error messages below
> > the individual control, but the simple theme is not giving any
> > validation error messages. to get the errors i used <s:fielderror />
> > ,it is giving all the field level errors at one place.
> >
> > is there any way i can get the filed level error messages
> > as they come in xhtml theme with simple theme ?
>
> ...
>
> Have you looked at the documentation for the tag you're using?
>
> http://struts.apache.org/2.x/docs/fielderror.html
>
> Did you look at the themes and templates documentation, the starting point
> of which is:
>
> http://struts.apache.org/2.x/docs/themes-and-templates.html
>
> Dave "Never wanted to be a dentist, but pulls a lot of teeth" Newton
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>

Attachment:
user_188293.ezm (zipped)Hi,
I tried to inject some values to an action via the param-element, but it
doesn't seem to be working. See example config below. I set a breakpoint
with a debugger, and the setter methods of the two properties (minValue and
maxDecimalPlaces) don't ever get invoke, even though the "myMethod" did. Is
this a known issue, or should I open up a JIRA issue ?
(I am using struts-2.0.11.1 and therefore xwork-2.0.4.)
Thanks,
Hanson
<struts>
<package name="mypackage" extends="struts-default">
<action name="MyAction_myMethod"
class="my.action.MyAction"
method="myMethod"
>
<!--
The param-element doesn't seem to be working;
So using the default values in the class for now.
-->
<param name="minValue">0</param>
<param name="maxDecimalPlaces">2</param>
<interceptor-ref name="fileUpload">
<param name="maximumSize">100000</param>
<param name="allowedTypes">text/plain</param>
</interceptor-ref>
<interceptor-ref name="basicStack" />
<result name="input">/jsp/MyPage.jsp</result>
<result name="success">/jsp/RetroCharge.jsp</result>
</action>

Attachment:
user_188301.ezm (zipped)
Attachment:
user_188294.ezm (zipped)Hi,
as per my understanding, we can implement validations in struts 2 in the
following ways...
1. overriding validate() method in Action class
2. writing ActionClass-validation.xml file
3. using validator annotations
validate method implements declarative security, ActionClass-valication.xml
is seperating validation logic from action class .
what is the clear difference between these 3 approaches?
and how can i implement client side validations in struts 2?

Attachment:
user_188299.ezm (zipped)Hi,
> what is the clear difference between these 3 approaches?
Annotations and XML allow you to only use defined validators, with
validate() method you can do anything you want, base your validation
on more complicated business rules.
> and how can i implement client side validations in struts 2?
Client side validation will base on validation rules defined with
Annotations and XML files, just add validate="true" to your form [1]
[1] http://struts.apache.org/2.1.2/docs/client-side-validation.html
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_188300.ezm (zipped)Narayana S wrote:
> Hi,
>
> as per my understanding, we can implement validations in struts 2 in the
> following ways...
>
> 1. overriding validate() method in Action class
>
Use the validate() method for complex validation that cannot be
implement anywhere else. You want to avoid duplicating validation code
so this method should be for special cases.
> 2. writing ActionClass-validation.xml file
>
The XML validation was developed first before Java 5 annotations can be
assumed. It is a little more mature than annotations but some people
doesn't like having to manage more configuration files.
> 3. using validator annotations
>
>
The annotations implement much of what is available in XML and avoid the
separate configuration. There are some complications when using
annotations but generally they're fine. Sometimes I've found the
validation annotations are longer than the actual code, which is a bad
thing. I prefer XML, many people prefer annotations.
> and how can i implement client side validations in struts 2?
>
The struts 2 form tags have client-side validation built-in if you set
validate=true on the form.
What actually happens is that a loop in the form's closing-tag template
reads the validations from the xml/annotations of your action and
generates some javascript implementing whatever validation logic it can
from the client-side. The benefit is that one validation declaration
can be used for both client and server-side. However it can't implement
all validation logic, it assumes you're using struts2 tags and markup
for all fields and it generates inline javascript.
See:
http://struts.apache.org/2.0.11.1/docs/client-side-validation.html
regards,
Jeromy Evans

Attachment:
user_188295.ezm (zipped)Hello
I wish to call a static method from the view and make the results available
to my view. I believed I would have to do something like this to achieve
that :
<s:set name="docs" scope="request"
value="@com.company.app.docs.DocumentProof@(protected))"/>
The above piece of code indeed calls the method. But the result doesnt get
set on the variable as expected. Am I missing something here?
--
Thanks
Ram

Attachment:
user_188297.ezm (zipped)Ramanathan RV wrote:
> Hello
>
> I wish to call a static method from the view and make the results available
> to my view. I believed I would have to do something like this to achieve
> that :
>
> <s:set name="docs" scope="request"
> value="@com.company.app.docs.DocumentProof@(protected))"/>
>
> The above piece of code indeed calls the method. But the result doesnt get
> set on the variable as expected. Am I missing something here?
>
>
Provided static method access is enabled (off by default), the line
above will work.
It's possible that the problem is with the way you're accessing docs
(are you using %{#docs})?
To enable static method access set the struts2 constant .
struts.ognl.allowStaticMethodAccess=true

Attachment:
user_188296.ezm (zipped)Could someone with an interest in the REST plugin please glance at the
changes I've committed for WW-2641
The change allows a different content-type in the request than the
response. This was added specifically to allow a x-www-form-urlencoded
request with a response in a different content-type (eg. the common case
of posting a form via XHR and receiving an application/json response).
A new ContentTypeHandler is added for x-www-form-urlencoded and the
ContentTypeHandlerManager's functionality split to get a handler for the
request and response separately. The ContentTypeHandlerManager also
allows handlers to be registered by mime-type and/or extension. I'm
happy with it but want to ensure it doesn't conflict with other plans.
I've kept in mind that in the future the manager may check the accepts
header for the response content-type.
Thanks,
Jeromy Evans
https://issues.apache.org/struts/browse/WW-2641

Attachment:
user_188298.ezm (zipped)Jeromy Evans wrote:
> Could someone with an interest in the REST plugin please glance at the
> changes I've committed for WW-2641
>
oops, that was meant for struts-dev. I'll cross-post there.

Attachment:
user_188302.ezm (zipped)
Hi konference
I use Struts2 + Spring.
I deployed the "Struts 2 - Maven Archetype - Starter"
In file applicationContext.xml is defined bean - helloWorldAction.
<beans>
<!-- Example of SAF2 action instantiated by Spring -->
<bean id="helloWorldAction"
class="cz.kibo.engine.Engine.HelloWorldAction" singleton="false" />
</beans>
I read that Struts2 expects that each action is a new instance. Therefore is
there : singleton="false"
Do I have to defined EVERY action in applicationContext.xml ?
Thanks to help
-----
Tomas Jurman
Czech Republic
--
Sent from the Struts - User mailing list archive at Nabble.com.

Attachment:
user_188303.ezm (zipped)> Do I have to defined EVERY action in applicationContext.xml ?
Yes if you want to create them by Spring and remember to use name
defined in applicationContext.xml as class in struts.xml
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_188304.ezm (zipped)--- On Mon, 6/30/08, Lukasz Lenart wrote:
>> Do I have to defined EVERY action in applicationContext.xml ?
> Yes if you want to create them by Spring and remember to
> use name defined in applicationContext.xml as class in struts.xml
Actually, you don't. If you're using Spring as the object factory and are auto-wiring by name (which can, on occasion, lead to spectacular debugging opportunities) it's not necessary to define the actions, AFAICT.
Dave

Attachment:
user_188305.ezm (zipped)> Actually, you don't. If you're using Spring as the object factory and are auto-wiring by name (which can, on occasion, lead to spectacular debugging opportunities) it's not necessary to define the actions, AFAICT.
But in such way, first action will be created by Struts and then
Spring will inject dependency to it, does it?
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_188306.ezm (zipped)--- On Mon, 6/30/08, Lukasz Lenart wrote:
> I said:
>> Actually, you don't. If you're using Spring as
>> the object factory and are auto-wiring by name
>> (which can, on occasion, lead to spectacular
>> debugging opportunities) it's not necessary to
>> define the actions, AFAICT.
>
> But in such way, first action will be created by Struts and
> then Spring will inject dependency to it, does it?
I'm not sure what you're asking, but actions not defined in the Spring config file will still be injected by beans that *are* in the Spring config file.
Dave

Attachment:
user_188307.ezm (zipped)>> But in such way, first action will be created by Struts and
>> then Spring will inject dependency to it, does it?
> I'm not sure what you're asking, but actions not defined in the Spring config file will still be injected by beans that *are* in the Spring config file.
Exactly, first, Struts (default object factory) will create action
object and then it will *ask* Spring to inject depended beans, base on
applicationConfig.xml. I'm just wondering, if there any drawbacks for
this?
Regards
--
Lukasz
http://www.lenart.org.pl/

Attachment:
user_188308.ezm (zipped)> I'm not sure what you're asking, but actions not defined in the Spring config file will still be injected by beans that *are* in the Spring config file.
>
i think the idea to make the action package inside spring
i have experience, writing action is another bored repeated job

Attachment:
user_188311.ezm (zipped)Have you considered using the @Controller annotation (stereotype) on all
Struts2 Actions (this way, Spring knows the bean id name). You can
always control the scoping of the object
@Controller("fooAction")
@Scope("request")
public class MyFooAction {
}
<action class="fooAction" name="foo"/>
I found this a cleaner (and easier) way to avoid having to maintain
another XML for our presentation.
Frans Thamura wrote:
>> I'm not sure what you're asking, but actions not defined in the Spring config file will still be injected by beans that *are* in the Spring config file.
>>
>
>
> i think the idea to make the action package inside spring
>
> i have experience, writing action is another bored repeated job
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@(protected)
> For additional commands, e-mail: user-help@(protected)
>
>
--
Alberto A. Flores
http://www.linkedin.com/in/aflores

Attachment:
user_188315.ezm (zipped)Lukasz Lenart wrote:
> Exactly, first, Struts (default object factory) will
> create action object and then it will *ask* Spring
> to inject depended beans, base on applicationConfig.xml.
> I'm just wondering, if there any drawbacks for this?
The only one I can think of is that your actions wouldn't actually be Spring managed, so they wouldn't be available for AOP.
The Spring2-Spring plugin will first ask Spring for the action, then, if it's not found, the Struts2-Spring plugin will create the action and have it autowired with other Spring beans (as you and Dave have mentioned).
An alternative that I'm currently enjoying is what I call zero-config Spring and Struts 2. I don't define any Actions in applicationContext.xml nor do I define any actions in struts.xml. Spring 2.5 has some incredible classpath scanning features, where you can annotate your Spring beans (including Actions) with @Component or @Repository, etc, and Spring can pick them up automatically. Even better than that, if you have a particular package that you put all your actions in, you can tell Spring to configure a bean for each class in that package, so you don't even have to annotate those classes.
Combine the above with zero-config and the code behind plugin for Struts 2 (plus a little bit of magic [1]) and you can have a wonderful environment where Spring and Struts pick everything up on their own (meaning, no xml to edit each time you want to add an action, DAO, etc.)
[1] https://issues.apache.org/struts/browse/WW-2558#action_43525
Brad Cupit
Louisiana State University - UIS

Attachment:
user_188309.ezm (zipped)It's referenced in the Spring plugin config but I don't see it anywhere.
Thanks,
Dave

Attachment:
user_188312.ezm (zipped)First time I hear about it, it should be in the spring plugin in any case.
musachy
On Mon, Jun 30, 2008 at 8:41 AM, Dave Newton <newton.dave@(protected):
> It's referenced in the Spring plugin config but I don't see it anywhere.
>
> Thanks,
> Dave
>
>
> ---------------------------------------------------------------------
> 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_188313.ezm (zipped)Hello Paweł,
I have workaround:
1) Delete struts-default.xml from struts2 core jar
2) Move them to your application classpath
3) Rename existing struts-default to struts-default-original
4) At the end define your own package and call it struts-default: <package
name="struts-default" extends="struts-default-original" namespace="/"> and
put all your settings here (define your interceptors, stacks and set default
interceptor)
5) Delete struts.xml from your application classpath
That's it!
This is ugly, but there is no better solution for this problem right now.
Negative point for S2 team!
V
2008/6/28 Paweł Wielgus <poulwiel@(protected)>:
> Hi Vanja,
> i din't solve the problem, someone said that package-info is working
> on trunk version (1.1.3 release?), but still it's not like the action
> in subpackage of a package with package-info will receive
> ParentPackage annotation - if i'm wrong i'll be very happy ;-)
>
> So i'm waiting for next release to give it a try.
>
> Best greetings,
> Pawel Wielgus.
>
> On 28/06/2008, Vanja Petreski <vpetreski@(protected):
> > Anybody?
> >
> > package-info.java does not work!
> >
> > Struts 2.0.11.1
> >
> > Vanja
> >
> > 2008/6/19 Paweł Wielgus <poulwiel@(protected)>:
> >
> >> Hi all,
> >> i'm trying to add my own interceptor to all of my actions.
> >> I know that i can define new package ("default") and redefine default
> >> interceptor stack and then add @ParentPackage("default") to all my
> >> actions, but the question is how to do it in one place without having
> >> to add ParentPackage in all actions or writing configuration in xml?
> >>
> >> Best greetings,
> >> Paweł Wielgus.
> >>
> >
>

Attachment:
user_188314.ezm (zipped)Hi!
I need a little help. I'm writing a jsp using struts tags and in my
ActionForm class I put an Hashtable containing keys and values (both are
pojos).
I can get my hashtable in this way:
<bean:define id="ht" name="myForm" property="productsCategories"/>
The key is also a bean, obtained through a (working) logic:iterate:
<logic:iterate id="product" name="myForm" property="lastProducts">
How can I retrieve a value from ht using "product" as the "key"?
I tried as I usually do with hashtables, using
<bean:define id="xyz" name="ht" property="product"/> (and then
bean:writing some properties) but, as I expected, it doesn't work.
Ideas?
Thank you in advance!