Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Néstor Boscán
Great tip Wes! Found the solution: ConfigurationManager configurationManager = new ConfigurationManager(); OgnlValueStackFactory factory = new OgnlValueStackFactory(); configurationManager.addContainerProvider(new XWorkConfigurationProvider()); configurationManager.getCo

Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Wes Wannemacher
One thing I've done in the past to figure things out is to just check the unit tests. I'd imagine there are some tests for the ValueStackFactory somewhere and they might give you some clues on how to bootstrap an instance. -Wes 2010/1/15 Néstor Boscán : > Thanks for the Reply > > I know that Valu

Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Néstor Boscán
Thanks for the Reply I know that ValueStack is part of XWork. I checked the code there is an OgnlValueStack and a OgnlValueStackFactory. But when I try to use OgnlValueStackFactory I get: java.lang.IllegalArgumentException: Wrapped type converter cannot be null So I try to set the XWorkTypeConve

Re: Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Rafał Krupiński
On 15.01.2010 21:25, Néstor Boscán wrote: Hi I wish to access or create the ValueStack from outside Struts 2 so I can apply the expression language and conversion properties of OGNL to create some reportes. Is this possible? ValueStack is part of XWork, so it's possible. -

Is there a way to create or get a ValueStack outside of Struts 2?

2010-01-15 Thread Néstor Boscán
Hi I wish to access or create the ValueStack from outside Struts 2 so I can apply the expression language and conversion properties of OGNL to create some reportes. Is this possible? Regards, Néstor Boscán

Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Musachy Barroso
hum, I take it back, I shouldnt be making suggestions before trying things out :). What I meant was that you could set the theme to something else in individual tags, and that should work for that specific tag, but I forgot about the 'struts.ui.templateSuffix' setting. What you mentioned would be a

Re: How to do programatic validation?

2010-01-15 Thread Wes Wannemacher
D'oh! I should have checked first :) -Wes On Fri, Jan 15, 2010 at 1:46 PM, Greg Lindholm wrote: > Hibernate Validator 4.0 [1] is the RI for JSR 303 but Oval [2] does > look very cool. > > [1] https://www.hibernate.org/459.html > [2] http://oval.sourceforge.net/ > > On Fri, Jan 15, 2010 at 12:37

Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Néstor Boscán
I've tried this approach and the page simply doesn't work. I don't know if you are aware but in 2.0.* there were this configuration options that cached the freemaker processing. Regards, Néstor Boscán On Fri, Jan 15, 2010 at 2:10 PM, Dale Newfield wrote: > Musachy Barroso wrote: > >> Not reall

Re: How to do programatic validation?

2010-01-15 Thread Greg Lindholm
Hibernate Validator 4.0 [1] is the RI for JSR 303 but Oval [2] does look very cool. [1] https://www.hibernate.org/459.html [2] http://oval.sourceforge.net/ On Fri, Jan 15, 2010 at 12:37 PM, Wes Wannemacher wrote: > Before you tie yourself to commons-validator, take a look at Oval. I > could be w

Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Dale Newfield
Musachy Barroso wrote: Not really, you can mix the tags using the "theme" attribute, not very pretty, but that should work. Just to make sure I understand: If I set , then any time a tag is being processed with the simple theme it'll use the java implementation, but for any tags not using th

RE: Upgrade 2.1.6 to 2.1.8.1 - Action Results in 404

2010-01-15 Thread CRANFORD, CHRIS
Wes - Yes I changed the struts configuration to permit .do as that was our standard from the Struts 1.x days and to keep consistency, we used it again in the Struts2 implementation. The 404 was the one from the web server itself with the colored blue pages that Tomcat tosses from time to tim

Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Musachy Barroso
Not really, you can mix the tags using the "theme" attribute, not very pretty, but that should work. musachy On Fri, Jan 15, 2010 at 10:27 AM, Dale Newfield wrote: > On Thu, Jan 14, 2010 at 8:00 PM, Musachy Barroso wrote: >> I would expect that, FreeMarker templates(+ struts code) will always >

Re: Struts 2 Tags / Freemarker performance

2010-01-15 Thread Dale Newfield
On Thu, Jan 14, 2010 at 8:00 PM, Musachy Barroso wrote: > I would expect that, FreeMarker templates(+ struts code) will always > be slower than java code. If you are using the simple tags, give a try > to the Java Tags: > > http://cwiki.apache.org/S2PLUGINS/java-templates-plugin.html I assume thi

Re: Upgrade 2.1.6 to 2.1.8.1 - Action Results in 404

2010-01-15 Thread Wes Wannemacher
You mention that you get a 404, a few questions... First, does this 404 come from the struts filter or the application server? When I am working, I can usually tell the difference because 404s coming from the struts filter generally indicate "Action" or "Action Mapping" not found. In the even that

Upgrade 2.1.6 to 2.1.8.1 - Action Results in 404

2010-01-15 Thread CRANFORD, CHRIS
I was using Struts 2.1.6 along with XWork2 2.1.2. After finding a bug with XWork2, it was recommended that this package be upgraded. As a result, XWork2's later release depends on 2.1.8.1 of Struts2 and thus I had to upgrade all my jars. Now web application no longer works. When I navigate to

Re: How to do programatic validation?

2010-01-15 Thread Wes Wannemacher
Before you tie yourself to commons-validator, take a look at Oval. I could be wrong, but I think there is a bean validation JSR and Oval is the reference implementation (or at least it is JSR compatible). -Wes On Fri, Jan 15, 2010 at 11:21 AM, doahh wrote: > > Don't worry about this. It looks li

Re: Struts2 s:head tag generates wrong paths? [SOLVED]

2010-01-15 Thread Wes Wannemacher
No, you are right. This topic comes up from time-to-time and it is pretty safe to map the struts filter _only_ to /struts/* and *.action (if you are using .action as your default extension). There are no other magic urls. -Wes On Fri, Jan 15, 2010 at 12:06 PM, Stephan R. Mueller wrote: > Hi Wes

Re: Struts2 s:head tag generates wrong paths? [SOLVED]

2010-01-15 Thread Stephan R. Mueller
Hi Wes, thank you for the quick answer. I should have known - it's working now. The problem seems to be my web.xml. I wasn't using wildcard filtering (/* - this works now) - I've been mixing action and servlet (ControllerServlet) mapping which led to an explicit URL-Pattern mapping for the filter.

Re: How to do programatic validation?

2010-01-15 Thread doahh
Don't worry about this. It looks like the commons-validator will be fine and I think thats what the struts2 framework uses underneath anyway. doahh wrote: > > I have a Flex app that is sending data to the server and I would like to > validate the Objects being passed on the server side. The F

How to do programatic validation?

2010-01-15 Thread doahh
I have a Flex app that is sending data to the server and I would like to validate the Objects being passed on the server side. The Flex app passes the information over an AMF channel and so it does not go through the Struts2 framework. So far, I have found classes such as: com.opensymphony.xwork

Re: Struts2 s:head tag generates wrong paths?

2010-01-15 Thread Wes Wannemacher
Did you go to the generated URL in the browser? The struts filter recognizes certain URL patterns and will find the resources if they are in your web-app or pull them from the jar files. Requests headed for URLs like /web-app/struts/* are handled by the filter. -Wes On Thu, Jan 14, 2010 at 7:38 P

Re: Struts 2

2010-01-15 Thread Saeed Iqbal
remove the first } and second %{ On Fri, Jan 15, 2010 at 1:01 PM, RogerV wrote: > > Hi > > I'm having a problem trying to get the correct syntax for an OR test. > > selects > nothing, whereas > selects values as expected as does > > > Regards > -- > View this message in context: > http://old.

Struts 2

2010-01-15 Thread RogerV
Hi I'm having a problem trying to get the correct syntax for an OR test. selects nothing, whereas selects values as expected as does Regards -- View this message in context: http://old.nabble.com/Struts-2-%3Cs%3Aif-test-syntax-tp27173346p27173346.html Sent from the Struts - User mailing l