Re: Linking page

2010-05-21 Thread Denis Cabasson
I personnaly prefer to use the same Action for things that are logically grouped. So in your case, I would use the execute method to return SUCCESS, pointing to the jsp, and a doSearch method with SEARCH result, pointing to the other JSP. That way, you have only one action for both JSP. I

Re: Forms with Multiple Submit buttons (Bug or Expected?)

2010-05-19 Thread Denis Cabasson
Why not doing that on the server side, using the s:token approach? That would prevent double submit on the server side. On the client side, I would say that your disabling the button before the form is submitted (the onsubmit technically happens before the submit, so that you can uypdate some

Re: spring, struts2, convention plugin, how to wire an action class

2010-05-13 Thread Denis Cabasson
Jake, the short answer to your problem is : use the struts-spring plugin ( http://struts.apache.org/2.1.8.1/docs/spring-plugin.html ). Include the jar for that plugin in your classpath, and Struts 2 will use Spring to manage the Action lifecycle, meaning you can inject anything the way you are

Re: spring, struts2, convention plugin, how to wire an action class

2010-05-13 Thread Denis Cabasson
My best guess is that the Action instance used in the web application is not actually loaded from the configuration in your applicationContext, but directly by Struts 2 (through the Spring Factory, but still Struts 2). That mean that you will have a bean named myAction in you application

Re: Some Spring/Struts questions

2010-05-12 Thread Denis Cabasson
A new requirement means that we need to have available across pretty much every action a separate, independent bean that carries information that may (or may not) need to be displayed on the resulting web-pages. I am wondering what the best way is to make this bean available to each JSP. We

Re: how to set default focus field in s:form ?

2010-05-12 Thread Denis Cabasson
I recommend attaching the focus to the relevant form element purely using Javascript, ie, including in you JSP : script type=test/javascript window.onload = function() { document.getElementById('yourInpudId').focus(); } /script That way you have a pure javascript implementation, and you

Re: Login redirection

2010-04-27 Thread Denis Cabasson
Hi Mark, To implement security across multiples applications (Struts or non Struts), you will have to rely on the container. The container is really the best way to go if you want to implement a cross applications sign-on. Now, about your specific question, I guess we are missing some

Re: Issue with logic:iterate Tag

2010-04-25 Thread Denis Cabasson
I recommend using displaytag for displaying tables in JSP : http://displaytag.sourceforge.net/1.2/ It comes with support for Grouping (see http://displaytag.homeip.net/displaytag-examples-1.2/example-grouping.jsp ) which is the feature you are looking for. I love displaytag for its ease of

Re: Setting selected with s:select tags

2010-04-24 Thread Denis Cabasson
Hi Kartik, Remove the attribute value from your s:select tag, and in your action, preset the value of your attribute actionStatus (on your Action class) to OPEN or CLOSED. At least, it is working in my case. Let us know if it is not working for you that way, and I will put together a simple

Re: Using json in Struts 2.1.8.1

2010-04-16 Thread Denis Cabasson
As of struts 2.1.8, you have (well can, but it's recommended) use the struts2-json-plugin rather than the googlecode version (the google code one has been transferred to apache as a struts 2 plugin). To do that, just use the class name org.apache.struts2.json.JSONResult (see

Re: [Struts 2.1.8.1] Internationalization: how to remain in the current page ?

2010-03-29 Thread Denis Cabasson
Hi, We use a simple and empty s:url includeParam=get/ tag to loop back to the current action/url. The only thing you have to look for are those unsafe urls: we don't have any unsafe urls in our application, thanks to an extensive POST then GET approach. Whenever some action is done in the

Re: validation xml file

2009-11-29 Thread Denis Cabasson
Do you have a result named input tied to your LoginAction? What is it? Denis. Nguyen Xuan Son a écrit : Dear all I have these in the LoginAction-validation.xml file validators field name=txtName field-validator type=requiredstring param name=trimfalse/param messageerror/message

Re: [Struts 2.1.8] Message properties on SUBMIT tag not working

2009-11-29 Thread Denis Cabasson
You should use key to change the text outputted on the screen. You should use name as well to avoid the error you are seeing: the name is being used as the property to set on your action. This error is actually a warning, that is not preventing anything from working fine in your application.

Re: validation xml file

2009-11-29 Thread Denis Cabasson
Please tell me what should i correct? thank you very much 2009/11/30 Denis Cabasson denis.cabas...@gmail.com mailto:denis.cabas...@gmail.com Do you have a result named input tied to your LoginAction? What is it? Denis. Nguyen Xuan Son a écrit : Dear all I have

Re: unstatable implement

2009-11-29 Thread Denis Cabasson
Obviously, if you don't have a session, ses.get(context) will return null. And null.toString() that's a nice NPE. I usually use StringUtils.isNotEmpty for commons-lang : http://commons.apache.org/lang/api-release/org/apache/commons/lang/StringUtils.html#isNotEmpty(java.lang.String)

Re: S2 Strange behaviour of validation

2009-11-28 Thread Denis Cabasson
Hi Titus, This behaviour is the standard behaviour of struts 2. Your second message comes from the conversion error : http://struts.apache.org/2.1.8.1/docs/conversion-error-interceptor.html I suppose that your field is of type int (or any number like class). Struts will in the first try to

Re: Hibernate/Spring

2009-11-14 Thread Denis Cabasson
From what you are saying, I would have a look at the : http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/orm/jpa/support/OpenEntityManagerInViewInterceptor.html My best guess is that this would fix your issue. If not, you probably have an issue with the way you are

Re: Hibernate/Spring

2009-11-14 Thread Denis Cabasson
Hi Martin, I am building a Struts 2 / Spring / Hibernate application, using the JPA specification as it seems to be the case here. It is not required to go through all the pain of using EJB entities. I am running this application both in Websphere and Tomcat, without using the container at

Re: Struts 2.1.8 and Tiles

2009-10-17 Thread Denis Cabasson
Make sure to use the tiles plugin as described in : http://struts.apache.org/2.1.8/docs/tiles-plugin.html I am using it, and have no issue so far with it. Your error seems to be in the result you are redirecting to. How is your action tied up? Denis. Sommers, Elizabeth a écrit : Is it

Re: Struts2 on Websphere 6.1 : 404 errors

2009-10-17 Thread Denis Cabasson
I concur. We are using struts 2.1.8 with WAS 6.1.0.27 and there is no way around this variable. It is documented in our installation procedure, and you will never get any filter based framework to work unless you set this variable. The default Websphere behaviour (without this variable that

Re: execute() not getting executed

2009-10-17 Thread Denis Cabasson
No out of the box way of dealing with that. You can send your jsp code / Action code to see if we can figure out what is wrong. Denis. james billa a écrit : Hi - I am using struts 2.1.6. From my jsp on submitting the form, the control goes to my action class, methods prepare() and validate()

Re: Struts 2.1.8: Do we need to escape messages?

2009-10-17 Thread Denis Cabasson
What code are you using to output this message? Is it a s:text? a s:property? Alex Siman a écrit : I just have found that Struts 2.1.8 escapes messages, so instead of message (in browser) like: User with email u...@example.com registered successfully. now I get this one: User with email

Re: Struts 2.1.8 and Tiles

2009-10-16 Thread Denis Cabasson
Make sure to use the tiles plugin as described in : http://struts.apache.org/2.1.8/docs/tiles-plugin.html I am using it, and have no issue so far with it. Your error seems to be in the result you are redirecting to. How is your action tied up? Denis. Sommers, Elizabeth a écrit : Is it

Re: Struts2 on Websphere 6.1 : 404 errors

2009-10-16 Thread Denis Cabasson
I concur. We are using struts 2.1.8 with WAS 6.1.0.27 and there is no way around this variable. It is documented in our installation procedure, and you will never get any filter based framework to work unless you set this variable. The default Websphere behaviour (without this variable that

Re: Struts 2.1.8: Do we need to escape messages?

2009-10-16 Thread Denis Cabasson
What code are you using to output this message? Is it a s:text? a s:property? Denis. Alex Siman a écrit : I just have found that Struts 2.1.8 escapes messages, so instead of message (in browser) like: User with email u...@example.com registered successfully. now I get this one: User with

Re: execute() not getting executed

2009-10-16 Thread Denis Cabasson
No out of the box way of dealing with that. You can send your jsp code / Action code to see if we can figure out what is wrong. Denis. james billa a écrit : Hi - I am using struts 2.1.6. From my jsp on submitting the form, the control goes to my action class, methods prepare() and validate()

Re: [S2]All the methods with get prefix are invoked

2009-09-09 Thread Denis Cabasson
Hi, The debug tag is inspecting the status of your action to build its HTML output, which include knowing the value of test1, and thus calling the corresponding getter. Take out the debug tag, and everything should be back to normal. Denis. Gábor Kovács a écrit : Hi everyone, I'm

Re: Align issues in struts 2 UI atgs

2009-05-08 Thread Denis Cabasson
Hi, I usually use s:submit theme=simple / s:reset theme=simple ... / which will generate the buttons only, allowing you to take care of the presentation your way. Denis. Murugesh a écrit : Hi guys i have tried out but not getting the solution. i need two buttons in a row like

Re: pagination in struts2

2009-04-23 Thread denis cabasson
Display tag is great for table pagination. If you are looking for pagination without tables, I'd recommend the pager tag library : http://jsptags.com/tags/navigation/pager/index.jsp Custom coding is my least favorite way of solving an issue. To extract a variable from an action to the page, I'd

Re: s:url, s:param and german umlauts

2009-04-23 Thread denis cabasson
Hi, Escape is escaping you text in an HTML friendly way. your ü was tranformed to #xFC; (which is the corresponding HTML entity). The issue is that you were using that in URL that was URL-encoded. So you #xFC; is transformed to %26%23xFC%3B (with %26= , ...). So in the case you are using the value

Re: debugging jsp pages with struts html tags

2009-04-23 Thread Denis Cabasson
s:debug / is usually helpful (without being a real debugger). Denis. Bhaarat Sharma a écrit : Is there a way to debug jsp pages that have struts2 html tags?? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org

Re: [S2.1][Convention] Changing the ActionNameBuilder implemetation

2009-02-11 Thread denis cabasson
, 2009 at 10:16 PM, denis cabasson denis.cabas...@polytechnique.org wrote: Hi folks! I am using Struts 2.0.14 on a project with a fairly big existing codebase. I just tried to upgrade to struts 2.1.6 (as the release is now in GA). We were using extensively the zero configuration

[S2.1][Convention] Changing the ActionNameBuilder implemetation

2009-02-10 Thread denis cabasson
Hi folks! I am using Struts 2.0.14 on a project with a fairly big existing codebase. I just tried to upgrade to struts 2.1.6 (as the release is now in GA). We were using extensively the zero configuration approach with the codebehind plugin and I am now looking at upgrading to the convention