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:

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

Getting property with s:action tag

2009-03-13 Thread doahh
I have been playing with the s:action tag and have found it impossible to reference any property of the action in a struts2 like way. If I call an action, ActionOne.java and return success then I am redirected to a page called one-success.jsp which has the following: lt;s:action

Re: Getting property with s:action tag

2009-03-13 Thread doahh
of the '#' symbol which I assume means to reference by id or var. Anyway, the above works so I am happy. doahh wrote: I have been playing with the s:action tag and have found it impossible to reference any property of the action in a struts2 like way. If I call an action, ActionOne.java

Re: Getting property with s:action tag

2009-03-13 Thread doahh
I didn't see your post before I posted again - thanks for the answer. Musachy Barroso wrote: By name means by the id in the action tag, like: s:action var=myaction .. /s:action s:property value=#myaction.someProperty / musachy On Fri, Mar 13, 2009 at 11:49 AM, doahh ga

Load a struts.xml that is not on the classpath

2009-02-12 Thread doahh
Hi, My app is using the Java Plugin Framework (JPF) to provide plugin functionality. The plugins for my app are not on the classpath as the JPF manages that itself. My plugins have a struts.xml file in them and I would like to be able to load the struts.xml from the plugin into my main app. This

RE: exception handling

2009-01-19 Thread doahh
I must be misunderstanding something, is that not what I am already doing my chaining to another action? Andy Hahn wrote: Regarding to the first responder - you could take this a step further and have ActionUnhandledExceptionHandler redirect to another action (Redirect After Post)‏.

RE: exception handling

2009-01-19 Thread doahh
I had not considered doing that before so thanks for the input, it would be better. Sorry to the OP for partially hijacking his thread. Andy Hahn wrote: Yes you are chaining, but if you write to a database, for example, the user could refresh the page and re-write to the database. The

Re: exception handling

2009-01-18 Thread doahh
I know this is slightly different from the way you are trying it but this is the way I am currently doing it is: lt;global-exception-mappingsgt; lt;exception-mapping exception=java.lang.Exception result=unhandledExceptionHandler/gt; lt;/global-exception-mappingsgt; lt;global-resultsgt;

Does struts2 sanatise the input from forms?

2009-01-18 Thread doahh
I have been thinking about protecting an app form SQL injection and XSS attacks but currently know very little about this area of security. I started out using the Http Data Integrity Validation Framework (HDIV) but found it was a little to secure in that it broke bookmarks, the back button and

Re: Does struts2 sanatise the input from forms?

2009-01-18 Thread doahh
Thanks for the great answer Wes. I had to think about it a little but it all makes sense. The interceptor is a good idea for checking data, I hadn't quite gotten that far in my thinking. Wes Wannemacher wrote: On Sunday 18 January 2009 09:34:23 doahh wrote: I have been thinking about

Use jsp:getProperty as value of struts2 tag

2008-11-07 Thread doahh
Hello, I have a jsp page that uses a custom iterate tag from a custom tag library. The tag puts objects into the pageContext but does not know anything about Struts2 (the values were retrieved through a plugin framework - JPF). While developing my tag I have been using jsp:getProperty to get at

Re: Use jsp:getProperty as value of struts2 tag

2008-11-07 Thread doahh
Thank you very much indeed Wes! That is exactly what I am after. I hadn't realised I needed the 'attr' bit in the front, that will teach me not to be so pedantic. -- View this message in context: http://www.nabble.com/Use-%3Cjsp%3AgetProperty-as-value-of-struts2-tag-tp20381725p20382581.html

Strus2, Freemarker and getting request.getContextPath()

2008-10-17 Thread doahh
I expect this is probably very easy but I have not seen and description anywhere of how to do it. I currently have this in a Struts2 enabled jsp page: %request.getContextPath()% and need to convert it to freemarker. I have tried the obvious: ${request.contextPath} ${request.getContextPath}

Re: Strus2, Freemarker and getting request.getContextPath()

2008-10-17 Thread doahh
Thanks for the reply, I am sure I am being dumb but I haven't had any luck in getting them working. I have tried: ${req} ${#req} %{req} %{#req} can you give an example of the correct syntax please? -- View this message in context:

Re: Strus2, Freemarker and getting request.getContextPath()

2008-10-17 Thread doahh
Thanks again for the reply, it didn't work for me but I managed to get it thanks to the documentation you pointed me towards. I got it through: ${action.servletResponseFromActionContext.contextPath} where 'servletResponseFromActionContext' is a method 'getServletResponseFromActionContext' of my

Message Store Interceptor - can not display error message with s:actionerror /

2008-08-30 Thread doahh
I haven't used the http://struts.apache.org/2.0.11/docs/message-store-interceptor.html Message Store Interceptor so I maybe be using it wrongly or it could be by setup is a little twisted. I have a single error page for my web application. The error page will show s:actionerror / if they are

RE: Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found

2008-08-05 Thread doahh
I have set up a very simple test app that is just spring and struts2. It works without a problem. In my main application I have been using a ClassPathXmlApplicationContext(springBeansDefinitionFile) in order to get references to my beans. When I comment this out and add my spring-config file to

RE: Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found

2008-08-05 Thread doahh
It looks like I can use: WebApplicationContextUtils.getWebApplicationContext(getServletContext()).getBean(myBean); in order to get already deployed beans. That clear up the error I was getting when I started this thread. I am getting another error but I will spend some time on it first before

RE: Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found

2008-08-05 Thread doahh
I didn't see your reply before I sent my last post. You were absolutely correct and I must say that, looking through that mass of config, well spotted. Thanks for your help Bard. -- View this message in context:

Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found

2008-08-04 Thread doahh
I am trying to get spring to manage my Struts2 actions but am getting the following error: Action class [springManagedProsocActionUpdateEmail] not found I have used the http://struts.apache.org/2.x/docs/spring-plugin.html http://struts.apache.org/2.x/docs/spring-plugin.html as a guide but

RE: Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found

2008-08-04 Thread doahh
Hi Brad and thank you for the reply. I have tried setting the scope=prototype but it didn't change the error I am seeing. I also tried your suggestion of removing the !* part of the method name from the action along with the method={1} but again it didn't change anything. I have noticed a

RE: Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found

2008-08-04 Thread doahh
Thanks again for replying, I am really stuck on this one at the moment. I am currently using struts-2.0.11.1 and spring-2.5.4. Another thing I have noticed on the struts plugin guide page at: http://struts.apache.org/2.x/docs/spring-plugin.html

RE: Struts2 and spring plugin - Action class [springManagedProsocActionUpdateEmail] not found

2008-08-04 Thread doahh
Thanks for your offer of help Brad and sorry these files are so big. I do have a habit of editing my posts occassionally through Nabble so maybe that is causing me to post twice? Currently a lack of skill prevents me from setting a break point on the SpringObjectFactory.buildBean() but that is