Re: Can we use spring-plugin to inject a HttpServletRequest onto a bean?

2011-05-27 Thread Andrew Lee
Dave is right that it suggests its bad design but if you really need it you can get your action to implement servletrequestaware: http://struts.apache.org/2.0.11/struts2-core/apidocs/org/apache/struts2/interceptor/package-summary.html Might be better to create a threadlocal in an interceptor to s

Re: encodeBase64URLSafeString in s:param

2011-05-17 Thread Andrew Lee
You can do that using "@com.xxx.xxx.classname@methodname(arg)" but wouldn't it be better to expose another getter on your action which provided the encoded string. Would be easier to test. On 17 May 2011 10:25, wrote: > Hi, > > I have a problem calling a method in a s :param tag. > > I want to en

Re: Strange behaviour with Spring

2011-05-09 Thread Andrew Lee
Ok, I didn't see you aren't actually referencing the string bean in your action. That won't help On 9 May 2011 17:23, "Andrew Lee" wrote: > He's not using it as a java bean. Spring beans can be immutable. > > Is it because when spring wires up your action

Re: Strange behaviour with Spring

2011-05-09 Thread Andrew Lee
He's not using it as a java bean. Spring beans can be immutable. Is it because when spring wires up your action it considers it to be a parameter as you have get and set methods? So it appends it to the url. If you inject t string bean via constructor injection and not via setter injection and rem

Rest plugin and Validation : Cannot find a result for editNew

2011-01-12 Thread Andrew Lee
Hi, I've been having difficulties using validation with the Convention+Rest plugin using Struts 2.2.1.1. My validation successfully adds field errors to the action and the rest workflow chooses to render an editNew result as expected. If I include a method called editNew (returning either a Strin