Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-05-02 Thread Jeroen De Ridder
the controller? Is it just so you can control the propagation characteristics? It seems like an interesting pattern, I am just wondering how it is used. Jeroen De Ridder wrote: I'll agree that a service layer alone won't cut it, simply because of the way JPA/Hibernate works. Updating an instance

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Jeroen De Ridder
You really shouldn't be making your Struts 2 actions @Transactional. Doing that causes Spring to create a proxy so it can put some extra transaction-handling logic between the method call and the actual method. The thing is, Struts 2 and OGNL rely heavily on reflection on the action classes

Re: @Transactional Spring Annotation in a Struts2 Action does not work

2009-04-30 Thread Jeroen De Ridder
configuration I am not doing right. Thanks in advance, Mauricio On Thu, Apr 30, 2009 at 11:22 PM, Jeroen De Ridder voetsjo...@gmail.comwrote: You really shouldn't be making your Struts 2 actions @Transactional. Doing that causes Spring to create a proxy so it can put some extra transaction

Re: Struts and encoding ISO-8859-1

2009-04-28 Thread Jeroen De Ridder
You shouldn't technically need Struts 2.1.7 to be able to use UTF-8. If you want to stick with 2.1.6, there are two options: either you use useBodyEncodingForURI=true in Tomcat's server.xml, or you explicitly set URIEncoding=UTF-8 in the connector. I'd advise you to use useBodyEncodingForURI,

Re: Struts and encoding ISO-8859-1

2009-04-28 Thread Jeroen De Ridder
Glad to have been of help :) Wow, finally, it works... Thank you indeed, I wouldn't have solved this without your help. I did missunderstand something in your former instructions, the part where I should move the encoding in my web.xml to before the Struts2 filter. It wouldn't have worked

Re: Struts and encoding ISO-8859-1

2009-04-26 Thread Jeroen De Ridder
What exactly is giving you trouble? Are your HTTP parameters not properly received? Does your DB data get garbled when you output it? I've recently had problems with ISO-8859-1 and Struts 2 as well, and there are some things you need to be aware of. It turns out that by default Tomcat uses

Re: Struts and encoding ISO-8859-1

2009-04-26 Thread Jeroen De Ridder
Well, ISO-8859-1 and UTF-8 differ in the fact that ISO-8859-1 is a single-byte encoding and can only encode 256 characters (albeit carefully chosen), while UTF-8 is a multi-byte encoding and can represent any character in the Unicode codespace (ie. any character you can think of). Both will

Re: s:url does not include parameter

2009-04-14 Thread Jeroen De Ridder
It's evaluating ALL as an OGNL expression, not a string literal. Use either s:url action=ListFeatures namespace=/secure/jsons:param name=statusALL/s:param/s:url or s:url action=ListFeatures namespace=/secure/jsons:param name=status value='ALL' //s:url (notice the extra single quotes in

Re: Struts 2/Spring and @Required

2009-04-06 Thread Jeroen De Ridder
Don't forget that you need to instantiate a bean postprocessor in your applicationContext to enforce the @Required-annotation: bean class=org.springframework.beans.factory.annotation.RequiredAnnotationBeanPostProcessor / I don't supply any configuration to spring. I simply have the

Re: Struts 2 - Dynamic form: submitting issues

2009-03-30 Thread Jeroen De Ridder
According to the OGNL spec, setting indexed JavaBean properties using lijst[0], lijst[1] etc should work. And it does; except not through struts 2's params interceptor. Try it out: public class ActionTest extends ActionSupport { private ListString someProperty = new ArrayListString();