validation with simple theme
Hi, My requirement is fieldError should appear below/above respective fields. for that i written the following code:- first with this it is working fine but the thing is alignemt is disturbed completly when i looked the source code what i found was first is required these are making alignemt disturb. I notice that ... is actually replaced by *error message *in the code. Is there a way to let the tag only renders the error message instead of a list? Pls, help me out from this problem Srikanth -- View this message in context: http://www.nabble.com/validation-with-simple-theme-tp21760841p21760841.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[S2] Form input result results in jsp s:actions being forced to use input result as well?
Hi all, I have a form that I am submitting, the form returns the input result which points to a jsp that contains an interior s:action tag that loads some data for display into its own jsp rendered inside (menu). I have noticed that when the form fails and the input result is called, the s:action never actually calls the action classes execute method, but goes directly to its input result. This doesn't work for my app because I must load data there even on a form submission failure. Is there some way to work around this problem? Thanks! David - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: trouble deploying struts2 app to tomcat 1.5.0.05
we can be of more assistance if you send us the .project Martin __ Disclaimer and confidentiality note Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. > Date: Fri, 30 Jan 2009 22:40:29 +0100 > Subject: Re: trouble deploying struts2 app to tomcat 1.5.0.05 > From: lukasz.len...@googlemail.com > To: user@struts.apache.org > > 2009/1/30 Wick, Dan : > > I've developed an application using struts2 (2.0.12 to be exact). It > > works on my local windows box, on Tomcat via Eclipse, but not as a war > > when I put it up on a server. I get the following stack, which I can't > > see anything wrong...although I'm sure it's something I did! > > Just before when you will create war file with Eclipse, you have check > in procject settings which jar also export into the war. > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > _ Windows Live™ Hotmail®…more than just e-mail. http://windowslive.com/howitworks?ocid=TXT_TAGLM_WL_t2_hm_justgotbetter_howitworks_012009
Re: [S2] Store a request and invoke it later
Hello Ralf, sorry for not replying earlier. I have to check the list more frequently. Ralf Fischer schrieb: Hint: storing *everything* into the session might be unwise in some circumstances, as all resources on a server are limited, even cheap memory. everything == "everything that is necessary to make the login interception transparent to the action" :-) I would use a simple redirect result as long as you have to deal with HTTP-GETs only, as it's pretty hard to redirect a POST. POST would be nice to have, but GET only will be fine ATM. - Create a global result[1] which leads to the login page. - When your interceptor thinks a login is required, store the requested URL to the session and return the global login result from your interceptor. That's exactly what I'm already doing (except for storing the URL). Good to get some approval! - When the login action ends successfully, if an URL is in the session, redirect to it using a simple redirect result with a parametrized url [2]. I will give it a try. Thank you for the hint. Greetings, ~Andreas - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S2] Passng a parameter with (multiple) Submit buttons
You can use the method attribute in the s:submit button, combined with a method in your action. You could use the different method invocation as an implicit parameter. You may need to use the action wildcard feature in struts.xml Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco S. On Fri, Jan 30, 2009 at 15:54, Greg Lindholm wrote: > I have a CRUD action and jsp page for an entity, this entity has a list of > attributes. I display these attributes in a table one per row. > What I would like to do is have a button on > each row of the table so the user can click on the button to remove the > attribute. > In order to make this work I would need to pass the id of the attribute with > the submit button and I can't find a way to do this. > > Is there a (struts) way to pass a parameter with a submit button? > > I can't use a link because I need all the other form fields to be posted with > the request. > > The only way I can think of making this work is to add some javascript to > each button that would set the id in a hidden field before the submit. Is > there a pure struts or better way to do this? > > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts 2 and Command chains
Since I have moved to struts 2, It has been somehow hard for me to forgo the simplicity offered by combining struts 1.2+ and Apache common chains. In a number of projects [medium sized to large] I managed to get away only with ONE single action class for the whole project. Just consider the following: 1- All your http forms use a Map form 2- Each of your url mappings maps to a chain name 3- You have a single CommandAction class that does the following: a) Puts the Map form in a chain context b) Executes the chain c) Iterates through the context and puts every value whose key conventionally starts with "request_" c) forwards the result I have been trying to see if I can devise or follow a similar logic in struts 2 but so far of no avail, and I have ended up creating actions here and there. Though "Struts in Action" book touchs on a few designs for CRUD, It falls below the flexibility and the simpilicity offered by struts 1.2+ and command chains in this respect. I was just wondering if anybody else out there has any ideas/tips that can share in this regard? __ Yahoo! Canada Toolbar: Search from anywhere on the web, and bookmark your favourite sites. Download it now at http://ca.toolbar.yahoo.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: trouble deploying struts2 app to tomcat 1.5.0.05
The jars that end up in the war file on the server match exactly what's in my "build path" jars in eclipse, less servlet.jar & jre. I use ant to build it, so there are excludes for the jre, servlet.jar, etc. --Dan > -Original Message- > From: Lukasz Lenart [mailto:lukasz.len...@googlemail.com] > Sent: Friday, January 30, 2009 3:40 PM > To: Struts Users Mailing List > Subject: Re: trouble deploying struts2 app to tomcat 1.5.0.05 > > 2009/1/30 Wick, Dan : > > I've developed an application using struts2 (2.0.12 to be > exact). It > > works on my local windows box, on Tomcat via Eclipse, but > not as a war > > when I put it up on a server. I get the following stack, which I > > can't see anything wrong...although I'm sure it's something I did! > > Just before when you will create war file with Eclipse, you > have check in procject settings which jar also export into the war. > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
[S2] Passng a parameter with (multiple) Submit buttons
I have a CRUD action and jsp page for an entity, this entity has a list of attributes. I display these attributes in a table one per row. What I would like to do is have a button on each row of the table so the user can click on the button to remove the attribute. In order to make this work I would need to pass the id of the attribute with the submit button and I can't find a way to do this. Is there a (struts) way to pass a parameter with a submit button? I can't use a link because I need all the other form fields to be posted with the request. The only way I can think of making this work is to add some javascript to each button that would set the id in a hidden field before the submit. Is there a pure struts or better way to do this?
Re: trouble deploying struts2 app to tomcat 1.5.0.05
2009/1/30 Wick, Dan : > I've developed an application using struts2 (2.0.12 to be exact). It > works on my local windows box, on Tomcat via Eclipse, but not as a war > when I put it up on a server. I get the following stack, which I can't > see anything wrong...although I'm sure it's something I did! Just before when you will create war file with Eclipse, you have check in procject settings which jar also export into the war. Regards -- Lukasz http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: trouble deploying struts2 app to tomcat 1.5.0.05
You've un-zipped the war to confirm the libs are actually in there? Dave Wick, Dan wrote: All, I've developed an application using struts2 (2.0.12 to be exact). It works on my local windows box, on Tomcat via Eclipse, but not as a war when I put it up on a server. I get the following stack, which I can't see anything wrong...although I'm sure it's something I did! STACK Jan 30, 2009 2:21:00 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Unknown Source) at org.apache.catalina.core.ApplicationFilterConfig.(Unknown Source) at org.apache.catalina.core.StandardContext.filterStart(Unknown Source) at org.apache.catalina.core.StandardContext.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardHost.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardEngine.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Unknown Source) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) Jan 30, 2009 2:21:00 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 30, 2009 2:21:00 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/pwww] startup failed due to previous errors END STACK I don't do anything fancy with filters. Here's my web.xml: web.xml http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> Struts Blank struts2 org.apache.struts2.dispatcher.FilterDispatcher ss> struts2 /* index.html END web.xml Libs in my /WEB-INF/lib are: WEB-INF/lib activation.jarfreemarker-2.3.8.jar antlr-2.7.2.jar mail.jar commons-beanutils-1.6.jar ognl-2.6.11.jar commons-chain-1.1.jar oro-2.0.8.jar commons-collections-3.1.jar ostermillerutils_1_06_01.jar commons-fileupload-1.1.1.jar profile.xml commons-io-1.4.jarscsadapter.log commons-logging-1.0.4.jar struts2-core-2.0.12.jar commons-validator-1.3.0.jar xwork-2.0.6.jar *End WEB-INF/lib I see many posts about duplicate libraries out on the *tubes* but, I don't see any duplicates in my tomcat commons/lib or commons/endorsed. I made sure servlet.jar isn't in the war files...etc. Any hints folks?!?! Of course I've got 10 people looking over my shoulder waiting to test the app out! Thanks! Dan - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
trouble deploying struts2 app to tomcat 1.5.0.05
All, I've developed an application using struts2 (2.0.12 to be exact). It works on my local windows box, on Tomcat via Eclipse, but not as a war when I put it up on a server. I get the following stack, which I can't see anything wrong...although I'm sure it's something I did! STACK Jan 30, 2009 2:21:00 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 java.lang.ClassNotFoundException: org.apache.struts2.dispatcher.FilterDispatcher at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.loadClass(Unknown Source) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(Unknown Source) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(Unknown Source) at org.apache.catalina.core.ApplicationFilterConfig.(Unknown Source) at org.apache.catalina.core.StandardContext.filterStart(Unknown Source) at org.apache.catalina.core.StandardContext.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardHost.start(Unknown Source) at org.apache.catalina.core.ContainerBase.start(Unknown Source) at org.apache.catalina.core.StandardEngine.start(Unknown Source) at org.apache.catalina.core.StandardService.start(Unknown Source) at org.apache.catalina.core.StandardServer.start(Unknown Source) at org.apache.catalina.startup.Catalina.start(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Unknown Source) at org.apache.catalina.startup.Bootstrap.main(Unknown Source) Jan 30, 2009 2:21:00 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 30, 2009 2:21:00 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/pwww] startup failed due to previous errors END STACK I don't do anything fancy with filters. Here's my web.xml: web.xml http://java.sun.com/xml/ns/j2ee"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";> Struts Blank struts2 org.apache.struts2.dispatcher.FilterDispatcher struts2 /* index.html END web.xml Libs in my /WEB-INF/lib are: WEB-INF/lib activation.jarfreemarker-2.3.8.jar antlr-2.7.2.jar mail.jar commons-beanutils-1.6.jar ognl-2.6.11.jar commons-chain-1.1.jar oro-2.0.8.jar commons-collections-3.1.jar ostermillerutils_1_06_01.jar commons-fileupload-1.1.1.jar profile.xml commons-io-1.4.jarscsadapter.log commons-logging-1.0.4.jar struts2-core-2.0.12.jar commons-validator-1.3.0.jar xwork-2.0.6.jar *End WEB-INF/lib I see many posts about duplicate libraries out on the *tubes* but, I don't see any duplicates in my tomcat commons/lib or commons/endorsed. I made sure servlet.jar isn't in the war files...etc. Any hints folks?!?! Of course I've got 10 people looking over my shoulder waiting to test the app out! Thanks! Dan - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Maven and Struts 2 Stack
http://code.google.com/p/struts2inpractice/source/browse/#svn/trunk Scott, you should have been able to find that ;) -Wes On Fri, Jan 30, 2009 at 12:22 PM, Musachy Barroso wrote: > This should(might) also help: > http://struts.apache.org/2.x/docs/struts-maven-archetypes.html > > musachy > > On Fri, Jan 30, 2009 at 12:20 PM, Musachy Barroso wrote: >> Wes has a bunch of examples that you can use as templates. I am trying >> to find the link, but failing so far. Wes, are you out there? >> >> musachy >> >> On Fri, Jan 30, 2009 at 12:14 PM, Edwin Quita wrote: >>> hi Scott, >>> >>> here's the first project i created using struts2 and Maven... just >>> adjust the versions to your liking. >>> >>> here's a version that exists in maven's central repository >>> >>> >>>org.apache.struts >>>struts2-core >>>2.0.6 >>> >>> >>>org.apache.struts >>>struts2-spring-plugin >>>2.0.6 >>> >>> >>> >>> while the latest you can pull out from sonatype's repo :) >>> >>> cheers, >>> Edwin >>> >>> On Sat, Jan 31, 2009 at 1:05 AM, stanlick wrote: Greetings -- I am SO DONE with mucking around in dependencies that I am about to scream! Until recently, I thought "real developers" were in control of jars and the classpath, but as another year passes me by, I'm starting to rethink this whole deal. I installed the Maven 2 plug-in for Eclipse this morning and should begin by telling you that beyond appreciating the idea of Maven, I don't understand it intimately well! Create new Maven Project is prompting me for bits and pieces I don't fully understand. Moreover, I'm only guessing that http://mvnrepository.com is the place I should specify to have my dependencies resolved in building a Struts-2/Tiles-2/Spring-2 web project. I have been reading about the archetypes and this must be a fancy name for "what kind of sandwich do you want." Can someone please tell me how to decode these prompts so I can get about the business of writing code? I realize some of the inputs are my web-app name, but several others must be version and contents values. P.S. Cloning my last know Struts 2 sandwich and making the necessary build path tweaks for a bump to 2.1.6 no longer passes the tummy test. Peace, Scott -- View this message in context: http://www.nabble.com/Maven-and-Struts-2-Stack-tp21751296p21751296.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >> >> >> >> -- >> "Hey you! Would you help me to carry the stone?" Pink Floyd >> > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [S2] possible bug in 2.1.6 w/ action chaining
I forgot to mention that we're setting the test value in struts.xml initially (in the first action in the chain). That's the value that doesn't get modified in this test case. -B Musachy Barroso To Struts Users Mailing List 01/29/2009 04:24 PM cc Subject Please respond to Re: [S2] possible bug in 2.1.6 w/ "Struts Users action chaining Mailing List" Nope I haven't, I started by looking at showcase and dropping your classes there. I will give em a try if you don't see anything wrong in showcase. musachy On Thu, Jan 29, 2009 at 6:15 PM, wrote: > Musachy, > > In the bug report, under Test 1 instructions it's shows it working against > 2.1.2 In the second set of instructions (accidentally also called Test 1) > it details how to make it not work by swapping over to 2.1.6. > > Did you by any chance run this test case standalone, using the second set > of instructions? > > -B > > > > > Musachy Barroso > m> To > Struts Users Mailing List > 01/29/2009 02:37 > PM cc > > Subject > Please respond to Re: [S2] possible bug in 2.1.6 w/ > "Struts Users action chaining > Mailing List" > he.org> > > > > > > > > Thanks for the testcase. I am looking at it, and there is a very > similar case in showcase, but it seems fine. > > http://localhost:8080/struts2-showcase/actionchaining/actionChain1!input > > the output is: > > Action Chain 1 Property 1: Property Set In Action Chain 1 > Action Chain 2 Property 1: Property Set in Action Chain 2 > Action Chain 3 Property 1: Property set in Action Chain 3 > > Do you see any difference from your testcase (which I haven't run yet) > > musachy > > On Thu, Jan 29, 2009 at 5:10 PM, wrote: >> Thanks, bug WW-2970 was submitted along with a test case. >> -B >> >> >> >> >> Musachy Barroso >> > m> To >> Struts Users Mailing List >> 01/28/2009 11:43 >> AM cc >> >> Subject >> Please respond to Re: [S2] possible bug in 2.1.6 w/ >> "Struts Users action chaining >> Mailing List" >> > he.org> >> >> >> >> >> >> >> >> This is the first report I hear, open a jira ticket and describe a >> test case to replicate the problem. >> >> musachy >> >> On Wed, Jan 28, 2009 at 12:03 PM, >> wrote: >>> Hadn't heard back from anyone about this. I'll go ahead and file a bug >>> report. >>> No one is using action chaining with 2.1.6? >>> >>> Thanks, >>> -B >>> >>> >>> >>> >>> Becky.L.O'Sulliva >>> n...@healthnet.com >>> > To >>> 01/27/2009 11:58 "Struts Users Mailing List" >>> AM >>> > cc >>> >>> Please respond to > Subject >>> "Struts Users [S2] possible bug in 2.1.6 w/ >>> Mailing List" action chaining >>> >> he.org> >>> >>> >>> >>> >>> >>> >>> >>> >>> Hi group, >>> >>> We're trying to upgrade from 2.1.2 to 2.1.6 and ran into an issue. >>> >>> We use action chaining because it suits a particular requirement we had >> for >>> this application. >>> However, after upgrading, we're seeing that the value stack isn't > holding >>> on to values set by actions further up in the chain. Has anyone tested >>> 2.1.6 with the chain interceptor? >>> >>> Thanks, >>> -Becky >>> >>> >>> >>> - >>> This message, together with any attachments, is >>> intended only for the use of the individual or entity >>> to which it is addressed. It may contain information >>> that is confidential and prohibited from disclosure.
Re: [S2] possible bug in 2.1.6 w/ action chaining
Because Showcase is so packed with goodies something else may be causing chaining to actually work. If you try that test case standalone (after modifying the POM XML for 2.1.6) chaining doesn't work (the value stays the initial value). -B Musachy Barroso To Struts Users Mailing List 01/29/2009 04:24 PM cc Subject Please respond to Re: [S2] possible bug in 2.1.6 w/ "Struts Users action chaining Mailing List" Nope I haven't, I started by looking at showcase and dropping your classes there. I will give em a try if you don't see anything wrong in showcase. musachy On Thu, Jan 29, 2009 at 6:15 PM, wrote: > Musachy, > > In the bug report, under Test 1 instructions it's shows it working against > 2.1.2 In the second set of instructions (accidentally also called Test 1) > it details how to make it not work by swapping over to 2.1.6. > > Did you by any chance run this test case standalone, using the second set > of instructions? > > -B > > > > > Musachy Barroso > m> To > Struts Users Mailing List > 01/29/2009 02:37 > PM cc > > Subject > Please respond to Re: [S2] possible bug in 2.1.6 w/ > "Struts Users action chaining > Mailing List" > he.org> > > > > > > > > Thanks for the testcase. I am looking at it, and there is a very > similar case in showcase, but it seems fine. > > http://localhost:8080/struts2-showcase/actionchaining/actionChain1!input > > the output is: > > Action Chain 1 Property 1: Property Set In Action Chain 1 > Action Chain 2 Property 1: Property Set in Action Chain 2 > Action Chain 3 Property 1: Property set in Action Chain 3 > > Do you see any difference from your testcase (which I haven't run yet) > > musachy > > On Thu, Jan 29, 2009 at 5:10 PM, wrote: >> Thanks, bug WW-2970 was submitted along with a test case. >> -B >> >> >> >> >> Musachy Barroso >> > m> To >> Struts Users Mailing List >> 01/28/2009 11:43 >> AM cc >> >> Subject >> Please respond to Re: [S2] possible bug in 2.1.6 w/ >> "Struts Users action chaining >> Mailing List" >> > he.org> >> >> >> >> >> >> >> >> This is the first report I hear, open a jira ticket and describe a >> test case to replicate the problem. >> >> musachy >> >> On Wed, Jan 28, 2009 at 12:03 PM, >> wrote: >>> Hadn't heard back from anyone about this. I'll go ahead and file a bug >>> report. >>> No one is using action chaining with 2.1.6? >>> >>> Thanks, >>> -B >>> >>> >>> >>> >>> Becky.L.O'Sulliva >>> n...@healthnet.com >>> > To >>> 01/27/2009 11:58 "Struts Users Mailing List" >>> AM >>> > cc >>> >>> Please respond to > Subject >>> "Struts Users [S2] possible bug in 2.1.6 w/ >>> Mailing List" action chaining >>> >> he.org> >>> >>> >>> >>> >>> >>> >>> >>> >>> Hi group, >>> >>> We're trying to upgrade from 2.1.2 to 2.1.6 and ran into an issue. >>> >>> We use action chaining because it suits a particular requirement we had >> for >>> this application. >>> However, after upgrading, we're seeing that the value stack isn't > holding >>> on to values set by actions further up in the chain. Has anyone tested >>> 2.1.6 with the chain interceptor? >>> >>> Thanks, >>> -Becky >>> >>> >>> >>> - >>> This message, together with any attachments, is >>> intended only for the use of the individual or entity >>> to which it is addressed. It may contain informa
RE: textbox showing currency default value
You need to implement that in action. -Original Message- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 2:26 PM To: Struts Users Mailing List Subject: Re: textbox showing currency default value sorry... I meant .. I'm really tired...:D Paolo Niccolò Giubelli ha scritto: > Sorry, I don't understand from where I should return what. > I have a Form with a float m_price = 0.0 field (wit accessors methods). > In the jsp I have > > > > I need to se a textbox like this > > || > | 0,00 | > || > > > Thanks anyway. > > Zheng, Qiang ha scritto: >> You can try load the locale of this user and >> >> Format currencyformat = NumberFormat.getCurrencyInstance(locale); >> Return currencyformat.format(amount); >> >> -Original Message- >> From: Paolo Niccolò Giubelli >> [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, >> 2009 1:54 PM >> To: Struts Users Mailing List >> Subject: textbox showing currency default value >> >> Hi! I need to display a textbox, where the user should write a money >> value in eur. I need the textbox to display the default value in the >> correct currency mode, like 0,00 (comma separated decimals) and not 0.0. >> Of course, the textbox is "connected" with a float field. Now I get >> 0.0 as the default value and when I type something like 20,99 the >> value is not recognized as a valid float. >> Any idea? Thank you in advance! >> Paolo >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: textbox showing currency default value
sorry... I meant .. I'm really tired...:D Paolo Niccolò Giubelli ha scritto: Sorry, I don't understand from where I should return what. I have a Form with a float m_price = 0.0 field (wit accessors methods). In the jsp I have I need to se a textbox like this || | 0,00 | || Thanks anyway. Zheng, Qiang ha scritto: You can try load the locale of this user and Format currencyformat = NumberFormat.getCurrencyInstance(locale); Return currencyformat.format(amount); -Original Message- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 1:54 PM To: Struts Users Mailing List Subject: textbox showing currency default value Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
struts2 and tiles
Hello, please, can you show me on this example how to convert tiles from struts1 to struts2? This example defines localized page title attribute passed to template in struts1: <% String docTitle = messages.getMessage(locale, "page.title"); %> Thank you. Tom - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: textbox showing currency default value
Sorry, I don't understand from where I should return what. I have a Form with a float m_price = 0.0 field (wit accessors methods). In the jsp I have I need to se a textbox like this || | 0,00 | || Thanks anyway. Zheng, Qiang ha scritto: You can try load the locale of this user and Format currencyformat = NumberFormat.getCurrencyInstance(locale); Return currencyformat.format(amount); -Original Message- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 1:54 PM To: Struts Users Mailing List Subject: textbox showing currency default value Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: textbox showing currency default value
You can try load the locale of this user and Format currencyformat = NumberFormat.getCurrencyInstance(locale); Return currencyformat.format(amount); -Original Message- From: Paolo Niccolò Giubelli [mailto:paoloniccolo.giube...@itestense.it] Sent: Friday, January 30, 2009 1:54 PM To: Struts Users Mailing List Subject: textbox showing currency default value Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
textbox showing currency default value
Hi! I need to display a textbox, where the user should write a money value in eur. I need the textbox to display the default value in the correct currency mode, like 0,00 (comma separated decimals) and not 0.0. Of course, the textbox is "connected" with a float field. Now I get 0.0 as the default value and when I type something like 20,99 the value is not recognized as a valid float. Any idea? Thank you in advance! Paolo - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Maven and Struts 2 Stack
stanlick wrote: I am SO DONE with mucking around in dependencies that I am about to scream! Until recently, I thought "real developers" were in control of jars and the classpath, but as another year passes me by, I'm starting to rethink this whole deal. I installed the Maven 2 plug-in for Eclipse this morning and should begin by telling you that beyond appreciating the idea of Maven, I don't understand it intimately well! Create new Maven Project is prompting me for bits and pieces I don't fully understand. Moreover, I'm only guessing that http://mvnrepository.com is the place I should specify to have my dependencies resolved in building a Struts-2/Tiles-2/Spring-2 web project. I have been reading about the archetypes and this must be a fancy name for "what kind of sandwich do you want." Can someone please tell me how to decode these prompts so I can get about the business of writing code? I realize some of the inputs are my web-app name, but several others must be version and contents values. P.S. Cloning my last know Struts 2 sandwich and making the necessary build path tweaks for a bump to 2.1.6 no longer passes the tummy test. You shouldn't need to define a repository under normal circumstances; at least I haven't had to. AFAICT 2.1.6 has been seeded, although I'd have to purge my local repo to be sure to avoid getting a local install. I'm about to check in a new struts2-blank archetype and update the wiki (probably this afternoon) but if you use the normal Maven project structure and use reasonable version numbers in your dependencies as someone else pointed out it'll work fine without generating an archetype. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts-tag ?
As Wes suggested get the blank application from the demo zip: http://struts.apache.org/download.cgi#struts216 also, the instructions on what needs to be done to get the samples of Struts 2 in Action running are in the README.txt file inside the download. musachy On Fri, Jan 30, 2009 at 12:05 PM, SanJ.SANJAY wrote: > > Sapmle application that is available for download for struts 2 in action, is > really painful to install. There is no proper instruction in the book on how > to install it and there are many issues when we try to do it ourself. > Sometimes I feel so frustrated about buying this book... > > > > > SanJ.SANJAY wrote: >> >> Ok, >> >> I downloaded a sample application for Sruts 2 from manning .com for >> StrutsInAction. I still get the same error on the web server. When open >> "http://localhost:8080/SampleApplication/Menu.action"; >> for a moment the page says ...One moment please.. and then dumps the >> error. >> >> >> HTTP Status 500 - >> >> >> >> type Exception report >> >> message >> >> description The server encountered an internal error () that prevented it >> from fulfilling this request. >> >> exception >> >> javax.servlet.ServletException: File "/struts-tags" not found >> >> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) >> >> org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422) >> org.apache.struts2.plexus.PlexusFilter.doFilter(PlexusFilter.java:96) >> >> org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) >> >> >> root cause >> >> org.apache.jasper.JasperException: File "/struts-tags" not found >> >> org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50) >> >> org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) >> >> >> >> >> >> >> >> Wes Wannemacher wrote: >>> >>> On Wednesday 28 January 2009 10:59:35 SanJ.SANJAY wrote: I can extract the struts-core jar with an error. >>> >>> Was that a mistake? >>> Also I placed them under WEB-INF/lib folder. The only thing I have'nt done yet is struts.xml file. Could this be the issue? I thought since I wil not be using any action for this case, I did not need it? What do you say? >>> >>> I don't think that it is a problem, but it could be. Which brings me to >>> my >>> next point... How do you expect Struts 2 to work if you aren't going to >>> create >>> actions? The majority of tags will not work, if the page has not been >>> processed by the Filter. >>> >>> Anyhow, can you try to deploy one of the sample apps in your app server? >>> Try >>> struts2-blank. If it works, we'll know it's not an app server problem. >>> I'm >>> guessing that your setup is hosed. My suggestion would be to take a look >>> at >>> the getting started guides and try to build a simple application, before >>> dumping all the jars into WEB-INF/lib and trying out the tags. >>> >>> -Wes >>> >>> -- >>> >>> Wes Wannemacher >>> Author - Struts 2 In Practice >>> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more >>> http://www.manning.com/wannemacher >>> >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >>> >> >> > > -- > View this message in context: > http://www.nabble.com/Struts-tag---tp21707578p21751301.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Maven and Struts 2 Stack
This should(might) also help: http://struts.apache.org/2.x/docs/struts-maven-archetypes.html musachy On Fri, Jan 30, 2009 at 12:20 PM, Musachy Barroso wrote: > Wes has a bunch of examples that you can use as templates. I am trying > to find the link, but failing so far. Wes, are you out there? > > musachy > > On Fri, Jan 30, 2009 at 12:14 PM, Edwin Quita wrote: >> hi Scott, >> >> here's the first project i created using struts2 and Maven... just >> adjust the versions to your liking. >> >> here's a version that exists in maven's central repository >> >> >>org.apache.struts >>struts2-core >>2.0.6 >> >> >>org.apache.struts >>struts2-spring-plugin >>2.0.6 >> >> >> >> while the latest you can pull out from sonatype's repo :) >> >> cheers, >> Edwin >> >> On Sat, Jan 31, 2009 at 1:05 AM, stanlick wrote: >>> >>> Greetings -- >>> >>> I am SO DONE with mucking around in dependencies that I am about to scream! >>> Until recently, I thought "real developers" were in control of jars and the >>> classpath, but as another year passes me by, I'm starting to rethink this >>> whole deal. I installed the Maven 2 plug-in for Eclipse this morning and >>> should begin by telling you that beyond appreciating the idea of Maven, I >>> don't understand it intimately well! Create new Maven Project is prompting >>> me for bits and pieces I don't fully understand. Moreover, I'm only >>> guessing that http://mvnrepository.com is the place I should specify to have >>> my dependencies resolved in building a Struts-2/Tiles-2/Spring-2 web >>> project. I have been reading about the archetypes and this must be a fancy >>> name for "what kind of sandwich do you want." Can someone please tell me >>> how to decode these prompts so I can get about the business of writing code? >>> I realize some of the inputs are my web-app name, but several others must be >>> version and contents values. >>> >>> P.S. Cloning my last know Struts 2 sandwich and making the necessary build >>> path tweaks for a bump to 2.1.6 no longer passes the tummy test. >>> >>> Peace, >>> Scott >>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Maven-and-Struts-2-Stack-tp21751296p21751296.html >>> Sent from the Struts - User mailing list archive at Nabble.com. >>> >>> >>> - >>> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >>> For additional commands, e-mail: user-h...@struts.apache.org >>> >>> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Maven and Struts 2 Stack
Wes has a bunch of examples that you can use as templates. I am trying to find the link, but failing so far. Wes, are you out there? musachy On Fri, Jan 30, 2009 at 12:14 PM, Edwin Quita wrote: > hi Scott, > > here's the first project i created using struts2 and Maven... just > adjust the versions to your liking. > > here's a version that exists in maven's central repository > > >org.apache.struts >struts2-core >2.0.6 > > >org.apache.struts >struts2-spring-plugin >2.0.6 > > > > while the latest you can pull out from sonatype's repo :) > > cheers, > Edwin > > On Sat, Jan 31, 2009 at 1:05 AM, stanlick wrote: >> >> Greetings -- >> >> I am SO DONE with mucking around in dependencies that I am about to scream! >> Until recently, I thought "real developers" were in control of jars and the >> classpath, but as another year passes me by, I'm starting to rethink this >> whole deal. I installed the Maven 2 plug-in for Eclipse this morning and >> should begin by telling you that beyond appreciating the idea of Maven, I >> don't understand it intimately well! Create new Maven Project is prompting >> me for bits and pieces I don't fully understand. Moreover, I'm only >> guessing that http://mvnrepository.com is the place I should specify to have >> my dependencies resolved in building a Struts-2/Tiles-2/Spring-2 web >> project. I have been reading about the archetypes and this must be a fancy >> name for "what kind of sandwich do you want." Can someone please tell me >> how to decode these prompts so I can get about the business of writing code? >> I realize some of the inputs are my web-app name, but several others must be >> version and contents values. >> >> P.S. Cloning my last know Struts 2 sandwich and making the necessary build >> path tweaks for a bump to 2.1.6 no longer passes the tummy test. >> >> Peace, >> Scott >> >> >> -- >> View this message in context: >> http://www.nabble.com/Maven-and-Struts-2-Stack-tp21751296p21751296.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts-tag ?
Sapmle application that is available for download for struts 2 in action, is really painful to install. There is no proper instruction in the book on how to install it and there are many issues when we try to do it ourself. Sometimes I feel so frustrated about buying this book... SanJ.SANJAY wrote: > > Ok, > > I downloaded a sample application for Sruts 2 from manning .com for > StrutsInAction. I still get the same error on the web server. When open > "http://localhost:8080/SampleApplication/Menu.action"; > for a moment the page says ...One moment please.. and then dumps the > error. > > > HTTP Status 500 - > > > > type Exception report > > message > > description The server encountered an internal error () that prevented it > from fulfilling this request. > > exception > > javax.servlet.ServletException: File "/struts-tags" not found > > org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) > > org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422) > org.apache.struts2.plexus.PlexusFilter.doFilter(PlexusFilter.java:96) > > org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) > > > root cause > > org.apache.jasper.JasperException: File "/struts-tags" not found > > org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50) > > org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) > > > > > > > > Wes Wannemacher wrote: >> >> On Wednesday 28 January 2009 10:59:35 SanJ.SANJAY wrote: >>> I can extract the struts-core jar with an error. >> >> Was that a mistake? >> >>> Also I placed them under >>> WEB-INF/lib folder. The only thing I have'nt done yet is struts.xml >>> file. >>> Could this be the issue? I thought since I wil not be using any action >>> for >>> this case, I did not need it? What do you say? >>> >> >> I don't think that it is a problem, but it could be. Which brings me to >> my >> next point... How do you expect Struts 2 to work if you aren't going to >> create >> actions? The majority of tags will not work, if the page has not been >> processed by the Filter. >> >> Anyhow, can you try to deploy one of the sample apps in your app server? >> Try >> struts2-blank. If it works, we'll know it's not an app server problem. >> I'm >> guessing that your setup is hosed. My suggestion would be to take a look >> at >> the getting started guides and try to build a simple application, before >> dumping all the jars into WEB-INF/lib and trying out the tags. >> >> -Wes >> >> -- >> >> Wes Wannemacher >> Author - Struts 2 In Practice >> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more >> http://www.manning.com/wannemacher >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/Struts-tag---tp21707578p21751301.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Maven and Struts 2 Stack
Greetings -- I am SO DONE with mucking around in dependencies that I am about to scream! Until recently, I thought "real developers" were in control of jars and the classpath, but as another year passes me by, I'm starting to rethink this whole deal. I installed the Maven 2 plug-in for Eclipse this morning and should begin by telling you that beyond appreciating the idea of Maven, I don't understand it intimately well! Create new Maven Project is prompting me for bits and pieces I don't fully understand. Moreover, I'm only guessing that http://mvnrepository.com is the place I should specify to have my dependencies resolved in building a Struts-2/Tiles-2/Spring-2 web project. I have been reading about the archetypes and this must be a fancy name for "what kind of sandwich do you want." Can someone please tell me how to decode these prompts so I can get about the business of writing code? I realize some of the inputs are my web-app name, but several others must be version and contents values. P.S. Cloning my last know Struts 2 sandwich and making the necessary build path tweaks for a bump to 2.1.6 no longer passes the tummy test. Peace, Scott -- View this message in context: http://www.nabble.com/Maven-and-Struts-2-Stack-tp21751296p21751296.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts-tag ?
Ok, I downloaded a sample application for Sruts 2 from manning .com for StrutsInAction. I still get the same error on the web server. When open "http://localhost:8080/SampleApplication/Menu.action"; for a moment the page says ...One moment please.. and then dumps the error. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception javax.servlet.ServletException: File "/struts-tags" not found org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:515) org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:422) org.apache.struts2.plexus.PlexusFilter.doFilter(PlexusFilter.java:96) org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81) root cause org.apache.jasper.JasperException: File "/struts-tags" not found org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:50) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407) Wes Wannemacher wrote: > > On Wednesday 28 January 2009 10:59:35 SanJ.SANJAY wrote: >> I can extract the struts-core jar with an error. > > Was that a mistake? > >> Also I placed them under >> WEB-INF/lib folder. The only thing I have'nt done yet is struts.xml file. >> Could this be the issue? I thought since I wil not be using any action >> for >> this case, I did not need it? What do you say? >> > > I don't think that it is a problem, but it could be. Which brings me to my > next point... How do you expect Struts 2 to work if you aren't going to > create > actions? The majority of tags will not work, if the page has not been > processed by the Filter. > > Anyhow, can you try to deploy one of the sample apps in your app server? > Try > struts2-blank. If it works, we'll know it's not an app server problem. I'm > guessing that your setup is hosed. My suggestion would be to take a look > at > the getting started guides and try to build a simple application, before > dumping all the jars into WEB-INF/lib and trying out the tags. > > -Wes > > -- > > Wes Wannemacher > Author - Struts 2 In Practice > Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more > http://www.manning.com/wannemacher > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > > -- View this message in context: http://www.nabble.com/Struts-tag---tp21707578p21751019.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Casting an action to an interface
Have you tried using reflection to dump all the interfaces (and corresponding classloaders) the action implements? Obviously, this shouldn't be possible under normal circumstances... Or if you're using maven 2, try running the app with the maven jetty plugin (or if you're not, deploy to a different web container) and see if the same thing happens. Nils-H On Fri, Jan 30, 2009 at 4:48 PM, Andy Sykes wrote: > I'd love to zip up the whole project and stick it somewhere but it's pretty > dependent on the environment I'm running it in (LDAP server for auth, etc > etc). I could probably produce a neutered version of it that'll run > anywhere, but it'll take a while as it's quite big.. > > As for classloaders, here's my debug statements: >log.info("ParseInterceptor's class loader is:" + > ParseInterceptor.class.getClassLoader().toString()); >log.info("Action's class loader is: " + > action.getClass().getClassLoader().toString()); >log.info(action.getClass().getClassLoader() == > ParseInterceptor.class.getClassLoader()); > > And the output: > > INFO ParseInterceptor - ParseInterceptor's class loader is:WebappClassLoader > delegate: false > repositories: >/WEB-INF/classes/ > --> Parent Classloader: > org.apache.catalina.loader.standardclassloa...@fa7e74 > > 15:36:08,198 INFO ParseInterceptor - Action's class loader is: > WebappClassLoader > delegate: false > repositories: >/WEB-INF/classes/ > --> Parent Classloader: > org.apache.catalina.loader.standardclassloa...@fa7e74 > > 15:36:08,198 INFO ParseInterceptor - true > > Suggests to me they're getting loaded by the same classloader. Something > bloody funky is going on and I'm probably going to just roll the > interceptors functionality into an action instead, but intellectual > curiosity remains to be satisfied as to what the funk is causing this. > > Cheers for the help, > Andy. > > On 30 Jan 2009, at 15:03, Dave Newton wrote: > >> If you have a small project you could host somewhere that might help, or >> just zip up all the source. Clearly this can't happen (ignoring for the >> moment that it is), but the framework obviously relies on this working so >> I'd have to assume something funky is going on. >> >> Dave >> >> Andy Sykes wrote: >>> >>> I dug around in the ServletConfig interceptor and modified my code to >>> mimic how it handles this situation - retrieve the Action as an Object type, >>> test for instanceof , the cast to it. For some reason, that still >>> does not work. >>> As a test case, I'm mimicking the code exactly. My action extends >>> ActionSupport and implements SessionAware. >>> In the interceptor, I retrieve the action as an Object, test if it's an >>> instanceof SessionAware, then cast. Logging statements show that the cast >>> never happens. If I try to skip the test and cast directly, I get a CCE. >>> However, the ServletConfigInterceptor is able to do exactly the same thing >>> without getting a CCE. >>> Either there's some messed up going on in my dev environment, or I'm >>> being really dumb, or.. god knows. I've cleared out all the old libraries >>> and I'm just running with the bare essentials. >>> Test case: >>> public class ParseInterceptor extends AbstractInterceptor { >>> private static final Logger log = >>> Logger.getLogger(ParseInterceptor.class); >>> @Override >>> public String intercept(ActionInvocation invocation) throws Exception { >>> final Object action = invocation.getAction(); >>> if (action instanceof SessionAware) { >>> log.error("Action is an instance of SessionAware."); >>> } >>> return invocation.invoke(); >>> } >>> } >>> For reference, the relevant sections in the ServletConfigInterceptor: >>> public class ServletConfigInterceptor extends AbstractInterceptor >>> implements StrutsStatics { >>> public String intercept(ActionInvocation invocation) throws Exception { >>> final Object action = invocation.getAction(); >>> final ActionContext context = >>> invocation.getInvocationContext(); >>> ...snip... >>> if (action instanceof SessionAware) { >>> ((SessionAware) >>> action).setSession(context.getSession()); >>> } >>> } >>> } >>> On 30 Jan 2009, at 12:22, Andy Sykes wrote: No, I don't 'need' the cast to Action. However, if I cast what I get back from ActionInvocation.getAction() straight to SessionAware or similar, it still chucks a CCE. I'm using Netbeans, and I'm pretty sure there's no crazy stuff going on with the classloader - all my struts jars are in my context's lib directory. On 30 Jan 2009, at 11:57, Nils-Helge Garli Hegvik wrote: > Do you really need the first cast to Action? Anyway, could it be that > you're having conflicting struts and/or application jars several > places in your classloader hierarchy? That could explain certain > "should never happen" incident
Re: Casting an action to an interface
I'd love to zip up the whole project and stick it somewhere but it's pretty dependent on the environment I'm running it in (LDAP server for auth, etc etc). I could probably produce a neutered version of it that'll run anywhere, but it'll take a while as it's quite big.. As for classloaders, here's my debug statements: log.info("ParseInterceptor's class loader is:" + ParseInterceptor.class.getClassLoader().toString()); log.info("Action's class loader is: " + action.getClass().getClassLoader().toString()); log.info(action.getClass().getClassLoader() == ParseInterceptor.class.getClassLoader()); And the output: INFO ParseInterceptor - ParseInterceptor's class loader is:WebappClassLoader delegate: false repositories: /WEB-INF/classes/ --> Parent Classloader: org.apache.catalina.loader.standardclassloa...@fa7e74 15:36:08,198 INFO ParseInterceptor - Action's class loader is: WebappClassLoader delegate: false repositories: /WEB-INF/classes/ --> Parent Classloader: org.apache.catalina.loader.standardclassloa...@fa7e74 15:36:08,198 INFO ParseInterceptor - true Suggests to me they're getting loaded by the same classloader. Something bloody funky is going on and I'm probably going to just roll the interceptors functionality into an action instead, but intellectual curiosity remains to be satisfied as to what the funk is causing this. Cheers for the help, Andy. On 30 Jan 2009, at 15:03, Dave Newton wrote: If you have a small project you could host somewhere that might help, or just zip up all the source. Clearly this can't happen (ignoring for the moment that it is), but the framework obviously relies on this working so I'd have to assume something funky is going on. Dave Andy Sykes wrote: I dug around in the ServletConfig interceptor and modified my code to mimic how it handles this situation - retrieve the Action as an Object type, test for instanceof , the cast to it. For some reason, that still does not work. As a test case, I'm mimicking the code exactly. My action extends ActionSupport and implements SessionAware. In the interceptor, I retrieve the action as an Object, test if it's an instanceof SessionAware, then cast. Logging statements show that the cast never happens. If I try to skip the test and cast directly, I get a CCE. However, the ServletConfigInterceptor is able to do exactly the same thing without getting a CCE. Either there's some messed up going on in my dev environment, or I'm being really dumb, or.. god knows. I've cleared out all the old libraries and I'm just running with the bare essentials. Test case: public class ParseInterceptor extends AbstractInterceptor { private static final Logger log = Logger.getLogger(ParseInterceptor.class); @Override public String intercept(ActionInvocation invocation) throws Exception { final Object action = invocation.getAction(); if (action instanceof SessionAware) { log.error("Action is an instance of SessionAware."); } return invocation.invoke(); } } For reference, the relevant sections in the ServletConfigInterceptor: public class ServletConfigInterceptor extends AbstractInterceptor implements StrutsStatics { public String intercept(ActionInvocation invocation) throws Exception { final Object action = invocation.getAction(); final ActionContext context = invocation.getInvocationContext(); ...snip... if (action instanceof SessionAware) { ((SessionAware) action).setSession(context.getSession()); } } } On 30 Jan 2009, at 12:22, Andy Sykes wrote: No, I don't 'need' the cast to Action. However, if I cast what I get back from ActionInvocation.getAction() straight to SessionAware or similar, it still chucks a CCE. I'm using Netbeans, and I'm pretty sure there's no crazy stuff going on with the classloader - all my struts jars are in my context's lib directory. On 30 Jan 2009, at 11:57, Nils-Helge Garli Hegvik wrote: Do you really need the first cast to Action? Anyway, could it be that you're having conflicting struts and/or application jars several places in your classloader hierarchy? That could explain certain "should never happen" incidents... Nils-H On Fri, Jan 30, 2009 at 12:39 PM, Andy Sykes wrote: Hi Wes, No, I'm not using Spring at all. The Action never passes the test of being an instanceof Parseable. If I make the action only implement SessionAware, and test if my action is an instanceof SessionAware, the test is never passed! Colour me confused! Andy. On 30 Jan 2009, at 00:55, Wes Wannemacher wrote: On Thursday 29 January 2009 19:49:39 Andy Sykes wrote: Hi all, I've written an interceptor with a PreResultListener that gets the action with ActionInvocation.getAction(), then casts it to an interface ("Parseable", in this case). This lets me call a particular
Re: Casting an action to an interface
If you have a small project you could host somewhere that might help, or just zip up all the source. Clearly this can't happen (ignoring for the moment that it is), but the framework obviously relies on this working so I'd have to assume something funky is going on. Dave Andy Sykes wrote: I dug around in the ServletConfig interceptor and modified my code to mimic how it handles this situation - retrieve the Action as an Object type, test for instanceof , the cast to it. For some reason, that still does not work. As a test case, I'm mimicking the code exactly. My action extends ActionSupport and implements SessionAware. In the interceptor, I retrieve the action as an Object, test if it's an instanceof SessionAware, then cast. Logging statements show that the cast never happens. If I try to skip the test and cast directly, I get a CCE. However, the ServletConfigInterceptor is able to do exactly the same thing without getting a CCE. Either there's some messed up going on in my dev environment, or I'm being really dumb, or.. god knows. I've cleared out all the old libraries and I'm just running with the bare essentials. Test case: public class ParseInterceptor extends AbstractInterceptor { private static final Logger log = Logger.getLogger(ParseInterceptor.class); @Override public String intercept(ActionInvocation invocation) throws Exception { final Object action = invocation.getAction(); if (action instanceof SessionAware) { log.error("Action is an instance of SessionAware."); } return invocation.invoke(); } } For reference, the relevant sections in the ServletConfigInterceptor: public class ServletConfigInterceptor extends AbstractInterceptor implements StrutsStatics { public String intercept(ActionInvocation invocation) throws Exception { final Object action = invocation.getAction(); final ActionContext context = invocation.getInvocationContext(); ...snip... if (action instanceof SessionAware) { ((SessionAware) action).setSession(context.getSession()); } } } On 30 Jan 2009, at 12:22, Andy Sykes wrote: No, I don't 'need' the cast to Action. However, if I cast what I get back from ActionInvocation.getAction() straight to SessionAware or similar, it still chucks a CCE. I'm using Netbeans, and I'm pretty sure there's no crazy stuff going on with the classloader - all my struts jars are in my context's lib directory. On 30 Jan 2009, at 11:57, Nils-Helge Garli Hegvik wrote: Do you really need the first cast to Action? Anyway, could it be that you're having conflicting struts and/or application jars several places in your classloader hierarchy? That could explain certain "should never happen" incidents... Nils-H On Fri, Jan 30, 2009 at 12:39 PM, Andy Sykes wrote: Hi Wes, No, I'm not using Spring at all. The Action never passes the test of being an instanceof Parseable. If I make the action only implement SessionAware, and test if my action is an instanceof SessionAware, the test is never passed! Colour me confused! Andy. On 30 Jan 2009, at 00:55, Wes Wannemacher wrote: On Thursday 29 January 2009 19:49:39 Andy Sykes wrote: Hi all, I've written an interceptor with a PreResultListener that gets the action with ActionInvocation.getAction(), then casts it to an interface ("Parseable", in this case). This lets me call a particular method on the action just prior to the result being rendered. The action implements Parseable and SessionAware. When I do the cast, I get an ClassCastException for com.opensymphony.xwork2.ActionSupport. If I take it down to one interface (SessionAware) and cast the action to it, I still get a CCE. What's weirder is I'm pretty sure this code worked on Struts 2.0.11. Here's a suitably simplified version of what I'm attempting to do: public String intercept(ActionInvocation invocation) throws Exception { invocation.addPreResultListener(new PreResultListener() { public void beforeResult(ActionInvocation invocation, String resultCode) { Action action = (Action)invocation.getAction(); if (action instanceof Parseable) { ((Parseable)action).parse(); } } }); Any ideas what the hell is going on here? Is it possible that you are using Spring to instantiate your actions via the Spring plugin? It would seem that if the action passes the test, then the cast is legal. I ask about Spring in case the action is a proxied bean... It comes up from time to time that Spring created beans don't always seem to inherit every method that you would think... If Spring is in the mix, try having Spring use CGLIB... I've had some luck that way, vs. dynamic JDK proxies. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more htt
Re: How to two form tags inline(submit buttons of each form to appear next to each other)
Use theme="simple" on the tags to they don't generate the table markup, and put them in table markup of your own. Dave Seshagiri V wrote: Hellow All, I have a page with two forms on it. I want the respective submit buttons of each form to appear next to each other, inline, so I set style="display: inline;" on each form but it is not working. Please help me. Thank you, Seshagiri V seshagi...@kensium.com. US Main: 877 KENSIUM (536.7486) US Fax: 312.242.3029 Kensium 200 S Wacker Dr, Suite 3100 Chicago, IL 60606 Confidentiality Note: - The information contained in this e-mail is strictly confidential and for the intended use of the addressee only. Any disclosure, use or copying of the information by anyone other than the intended recipient is prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and securely discard this message. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2.1.6, Sitemesh & FreeMarkerPageFilter
I think Musachy means with the ng filter instead of the old FilterDispatcher. Dave Markus Doring wrote: Not sure what the new ones are, but my Maven dependency uses version 2.1.6 of the struts2 sitemesh plugin: org.apache.struts struts2-sitemesh-plugin ${struts.version} ... 2.1.6 Is there any other filter I can try? Markus Musachy Barroso wrote: Did you try with the new filters? musachy On Thu, Jan 29, 2009 at 7:44 PM, Markus Doring wrote: Hi, I am trying Struts 2.1.6 with Freemarker Sitemesh decorators. I am getting a NPE in the PageFilter HeadTag class. When debugging it seems the getPage() call in the class returns Null. This only happens for the decorator:head and not for the body or title (If I remove the <@decorator.head/> from my decorator it works fine). The error is: java.lang.NullPointerException at com.opensymphony.module.sitemesh.taglib.decorator.HeadTag.doEndTag(HeadTag.java:33) at freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:431) at freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:370) at freemarker.core.Environment.visit(Environment.java:295) at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.MixedContent.accept(MixedContent.java:92) at freemarker.core.Environment.visit(Environment.java:209) at freemarker.core.Environment.process(Environment.java:189) at freemarker.template.Template.process(Template.java:237) at org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerPageFilter.java:160) at org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:116) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) I have tried to use the standard SiteMeshFilter instead of the FreeMarkerPageFilter and then I dont encounter any problem. But of course I can't access the struts value stack anymore, so I need to get the FreemarkerPageFilter working. Has anyone been successful in this combination? The relevant part of my web.xml looks like this: struts2test struts-cleanup org.apache.struts2.dispatcher.ActionContextCleanUp sitemesh com.opensymphony.sitemesh.webapp.SiteMeshFilter struts org.apache.struts2.dispatcher.FilterDispatcher actionPackages com.specieslog.action struts-cleanup /* REQUEST FORWARD sitemesh /* REQUEST FORWARD INCLUDE struts /* REQUEST FORWARD jspSupportServlet org.apache.struts2.views.JspSupportServlet 5 sitemesh-freemarker com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet TemplatePath / default_encoding UTF-8 1 sitemesh-freemarker *.dec My struts.xml is this minimal one, making Freemarker the default result type: /WEB-INF/pages/hello.ftl I have also tried 2 different sitemesh page parsers, HTMLPageParser and FastPageParser, but that didnt help either. Ah, and this is the decorator I am using: http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> <#assign decorator=JspTaglibs["http://www.opensymphony.com/sitemesh/decorator";] /> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> <@decorator.title default="Struts2 Freemarker Sitemesh Hibernate"/> <@decorator.head/> <@decorator.body/> Any idea highly appreciated! Markus -- View this message in context: http://www.nabble.com/Struts-2.1.6%2C-Sitemesh---FreeMarkerPageFilter-tp21739507p21739507.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: DefaultActionInvocation exception
As I said on JavaRanch you'll need to post at least the configs. Dave J D wrote: I need some help figuring out where I need to search for the problem below. I have a jsp input.jsp which calls display.jsp on click of submit. display.jsp can also be called directly using search. A URL in display.jsp does not work when it is being redirected from input.jsp but works when directly being called. display.jsp has the following javascript which is called when the link is clicked. function getFile(fileName, path){ document.forms[0].action="getFile.action?fileName="+fileName; alert('action::'+document.displayFile.action); document.forms[0].submit(); } Any idea on where I need to be looking. Let me know if I need to post any additional information Here is the whole exception stack trace [1/30/09 15:31:54:953 IST] 002b SystemOut O [ERROR] 31:54 (Dispatcher.java:serviceAction:512) Could not find action or result No result defined for action com.action.FileAction and result invalid_user - action - at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:688) at com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:101) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:758) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:718) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture
Re: Casting an action to an interface
I am putting my money on different class loaders. That is easy to test, get the class loader from your action, and the class loader from the current class (interceptor or whatever) and see if their object id is the same. musachy On Fri, Jan 30, 2009 at 8:13 AM, Andy Sykes wrote: > I dug around in the ServletConfig interceptor and modified my code to mimic > how it handles this situation - retrieve the Action as an Object type, test > for instanceof , the cast to it. For some reason, that still does > not work. > > As a test case, I'm mimicking the code exactly. My action extends > ActionSupport and implements SessionAware. > In the interceptor, I retrieve the action as an Object, test if it's an > instanceof SessionAware, then cast. Logging statements show that the cast > never happens. If I try to skip the test and cast directly, I get a CCE. > However, the ServletConfigInterceptor is able to do exactly the same thing > without getting a CCE. > > Either there's some messed up going on in my dev environment, or I'm being > really dumb, or.. god knows. I've cleared out all the old libraries and I'm > just running with the bare essentials. > > Test case: > public class ParseInterceptor extends AbstractInterceptor { > >private static final Logger log = > Logger.getLogger(ParseInterceptor.class); > >@Override >public String intercept(ActionInvocation invocation) throws Exception { >final Object action = invocation.getAction(); >if (action instanceof SessionAware) { >log.error("Action is an instance of SessionAware."); >} >return invocation.invoke(); >} > } > > > For reference, the relevant sections in the ServletConfigInterceptor: > > public class ServletConfigInterceptor extends AbstractInterceptor implements > StrutsStatics { > >public String intercept(ActionInvocation invocation) throws Exception > { >final Object action = invocation.getAction(); >final ActionContext context = > invocation.getInvocationContext(); >...snip... >if (action instanceof SessionAware) { >((SessionAware) > action).setSession(context.getSession()); >} >} > } > On 30 Jan 2009, at 12:22, Andy Sykes wrote: > >> No, I don't 'need' the cast to Action. However, if I cast what I get back >> from ActionInvocation.getAction() straight to SessionAware or similar, it >> still chucks a CCE. >> >> I'm using Netbeans, and I'm pretty sure there's no crazy stuff going on >> with the classloader - all my struts jars are in my context's lib directory. >> >> On 30 Jan 2009, at 11:57, Nils-Helge Garli Hegvik wrote: >> >>> Do you really need the first cast to Action? Anyway, could it be that >>> you're having conflicting struts and/or application jars several >>> places in your classloader hierarchy? That could explain certain >>> "should never happen" incidents... >>> >>> Nils-H >>> >>> On Fri, Jan 30, 2009 at 12:39 PM, Andy Sykes wrote: Hi Wes, No, I'm not using Spring at all. The Action never passes the test of being an instanceof Parseable. If I make the action only implement SessionAware, and test if my action is an instanceof SessionAware, the test is never passed! Colour me confused! Andy. On 30 Jan 2009, at 00:55, Wes Wannemacher wrote: > On Thursday 29 January 2009 19:49:39 Andy Sykes wrote: >> >> Hi all, >> >> I've written an interceptor with a PreResultListener that gets the >> action with ActionInvocation.getAction(), then casts it to an >> interface ("Parseable", in this case). This lets me call a particular >> method on the action just prior to the result being rendered. >> >> The action implements Parseable and SessionAware. >> >> When I do the cast, I get an ClassCastException for >> com.opensymphony.xwork2.ActionSupport. If I take it down to one >> interface (SessionAware) and cast the action to it, I still get a CCE. >> What's weirder is I'm pretty sure this code worked on Struts 2.0.11. >> >> Here's a suitably simplified version of what I'm attempting to do: >> >> public String intercept(ActionInvocation invocation) throws Exception >> { >> invocation.addPreResultListener(new PreResultListener() { >> public void beforeResult(ActionInvocation invocation, >> String resultCode) { >> Action action = (Action)invocation.getAction(); >> if (action instanceof Parseable) { >> ((Parseable)action).parse(); >> } >> } >> }); >> >> Any ideas what the hell is going on here? >> >> > > Is it possible that you are using Spring to instantiate your actions > via > the > Spring plugin? It would seem that if the action passes the test,
Re: checkboxes
Hi. First of all: Thx u ! I thought about your advice this week but wanted to know whether there are solutions without javascript, guess I found the simplest method, although I don't know whether it's common practise with struts. have u ever tried to do it like this : ? I'm not at work, not able to test it. I just read about that struts always just reads the first line ? When checkbox is unchecked html:hidden is send to the server, otherwise checkbox with value true !! So I just need to add a single line to my jsp and will test it on monday ! thx you Cheers, REinhard Original-Nachricht > Datum: Fri, 30 Jan 2009 13:20:36 +0100 > Von: "Sébastien Domergue" > An: Struts Users Mailing List > Betreff: Re: checkboxes > Hi, > > We had the same problem with a checkboxlist. Actually, a html checkbox > does not send a data if it's unchecked. In a simple form, no data means > false so we don't see anything. In a list, that means there are only the > number of true which correspond to the number of checkbox checked. > In order to have a value every time, we create an hidden field with the > checkbox. In the checkbox onchange field there is a small javascript > code that updates the hidden field value (with this method, youh have to > use the status field form iterator). To use data, the checkbox are in > charge of reading from previous action and the hidden fields are in > charge of writting for the next one. > > Regards > > Sébastien > > > Reinhard Wagner a écrit : > > Hi. > > > > I do have 2 lists in my formbean, one for the checkoxtypes[A,B,C,D] and > one for knowing which checkbox is on / off [checkboxstate] > > > > In my jsp I do iterate over the checkboxtypes List and for every > checkboxtype I generate a struts:checkbox with property set to > checkboxstate[index] and value = 1 ; All works fine except that I'm facing > prolem when > checkbox isn't checked in my formbean. Then there are of course only 2 > elements > in my checkboxstate list which means that indexes aren't in the right order > anymore [when for example 2nd box was unchecked... ] .. > > > > So in short, is there an easy workaround for this problem. I do have to > show the user checked and unchecked buttons ? > > > > I'm completely new to struts, that's why I'm asking. > > > > THanks in advantage > > > > Rudi > > > > > -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2.1.6, Sitemesh & FreeMarkerPageFilter
The new ones are: struts-prepare org.apache.struts2.dispatcher.ng.filter.StrutsPrepareFilter struts-execute org.apache.struts2.dispatcher.ng.filter.StrutsExecuteFilter look at the showcase web.xml for examples. I am not saying it will fix your problem, but you should start using those in 2.1.6+ musachy On Fri, Jan 30, 2009 at 5:49 AM, Markus Doring wrote: > > Not sure what the new ones are, but my Maven dependency uses version 2.1.6 of > the struts2 sitemesh plugin: > > >org.apache.struts >struts2-sitemesh-plugin >${struts.version} > > ... >2.1.6 > > > Is there any other filter I can try? > Markus > > > Musachy Barroso wrote: >> >> Did you try with the new filters? >> >> musachy >> >> On Thu, Jan 29, 2009 at 7:44 PM, Markus Doring wrote: >>> >>> Hi, >>> I am trying Struts 2.1.6 with Freemarker Sitemesh decorators. I am >>> getting a >>> NPE in the PageFilter HeadTag class. When debugging it seems the >>> getPage() >>> call in the class returns Null. This only happens for the decorator:head >>> and >>> not for the body or title (If I remove the <@decorator.head/> from my >>> decorator it works fine). The error is: >>> >>> >>> java.lang.NullPointerException >>>at >>> com.opensymphony.module.sitemesh.taglib.decorator.HeadTag.doEndTag(HeadTag.java:33) >>>at >>> freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:431) >>>at >>> freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:370) >>>at freemarker.core.Environment.visit(Environment.java:295) >>>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) >>>at freemarker.core.Environment.visit(Environment.java:209) >>>at freemarker.core.MixedContent.accept(MixedContent.java:92) >>>at freemarker.core.Environment.visit(Environment.java:209) >>>at freemarker.core.Environment.process(Environment.java:189) >>>at freemarker.template.Template.process(Template.java:237) >>>at >>> org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerPageFilter.java:160) >>>at >>> org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:116) >>>at >>> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) >>> >>> >>> >>> I have tried to use the standard SiteMeshFilter instead of the >>> FreeMarkerPageFilter and then I dont encounter any problem. But of course >>> I >>> can't access the struts value stack anymore, so I need to get the >>> FreemarkerPageFilter working. Has anyone been successful in this >>> combination? >>> >>> The relevant part of my web.xml looks like this: >>> >>>struts2test >>> >>>struts-cleanup >>> >>> org.apache.struts2.dispatcher.ActionContextCleanUp >>> >>> >>>sitemesh >>> >>> com.opensymphony.sitemesh.webapp.SiteMeshFilter >>> >>> >>> >>>struts >>> >>> org.apache.struts2.dispatcher.FilterDispatcher >>> >>>actionPackages >>>com.specieslog.action >>> >>> >>> >>> >>>struts-cleanup >>>/* >>>REQUEST >>>FORWARD >>> >>> >>>sitemesh >>>/* >>>REQUEST >>>FORWARD >>>INCLUDE >>> >>> >>>struts >>>/* >>>REQUEST >>>FORWARD >>> >>> >>> >>> >>> >>>jspSupportServlet >>> >>> org.apache.struts2.views.JspSupportServlet >>>5 >>> >>> >>> >>>sitemesh-freemarker >>> >>> com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet >>> >>>TemplatePath >>>/ >>> >>> >>>default_encoding >>>UTF-8 >>> >>>1 >>> >>> >>>sitemesh-freemarker >>>*.dec >>> >>> >>> >>> >>> My struts.xml is this minimal one, making Freemarker the default result >>> type: >>> >>> >>> >>>>> class="org.apache.struts2.views.freemarker.FreemarkerResult" >>> default="true"/> >>> >>> >>>/WEB-INF/pages/hello.ftl >>> >>> >>> >>> >>> >>> I have also tried 2 different sitemesh page parsers, HTMLPageParser and >>> FastPageParser, but that didnt help either. >>> >>> Ah, and this is the decorator I am using: >>> >>> >>> >> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> >>> <#assign >>> decorator=JspTaglibs["http://www.opensymphony.com/sitemesh/decorator";] /> >>> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> >>> >>><@decorator.title default="Struts2 Freemarker Sitemesh >>> Hibernate"/> >>><@decorator.head/> >>> >>> >>> >>><@decorator.body/> >>> >>> >>> >>> >>> >>> Any idea highly appreciated! >>> >>> Markus >>> >>> >>> -- >>> View this message in context: >>> http
Re: [S2] Customizing Struts JSON Plugin response
search for JSONP in the plugin documentation. musachy On Fri, Jan 30, 2009 at 5:25 AM, alee amin wrote: > I am using JSON plugin in Struts 2 for writing a resoponse. the plugin is > generating the response perfectly. however, this is Google Visulization API > demand that there should be a string wrapping the JSON response. like the > one mentioned below. > >> google.visualization.Query.setResponse(JSON RESPONSE HERE); >> > How can i get this? wrap the JSON response with PARANTHESIS brackets > from struts. > > ..alee > http://techboard.wordpress.com > -- "Hey you! Would you help me to carry the stone?" Pink Floyd - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Casting an action to an interface
I dug around in the ServletConfig interceptor and modified my code to mimic how it handles this situation - retrieve the Action as an Object type, test for instanceof , the cast to it. For some reason, that still does not work. As a test case, I'm mimicking the code exactly. My action extends ActionSupport and implements SessionAware. In the interceptor, I retrieve the action as an Object, test if it's an instanceof SessionAware, then cast. Logging statements show that the cast never happens. If I try to skip the test and cast directly, I get a CCE. However, the ServletConfigInterceptor is able to do exactly the same thing without getting a CCE. Either there's some messed up going on in my dev environment, or I'm being really dumb, or.. god knows. I've cleared out all the old libraries and I'm just running with the bare essentials. Test case: public class ParseInterceptor extends AbstractInterceptor { private static final Logger log = Logger.getLogger(ParseInterceptor.class); @Override public String intercept(ActionInvocation invocation) throws Exception { final Object action = invocation.getAction(); if (action instanceof SessionAware) { log.error("Action is an instance of SessionAware."); } return invocation.invoke(); } } For reference, the relevant sections in the ServletConfigInterceptor: public class ServletConfigInterceptor extends AbstractInterceptor implements StrutsStatics { public String intercept(ActionInvocation invocation) throws Exception { final Object action = invocation.getAction(); final ActionContext context = invocation.getInvocationContext(); ...snip... if (action instanceof SessionAware) { ((SessionAware) action).setSession(context.getSession()); } } } On 30 Jan 2009, at 12:22, Andy Sykes wrote: No, I don't 'need' the cast to Action. However, if I cast what I get back from ActionInvocation.getAction() straight to SessionAware or similar, it still chucks a CCE. I'm using Netbeans, and I'm pretty sure there's no crazy stuff going on with the classloader - all my struts jars are in my context's lib directory. On 30 Jan 2009, at 11:57, Nils-Helge Garli Hegvik wrote: Do you really need the first cast to Action? Anyway, could it be that you're having conflicting struts and/or application jars several places in your classloader hierarchy? That could explain certain "should never happen" incidents... Nils-H On Fri, Jan 30, 2009 at 12:39 PM, Andy Sykes wrote: Hi Wes, No, I'm not using Spring at all. The Action never passes the test of being an instanceof Parseable. If I make the action only implement SessionAware, and test if my action is an instanceof SessionAware, the test is never passed! Colour me confused! Andy. On 30 Jan 2009, at 00:55, Wes Wannemacher wrote: On Thursday 29 January 2009 19:49:39 Andy Sykes wrote: Hi all, I've written an interceptor with a PreResultListener that gets the action with ActionInvocation.getAction(), then casts it to an interface ("Parseable", in this case). This lets me call a particular method on the action just prior to the result being rendered. The action implements Parseable and SessionAware. When I do the cast, I get an ClassCastException for com.opensymphony.xwork2.ActionSupport. If I take it down to one interface (SessionAware) and cast the action to it, I still get a CCE. What's weirder is I'm pretty sure this code worked on Struts 2.0.11. Here's a suitably simplified version of what I'm attempting to do: public String intercept(ActionInvocation invocation) throws Exception { invocation.addPreResultListener(new PreResultListener() { public void beforeResult(ActionInvocation invocation, String resultCode) { Action action = (Action)invocation.getAction(); if (action instanceof Parseable) { ((Parseable)action).parse(); } } }); Any ideas what the hell is going on here? Is it possible that you are using Spring to instantiate your actions via the Spring plugin? It would seem that if the action passes the test, then the cast is legal. I ask about Spring in case the action is a proxied bean... It comes up from time to time that Spring created beans don't always seem to inherit every method that you would think... If Spring is in the mix, try having Spring use CGLIB... I've had some luck that way, vs. dynamic JDK proxies. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts
Multiboxes - How to show the selected ones ?
Hi all, I have a team form and a member form, team contains members. In my members jsp, I want to show checkboxes with the possible members and I want to show the already members as checked checkbox. I am doing something wrong , because its not working… Can someone help me ? I have in my form two ArrayList with getters and setters private List possiveisMembros = new ArrayList(); //possible member private List membrosSelecionados = new ArrayList(); // selected member in my action i populate them with value from my database. //each member have a id(codigoFuncionario) and a name (nomeMembro). //mef is my membersForm ArrayList possiveisMembros = getListaPossiveisMembrosEquipe siveisMembrosEquipe(); //method that get the values from DB for possible members ArrayList membrosSelecionados = getListaMembrosEquipeSelecionados(mef); //method that get the values from DB for my selected members mef.setPossiveisMembros(possiveisMembros); // setting value in my form – possible members mef.setMembrosSelecionados(membrosSelecionados); // setting value in my form – selected members in my JSP : when i execute thr members jsp , the page show all my possible members, but it doest bring the already members checked . WHY? What am doing wrong? TKS, in advance !!! -- View this message in context: http://www.nabble.com/Multiboxes---How-to-show-the--selected-ones---tp21746474p21746474.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Casting an action to an interface
No, I don't 'need' the cast to Action. However, if I cast what I get back from ActionInvocation.getAction() straight to SessionAware or similar, it still chucks a CCE. I'm using Netbeans, and I'm pretty sure there's no crazy stuff going on with the classloader - all my struts jars are in my context's lib directory. On 30 Jan 2009, at 11:57, Nils-Helge Garli Hegvik wrote: Do you really need the first cast to Action? Anyway, could it be that you're having conflicting struts and/or application jars several places in your classloader hierarchy? That could explain certain "should never happen" incidents... Nils-H On Fri, Jan 30, 2009 at 12:39 PM, Andy Sykes wrote: Hi Wes, No, I'm not using Spring at all. The Action never passes the test of being an instanceof Parseable. If I make the action only implement SessionAware, and test if my action is an instanceof SessionAware, the test is never passed! Colour me confused! Andy. On 30 Jan 2009, at 00:55, Wes Wannemacher wrote: On Thursday 29 January 2009 19:49:39 Andy Sykes wrote: Hi all, I've written an interceptor with a PreResultListener that gets the action with ActionInvocation.getAction(), then casts it to an interface ("Parseable", in this case). This lets me call a particular method on the action just prior to the result being rendered. The action implements Parseable and SessionAware. When I do the cast, I get an ClassCastException for com.opensymphony.xwork2.ActionSupport. If I take it down to one interface (SessionAware) and cast the action to it, I still get a CCE. What's weirder is I'm pretty sure this code worked on Struts 2.0.11. Here's a suitably simplified version of what I'm attempting to do: public String intercept(ActionInvocation invocation) throws Exception { invocation.addPreResultListener(new PreResultListener() { public void beforeResult(ActionInvocation invocation, String resultCode) { Action action = (Action)invocation.getAction(); if (action instanceof Parseable) { ((Parseable)action).parse(); } } }); Any ideas what the hell is going on here? Is it possible that you are using Spring to instantiate your actions via the Spring plugin? It would seem that if the action passes the test, then the cast is legal. I ask about Spring in case the action is a proxied bean... It comes up from time to time that Spring created beans don't always seem to inherit every method that you would think... If Spring is in the mix, try having Spring use CGLIB... I've had some luck that way, vs. dynamic JDK proxies. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: checkboxes
Hi, We had the same problem with a checkboxlist. Actually, a html checkbox does not send a data if it's unchecked. In a simple form, no data means false so we don't see anything. In a list, that means there are only the number of true which correspond to the number of checkbox checked. In order to have a value every time, we create an hidden field with the checkbox. In the checkbox onchange field there is a small javascript code that updates the hidden field value (with this method, youh have to use the status field form iterator). To use data, the checkbox are in charge of reading from previous action and the hidden fields are in charge of writting for the next one. Regards Sébastien Reinhard Wagner a écrit : Hi. I do have 2 lists in my formbean, one for the checkoxtypes[A,B,C,D] and one for knowing which checkbox is on / off [checkboxstate] In my jsp I do iterate over the checkboxtypes List and for every checkboxtype I generate a struts:checkbox with property set to checkboxstate[index] and value = 1 ; All works fine except that I'm facing prolem when checkbox isn't checked in my formbean. Then there are of course only 2 elements in my checkboxstate list which means that indexes aren't in the right order anymore [when for example 2nd box was unchecked... ] .. So in short, is there an easy workaround for this problem. I do have to show the user checked and unchecked buttons ? I'm completely new to struts, that's why I'm asking. THanks in advantage Rudi - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to two form tags inline(submit buttons of each form to appear next to each other)
I'm pretty sure that providing some relevant code snippets would improve your odds of getting help... Nils-H On Fri, Jan 30, 2009 at 1:00 PM, Seshagiri V wrote: > Hellow All, > > > > I have a page with two forms on it. I want the respective submit buttons of > each form to appear next to each other, inline, so I set > style="display: inline;" on each form but it is not working. > > > > Please help me. > > > > > > > > > > > > Thank you, > > Seshagiri V > > seshagi...@kensium.com. > > > > US Main: 877 KENSIUM (536.7486) > > US Fax: 312.242.3029 > > > > Kensium > > 200 S Wacker Dr, Suite 3100 > > Chicago, IL 60606 > > > > Confidentiality Note: > > - > > The information contained in this e-mail is strictly confidential and for > the intended use of the addressee only. Any disclosure, use or copying of > the information by anyone other than the intended recipient is prohibited. > > If you have received this message in error, please notify the sender > immediately by return e-mail and securely discard this message. > > > > > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Casting an action to an interface
Do you really need the first cast to Action? Anyway, could it be that you're having conflicting struts and/or application jars several places in your classloader hierarchy? That could explain certain "should never happen" incidents... Nils-H On Fri, Jan 30, 2009 at 12:39 PM, Andy Sykes wrote: > Hi Wes, > > No, I'm not using Spring at all. > > The Action never passes the test of being an instanceof Parseable. If I make > the action only implement SessionAware, and test if my action is an > instanceof SessionAware, the test is never passed! > > Colour me confused! > > Andy. > > > On 30 Jan 2009, at 00:55, Wes Wannemacher wrote: > >> On Thursday 29 January 2009 19:49:39 Andy Sykes wrote: >>> >>> Hi all, >>> >>> I've written an interceptor with a PreResultListener that gets the >>> action with ActionInvocation.getAction(), then casts it to an >>> interface ("Parseable", in this case). This lets me call a particular >>> method on the action just prior to the result being rendered. >>> >>> The action implements Parseable and SessionAware. >>> >>> When I do the cast, I get an ClassCastException for >>> com.opensymphony.xwork2.ActionSupport. If I take it down to one >>> interface (SessionAware) and cast the action to it, I still get a CCE. >>> What's weirder is I'm pretty sure this code worked on Struts 2.0.11. >>> >>> Here's a suitably simplified version of what I'm attempting to do: >>> >>> public String intercept(ActionInvocation invocation) throws Exception { >>>invocation.addPreResultListener(new PreResultListener() { >>> public void beforeResult(ActionInvocation invocation, >>> String resultCode) { >>>Action action = (Action)invocation.getAction(); >>>if (action instanceof Parseable) { >>>((Parseable)action).parse(); >>>} >>> } >>>}); >>> >>> Any ideas what the hell is going on here? >>> >>> >> >> Is it possible that you are using Spring to instantiate your actions via >> the >> Spring plugin? It would seem that if the action passes the test, then the >> cast >> is legal. I ask about Spring in case the action is a proxied bean... It >> comes >> up from time to time that Spring created beans don't always seem to >> inherit >> every method that you would think... If Spring is in the mix, try having >> Spring use CGLIB... I've had some luck that way, vs. dynamic JDK proxies. >> >> -Wes >> >> -- >> >> Wes Wannemacher >> Author - Struts 2 In Practice >> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more >> http://www.manning.com/wannemacher >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
How to two form tags inline(submit buttons of each form to appear next to each other)
Hellow All, I have a page with two forms on it. I want the respective submit buttons of each form to appear next to each other, inline, so I set style="display: inline;" on each form but it is not working. Please help me. Thank you, Seshagiri V seshagi...@kensium.com. US Main: 877 KENSIUM (536.7486) US Fax: 312.242.3029 Kensium 200 S Wacker Dr, Suite 3100 Chicago, IL 60606 Confidentiality Note: - The information contained in this e-mail is strictly confidential and for the intended use of the addressee only. Any disclosure, use or copying of the information by anyone other than the intended recipient is prohibited. If you have received this message in error, please notify the sender immediately by return e-mail and securely discard this message.
Re: Casting an action to an interface
Hi Wes, No, I'm not using Spring at all. The Action never passes the test of being an instanceof Parseable. If I make the action only implement SessionAware, and test if my action is an instanceof SessionAware, the test is never passed! Colour me confused! Andy. On 30 Jan 2009, at 00:55, Wes Wannemacher wrote: On Thursday 29 January 2009 19:49:39 Andy Sykes wrote: Hi all, I've written an interceptor with a PreResultListener that gets the action with ActionInvocation.getAction(), then casts it to an interface ("Parseable", in this case). This lets me call a particular method on the action just prior to the result being rendered. The action implements Parseable and SessionAware. When I do the cast, I get an ClassCastException for com.opensymphony.xwork2.ActionSupport. If I take it down to one interface (SessionAware) and cast the action to it, I still get a CCE. What's weirder is I'm pretty sure this code worked on Struts 2.0.11. Here's a suitably simplified version of what I'm attempting to do: public String intercept(ActionInvocation invocation) throws Exception { invocation.addPreResultListener(new PreResultListener() { public void beforeResult(ActionInvocation invocation, String resultCode) { Action action = (Action)invocation.getAction(); if (action instanceof Parseable) { ((Parseable)action).parse(); } } }); Any ideas what the hell is going on here? Is it possible that you are using Spring to instantiate your actions via the Spring plugin? It would seem that if the action passes the test, then the cast is legal. I ask about Spring in case the action is a proxied bean... It comes up from time to time that Spring created beans don't always seem to inherit every method that you would think... If Spring is in the mix, try having Spring use CGLIB... I've had some luck that way, vs. dynamic JDK proxies. -Wes -- Wes Wannemacher Author - Struts 2 In Practice Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more http://www.manning.com/wannemacher - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to stop action getting called on click of refresh button
On Fri, Jan 30, 2009 at 11:33 AM, Parvat Singh Ranawat wrote: > Hi, > Can I stop the calling of action on click of refresh button as on this > action it will generate a report at some specified location. > So on every refresh click will generate a new report at that location which > is unacceptable. > > So is there any way to stop calling the action/ have one flag on action > which determines this part of code in action need not be executed on click > on refresh button. For this action you might want to use the Execute and Wait interceptor[1] and/or the Redirect Action Result [2]. Cheers, -Ralf [1] http://struts.apache.org/2.1.6/docs/execute-and-wait-interceptor.html [2] http://struts.apache.org/2.1.6/docs/redirect-action-result.html > > Regards, > Shakti > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
checkboxes
Hi. I do have 2 lists in my formbean, one for the checkoxtypes[A,B,C,D] and one for knowing which checkbox is on / off [checkboxstate] In my jsp I do iterate over the checkboxtypes List and for every checkboxtype I generate a struts:checkbox with property set to checkboxstate[index] and value = 1 ; All works fine except that I'm facing prolem when checkbox isn't checked in my formbean. Then there are of course only 2 elements in my checkboxstate list which means that indexes aren't in the right order anymore [when for example 2nd box was unchecked... ] .. So in short, is there an easy workaround for this problem. I do have to show the user checked and unchecked buttons ? I'm completely new to struts, that's why I'm asking. THanks in advantage Rudi -- Pt! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2.1.6, Sitemesh & FreeMarkerPageFilter
Not sure what the new ones are, but my Maven dependency uses version 2.1.6 of the struts2 sitemesh plugin: org.apache.struts struts2-sitemesh-plugin ${struts.version} ... 2.1.6 Is there any other filter I can try? Markus Musachy Barroso wrote: > > Did you try with the new filters? > > musachy > > On Thu, Jan 29, 2009 at 7:44 PM, Markus Doring wrote: >> >> Hi, >> I am trying Struts 2.1.6 with Freemarker Sitemesh decorators. I am >> getting a >> NPE in the PageFilter HeadTag class. When debugging it seems the >> getPage() >> call in the class returns Null. This only happens for the decorator:head >> and >> not for the body or title (If I remove the <@decorator.head/> from my >> decorator it works fine). The error is: >> >> >> java.lang.NullPointerException >>at >> com.opensymphony.module.sitemesh.taglib.decorator.HeadTag.doEndTag(HeadTag.java:33) >>at >> freemarker.ext.jsp.TagTransformModel$TagWriter.endEvaluation(TagTransformModel.java:431) >>at >> freemarker.ext.jsp.TagTransformModel$TagWriter.onStart(TagTransformModel.java:370) >>at freemarker.core.Environment.visit(Environment.java:295) >>at freemarker.core.UnifiedCall.accept(UnifiedCall.java:130) >>at freemarker.core.Environment.visit(Environment.java:209) >>at freemarker.core.MixedContent.accept(MixedContent.java:92) >>at freemarker.core.Environment.visit(Environment.java:209) >>at freemarker.core.Environment.process(Environment.java:189) >>at freemarker.template.Template.process(Template.java:237) >>at >> org.apache.struts2.sitemesh.FreeMarkerPageFilter.applyDecorator(FreeMarkerPageFilter.java:160) >>at >> org.apache.struts2.sitemesh.TemplatePageFilter.applyDecorator(TemplatePageFilter.java:116) >>at >> com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:62) >> >> >> >> I have tried to use the standard SiteMeshFilter instead of the >> FreeMarkerPageFilter and then I dont encounter any problem. But of course >> I >> can't access the struts value stack anymore, so I need to get the >> FreemarkerPageFilter working. Has anyone been successful in this >> combination? >> >> The relevant part of my web.xml looks like this: >> >>struts2test >> >>struts-cleanup >> >> org.apache.struts2.dispatcher.ActionContextCleanUp >> >> >>sitemesh >> >> com.opensymphony.sitemesh.webapp.SiteMeshFilter >> >> >> >>struts >> >> org.apache.struts2.dispatcher.FilterDispatcher >> >>actionPackages >>com.specieslog.action >> >> >> >> >>struts-cleanup >>/* >>REQUEST >>FORWARD >> >> >>sitemesh >>/* >>REQUEST >>FORWARD >>INCLUDE >> >> >>struts >>/* >>REQUEST >>FORWARD >> >> >> >> >> >>jspSupportServlet >> >> org.apache.struts2.views.JspSupportServlet >>5 >> >> >> >>sitemesh-freemarker >> >> com.opensymphony.module.sitemesh.freemarker.FreemarkerDecoratorServlet >> >>TemplatePath >>/ >> >> >>default_encoding >>UTF-8 >> >>1 >> >> >>sitemesh-freemarker >>*.dec >> >> >> >> >> My struts.xml is this minimal one, making Freemarker the default result >> type: >> >> >> >>> class="org.apache.struts2.views.freemarker.FreemarkerResult" >> default="true"/> >> >> >>/WEB-INF/pages/hello.ftl >> >> >> >> >> >> I have also tried 2 different sitemesh page parsers, HTMLPageParser and >> FastPageParser, but that didnt help either. >> >> Ah, and this is the decorator I am using: >> >> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";> >> <#assign >> decorator=JspTaglibs["http://www.opensymphony.com/sitemesh/decorator";] /> >> http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en"> >> >><@decorator.title default="Struts2 Freemarker Sitemesh >> Hibernate"/> >><@decorator.head/> >> >> >> >><@decorator.body/> >> >> >> >> >> >> Any idea highly appreciated! >> >> Markus >> >> >> -- >> View this message in context: >> http://www.nabble.com/Struts-2.1.6%2C-Sitemesh---FreeMarkerPageFilter-tp21739507p21739507.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > > -- > "Hey you! Would you help me to carry the stone?" Pink Floyd > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands
How to stop action getting called on click of refresh button
Hi, Can I stop the calling of action on click of refresh button as on this action it will generate a report at some specified location. So on every refresh click will generate a new report at that location which is unacceptable. So is there any way to stop calling the action/ have one flag on action which determines this part of code in action need not be executed on click on refresh button. Regards, Shakti
[S2] Customizing Struts JSON Plugin response
I am using JSON plugin in Struts 2 for writing a resoponse. the plugin is generating the response perfectly. however, this is Google Visulization API demand that there should be a string wrapping the JSON response. like the one mentioned below. > google.visualization.Query.setResponse(JSON RESPONSE HERE); > How can i get this? wrap the JSON response with PARANTHESIS brackets from struts. ..alee http://techboard.wordpress.com
DefaultActionInvocation exception
I need some help figuring out where I need to search for the problem below. I have a jsp input.jsp which calls display.jsp on click of submit. display.jsp can also be called directly using search. A URL in display.jsp does not work when it is being redirected from input.jsp but works when directly being called. display.jsp has the following javascript which is called when the link is clicked. function getFile(fileName, path){ document.forms[0].action="getFile.action?fileName="+fileName; alert('action::'+document.displayFile.action); document.forms[0].submit(); } Any idea on where I need to be looking. Let me know if I need to post any additional information Here is the whole exception stack trace [1/30/09 15:31:54:953 IST] 002b SystemOut O [ERROR] 31:54 (Dispatcher.java:serviceAction:512) Could not find action or result No result defined for action com.action.FileAction and result invalid_user - action - at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253) at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:167) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.interceptor.ServletConfigInterceptor.intercept(ServletConfigInterceptor.java:170) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:176) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation$2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:50) at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:504) at org.apache.struts2.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:419) at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190) at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130) at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:761) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:673) at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:688) at com.ibm.ws.wswebcontainer.filter.WebAppFilterManager.invokeFilters(WebAppFilterManager.java:101) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.invokeFilters(DefaultExtensionProcessor.java:758) at com.ibm.ws.webcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:718) at com.ibm.ws.wswebcontainer.extension.DefaultExtensionProcessor.handleRequest(DefaultExtensionProcessor.java:113) at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3276) at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:267) at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811) at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1455) at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:113) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454) at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383) at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102) at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165) at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217) at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161) at com.ibm.io.async.AsyncFuture.completed(AsyncFuture
Re: Struts 2 Type conversion refuses 0.0 for a double?
Thanks for your reply Lukasz. In practice, I should use BigDecimal to avoid rounding problems but it doesn't change the fact that 0.0 shouldn't be thrown up as an invalid conversion for a double. This works perfectly well, so I can't understand why Struts2 throws "0.0" out as an error ... public class Test { public static void main(String[] args) { double d = Double.parseDouble("0.0"); System.out.println(d); } } -- View this message in context: http://www.nabble.com/Struts-2-Type-conversion-refuses-0.0-for-a-double--tp21738188p21744461.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: struts 2.1.6 struts2-blank adding Double validation causes Exception
It turns out that the problem I was having - had nothing to do with type conversion. The problem was a chunk of my code that was responsible for formatting. Specifically, the exception "IllegalArgumentException: Cannot format given Object as a Number" was thrown because of (format.money is defined in package properties -->format.money = {0,number,¤##0.00}) "myd" supposed to be a double. The problem occurred when wrong value was inserted instead of double (e.g. 'aaa' instead of 7,5). The same code threw no exceprion in struts 2.0, but in 2.1.6 it does. (I said earlier that earlier that showcase run differently than blank ... but I thing that was due to the fact that I didn't copy all the code from one project to other - sorry about that ;) So the problem is not so serious as I thought it was. I will try to solve this by checking first if myd contains double or not before formatting On Thu, Jan 22, 2009 at 10:04 AM, Sergio Italiani wrote: > While having done the same with struts 2.0 blank project - work > perfectly well. Also works if i add the code to struts2-showcase > (validation folder). > > The problem is as follows: > > I tried to add double validation to 2.1.6 blank project and if i type > in form illegal value - say 'aaa' - instead of showing the > invalid.fieldvalue.variable message it throws the following exception > : > > > java.lang.IllegalArgumentException: Cannot format given Object as a Number > java.text.DecimalFormat.format(DecimalFormat.java:487) > java.text.Format.format(Format.java:140) > java.text.MessageFormat.subformat(MessageFormat.java:1288) > java.text.MessageFormat.format(MessageFormat.java:836) > java.text.Format.format(Format.java:140) > > com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTextUtil.java:673) > > com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:427) > > com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:242) > com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:108) > > org.apache.struts2.util.TextProviderHelper.getText(TextProviderHelper.java:79) > org.apache.struts2.components.Text.end(Text.java:161) > > org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) > > org.apache.jsp.example.Login_jsp._jspx_meth_s_005ftext_005f0(Login_jsp.java:268) > org.apache.jsp.example.Login_jsp._jspService(Login_jsp.java:91) > org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) > org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) > javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) > > org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154) > > org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249) > > org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:93) > > com.opensymphony.xwork2.DefaultActionInv
Re: struts 2.1.6 struts2-blank adding Double validation causes Exception
It turns out that the problem I was having - had nothing to do with type conversion. The problem was a chunk of my code that was responsible for formatting. Specifically, the exception "IllegalArgumentException: Cannot format given Object as a Number" was thrown because of (format.money is defined in package properties -->format.money = {0,number,¤##0.00}) "myd" supposed to be a double. The problem occurred when wrong value was inserted instead of double (e.g. 'aaa' instead of 7,5). The same code threw no exceprion in struts 2.0, but in 2.1.6 it does. (I said earlier that earlier that showcase run differently than blank ... but I thing that was due to the fact that I didn't copy all the code from one project to other - sorry about that ;) So the problem is not so serious as I thought it was. I will try to solve this by checking first if myd contains double or not before formatting 2009/1/22 pochtaaac pochta : > While having done the same with struts 2.0 blank project - work perfectly > well. Also works if i add the code to struts2-showcase (validation folder). > > The problem is as follows: > > I tried to add double validation to 2.1.6 blank project and if i type in form > illegal value - say 'aaa' - instead of showing the > invalid.fieldvalue.variable message it throws the following exception : > > > java.lang.IllegalArgumentException: Cannot format given Object as a Number >java.text.DecimalFormat.format(DecimalFormat.java:487) >java.text.Format.format(Format.java:140) >java.text.MessageFormat.subformat(MessageFormat.java:1288) >java.text.MessageFormat.format(MessageFormat.java:836) >java.text.Format.format(Format.java:140) > > com.opensymphony.xwork2.util.LocalizedTextUtil.getMessage(LocalizedTextUtil.java:673) > > com.opensymphony.xwork2.util.LocalizedTextUtil.findText(LocalizedTextUtil.java:427) > > com.opensymphony.xwork2.TextProviderSupport.getText(TextProviderSupport.java:242) >com.opensymphony.xwork2.ActionSupport.getText(ActionSupport.java:108) > > org.apache.struts2.util.TextProviderHelper.getText(TextProviderHelper.java:79) >org.apache.struts2.components.Text.end(Text.java:161) > > org.apache.struts2.views.jsp.ComponentTagSupport.doEndTag(ComponentTagSupport.java:42) > > org.apache.jsp.example.Login_jsp._jspx_meth_s_005ftext_005f0(Login_jsp.java:268) >org.apache.jsp.example.Login_jsp._jspService(Login_jsp.java:91) >org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) >javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) > > org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) >org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) >javax.servlet.http.HttpServlet.service(HttpServlet.java:717) > > org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390) > > org.apache.struts2.dispatcher.ServletDispatcherResult.doExecute(ServletDispatcherResult.java:154) > > org.apache.struts2.dispatcher.StrutsResultSupport.execute(StrutsResultSupport.java:186) > > com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:361) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:265) > > com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:249) > > org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68) > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:195) > > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:87) > > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:236) > > com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:148) > > com.opensymphony.xwork2.
Re: Help! : ResultSet is from UPDATE. No Data.
Thanks, I have posted to a Hibernate and MySql forum as well, with the hope someone might help! I've pretty much exhausted google trying to find a solution, it's really doing my head in. oh well, fingers crossed someone has encountered this before! Chris -- View this message in context: http://www.nabble.com/Help%21-%3A-ResultSet-is-from-UPDATE.-No-Data.-tp21743558p21743838.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: having trouble with type conversion in struts 2.1.6
It turns out that the problem I was having - had nothing to do with type conversion. The problem was a chunk of my code that was responsible for formatting. Specifically, the exception "IllegalArgumentException: Cannot format given Object as a Number" was thrown because of (format.money is defined in package properties -->format.money = {0,number,¤##0.00}) "myd" supposed to be a double. The problem occurred when wrong value was inserted instead of double (e.g. 'aaa' instead of 7,5). The same code threw no exceprion in struts 2.0, but in 2.1.6 it does. (I said earlier that earlier that showcase run differently than blank ... but I thing that was due to the fact that I didn't copy all the code from one project to other - sorry about that ;) So the problem is not so serious as I thought it was. I will try to solve this by checking first if myd contains double or not before formatting On Fri, Jan 23, 2009 at 8:37 PM, Sergio Italiani wrote: > Hi All! > Could anybody please tell me if I should add anything to the > struts2blank project (of struts 2.1.6) so that type conversion error > handling > ( i mean the --> invalid.fieldvalue.fieldname) would work properly. > I am clearly missing something, because instead of displaying > invalid.fieldvalue my project (witch is based on struts2blank) > throws--> IllegalArgumentException: Cannot format given Object as a Number. > Any body ? I am getting desperate and thinking of abandoning > struts2.1.6 alltoghether :( > Thank you in advance. > > Sergio. > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Upgrading Struts 2
It turns out that the problem I was having - had nothing to do with type conversion. The problem was a chunk of my code that was responsible for formatting. Specifically, the exception "IllegalArgumentException: Cannot format given Object as a Number" was thrown because of (format.money is defined in package properties -->format.money = {0,number,¤##0.00}) "myd" supposed to be a double. The problem occurred when wrong value was inserted instead of double (e.g. 'aaa' instead of 7,5). The same code threw no exceprion in struts 2.0, but in 2.1.6 it does. (I said earlier that earlier that showcase run differently than blank ... but I thing that was due to the fact that I didn't copy all the code from one project to other - sorry about that ;) So the problem is not so serious as I thought it was. I will try to solve this by checking first if myd contains double or not before formatting On 1/26/09, Paweł Wielgus wrote: > Hi all, > just as a side note I wrote few lines about my upgrade process here [1], > remember to delete work directory from tomcat if You are using one. > > [1] - > http://poulwiel.blogspot.com/2009/01/migrating-from-struts-20x-to-216.html > > Best greetings, > Paweł Wielgus. > > 2009/1/25 Wes Wannemacher : >> On Sunday 25 January 2009 12:39:27 Sergio Italiani wrote: >>> OK you got a point there... but again if it was XWork bug wouldn't it >>> affect showcase as well. As I mentioned before If I modify the >>> showcase validation pages - they work pretty well with type conversion >>> and no exception is thrown. The problem is that the ShowCase is huge >>> and I cannon base my new project on it. On the other hand StrutsBlank >>> is small but it is not working properly as far as type conversion is >>> concerned (and I didn't proceed to try anything else... ) >>> >> >> To be honest Sergio, I haven't looked closely at this bug as I've had a >> few >> other things going on. I understand your sentiment as showcase is pretty >> big >> and brings in quite a few plugins to show examples of what s2 can do. I >> know >> Musachy has had a look at this bug and he's an XWork committer in addition >> to >> struts, so it's likely to get proper attention in the next few days. >> >> If you think you can figure out what's going on and provide a solid fix, >> go >> ahead and take a stab at it. We welcome patches and having a patch will >> likely >> speed up the time to get a fix committed. Even if your patch doesn't >> follow >> all the standards (unit tests, proper spacing, etc.), but the core logic >> of >> your patch fixes the problem, it will often accelerate things since that >> is >> usually what takes the most time. A committer can make whitespace changes >> and >> write or help with a unit test. >> >> -Wes >> >> -- >> >> Wes Wannemacher >> Author - Struts 2 In Practice >> Includes coverage of Struts 2.1, Spring, JPA, JQuery, Sitemesh and more >> http://www.manning.com/wannemacher >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...
On Fri, Jan 30, 2009 at 10:10 AM, mleneveut wrote: > > I put some @Conversion(), @Element(value = java.lang.Long.class) and > @TypeConversion(rule = ConversionRule.COLLECTION, converter = > "java.lang.Long") in my Action and it's not working better. > > So I set the convertion in a properties file with : > Element_idsCommerciaux=java.lang.Long > > and it is working, thanks Ralf. > > I tried to put v2.1.6 but I had a lot of trouble with EL expression (s:if > test="${}", s:if test="#session...") which seemed to have changed, but I see > nothing in the docs, release ntoes or migration guide, EL expressions attributes of struts tags which are evaluated on the ValueStack are a security risk. See [1]. Outside from struts tags you can still access objects on the valuestack, as struts intercepts the lookup to the page context. For the other way around you have to fully markup when you want to access the page context and such. ( foo="#attr.bar" ). > so I gave up (600 JSP > to change and no time to do it) Take peace and comfort in the fact that you're not the only one who has/had to do this :-) Cheers, -Ralf [1] https://issues.apache.org/struts/browse/WW-2107 > > Thanks for your help. > -- > View this message in context: > http://www.nabble.com/Random-ClassCastException-%3A-I%27m-expecting-Long%2C-Struts-gives-me-String-on-some-servers...-tp21722894p21743689.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: persisting data across different form
Hi, first consider one common form for this two actions maybe they have more in common. Then You can append this x value to redirection params and set it for second action/form, last thing I would do would be session. Best greetings, Paweł Wielgus. 2009/1/30 overtakerx : > > Hi > > > If I have formA.java and formB.java with its corresponding actionA and > actionB classes, and inside formA I have a variable x = 10; and I would like > to transfer that to formB when actionA forwards to actionB > > what's the best way to do it besides using http session ? > would this be considered as a good struts practice? > -- > View this message in context: > http://www.nabble.com/persisting-data-across-different-form-tp21738852p21738852.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Help! : ResultSet is from UPDATE. No Data.
I don't think this has anything to do with Struts 2. You might have better luck posting to a hibernate or mysql forum. Google might help as well: http://www.google.com/search?q=ResultSet+is+from+UPDATE.+No+Data Nils-H On Fri, Jan 30, 2009 at 10:00 AM, anubisza wrote: > > Hi All, > > I have a website written using Struts 2, on a MYSQL database, using > Hibernate.. I have a search function which calls a > stored procedure in the database (search_SP), which accepts 1 parameter (the > text entered in the form field), > which in turn populates from a View. > > When I submit a search via the site, I don't get any errors, and the results > return exactly as I would expect them to, > but in the background my Eclipse session is showing a stacktrace along the > lines of: > > > > > 28-Jan-2009 21:06:49 > com.opensymphony.xwork2.validator.DelegatingValidatorContext > $LoggingValidationAware addFieldError > SEVERE: Validation error for results:Enter something to search for > here > Hibernate: call search_SP(?) > 28-Jan-2009 21:06:49 org.hibernate.util.JDBCExceptionReporter > logExceptions > WARNING: SQL Error: 0, SQLState: S1000 > 28-Jan-2009 21:06:49 org.hibernate.util.JDBCExceptionReporter > logExceptions > SEVERE: ResultSet is from UPDATE. No Data. > 28-Jan-2009 21:06:49 org.apache.catalina.core.StandardWrapperValve > invoke > SEVERE: Servlet.service() for servlet default threw exception > java.sql.SQLException: ResultSet is from UPDATE. No Data. > at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) > at com.mysql.jdbc.ResultSet.next(ResultSet.java:7287) > at org.hibernate.loader.Loader.doQuery(Loader.java:697) > at > org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) > at org.hibernate.loader.Loader.doList(Loader.java:2220) > at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) > at org.hibernate.loader.Loader.list(Loader.java:2099) > at > org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289) > at > org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695) > at > org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142) > at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152) > at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66) > at > prodme.service.Search_service_impl.search(Search_service_impl.java:30) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) > at > org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at $Proxy11.search(Unknown Source) > at prodme.action.Search.execute(Search.java:24) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:597) > at > com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404) > at > com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) > at > com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) > at > com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) > at com.opensymphony.xwork2.DefaultActionInvocation > $2.doProfiling(DefaultActionInvocation.java:224) > at com.opensymphony.xwork2.DefaultActionInvocation > $2.doProfiling(DefaultActionInvocation.java:223) > at > com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) > at > com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) > at > com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) > at > org.apache.
Re: Random ClassCastException : I'm expecting Long, Struts gives me String on some servers...
I put some @Conversion(), @Element(value = java.lang.Long.class) and @TypeConversion(rule = ConversionRule.COLLECTION, converter = "java.lang.Long") in my Action and it's not working better. So I set the convertion in a properties file with : Element_idsCommerciaux=java.lang.Long and it is working, thanks Ralf. I tried to put v2.1.6 but I had a lot of trouble with EL expression (s:if test="${}", s:if test="#session...") which seemed to have changed, but I see nothing in the docs, release ntoes or migration guide, so I gave up (600 JSP to change and no time to do it) Thanks for your help. -- View this message in context: http://www.nabble.com/Random-ClassCastException-%3A-I%27m-expecting-Long%2C-Struts-gives-me-String-on-some-servers...-tp21722894p21743689.html Sent from the Struts - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: What's the best alternative after Struts2 Dojo PlugIn deprecate?
On Fri, Jan 30, 2009 at 12:25 AM, wrote: > We use Eclipse, but there's no IDE setup necessary and no special IDE > plugins. The beauty of GWT is it's all Java, so you just drop in the GWT > JARs and start using the APIs. Naturally there's a bit of a learning > curve to understand the server-side components, how GWT handles > asynchronous calls in the Java code, and learning about all the client-side > widgets. > > GWT compilation/JS generation is a bit tricky, but once you get the gwt xml > file figured out, and create good GWT compile Ant task, you never have to > think about it again. When developing GWT with Eclipse you should check out the cypal studio for GWT, which offers a hosted mode for GWT apps which allows you to debug your UI components easily. > -B > > > > > Chris Boldon > m> To > Struts Users Mailing List > 01/29/2009 02:32 > PM cc > > Subject > Please respond to Re: What's the best alternative > "Struts Users after Struts2 Dojo PlugIn > Mailing List" deprecate? > he.org> > > > > > > > > > What IDE setup are you using to run Struts2 and GWT out of curiosity? Is > there any IDE that does both really well together? Plugins? > > On 1/29/09, > Becky.L.O'sulli...@healthnet.com< > Becky.L.O'sulli...@healthnet.com > > wrote: >> >> We've been using GWT and Musachy's Struts 2 GWT plugin, and other than a >> few "gotchas" it works well. It hasn't been updated in a looong time >> though (hint hint - got a couple of open bugs :) ). >> >> GWT has met all of our expectations and, for Java developers, is far > easier >> to work with than Dojo. >> >> -B >> >> >> >> >> >> jwl >> > com> To >> user@struts.apache.org >> 01/29/2009 01:45 cc >> PM >> Subject >> What's the best alternative after >> Please respond to Struts2 Dojo PlugIn deprecate? >> "Struts Users >> Mailing List" >> > he.org> >> >> >> >> >> >> >> >> Any suggestion for the alternative AJAX framework for Struts2 after they >> deprecate Dojo PlugIn? I know there are many out there, but what's the >> best >> one to integrate with Struts2? Any suggestion or analysis is highly >> appreciated! >> -- >> View this message in context: >> >> > http://www.nabble.com/What%27s-the-best-alternative-after-Struts2-Dojo-PlugIn-deprecate--tp21736570p21736570.html > >> >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> >> >> >> >> - >> This message, together with any attachments, is >> intended only for the use of the individual or entity >> to which it is addressed. It may contain information >> that is confidential and prohibited from disclosure. >> If you are not the intended recipient, you are hereby >> notified that any dissemination or copying of this >> message or any attachment is strictly prohibited. If >> you have received this message in error, please notify >> the original sender immediately by telephone or by >> return e-mail and delete this message, along with any >> attachments, from your computer. Thank you. >> >> - >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> >> > > > > > - > This message, together with any attachments, is > intended only for the use of the individual or entity > to which it is addressed. It may contain information > that is confidential and prohibited from disclosure. > If you are not the intended recipient, you are hereby > notified that any dissemination or copying of this > message or any attachment is strictly prohibited. If > you have received this message in error, please notify > the original sender immediately by telephone or by > return e-mail and delete this message, along with any > attachments, from your computer. Thank you. > > ---
Help! : ResultSet is from UPDATE. No Data.
Hi All, I have a website written using Struts 2, on a MYSQL database, using Hibernate.. I have a search function which calls a stored procedure in the database (search_SP), which accepts 1 parameter (the text entered in the form field), which in turn populates from a View. When I submit a search via the site, I don't get any errors, and the results return exactly as I would expect them to, but in the background my Eclipse session is showing a stacktrace along the lines of: 28-Jan-2009 21:06:49 com.opensymphony.xwork2.validator.DelegatingValidatorContext $LoggingValidationAware addFieldError SEVERE: Validation error for results:Enter something to search for here Hibernate: call search_SP(?) 28-Jan-2009 21:06:49 org.hibernate.util.JDBCExceptionReporter logExceptions WARNING: SQL Error: 0, SQLState: S1000 28-Jan-2009 21:06:49 org.hibernate.util.JDBCExceptionReporter logExceptions SEVERE: ResultSet is from UPDATE. No Data. 28-Jan-2009 21:06:49 org.apache.catalina.core.StandardWrapperValve invoke SEVERE: Servlet.service() for servlet default threw exception java.sql.SQLException: ResultSet is from UPDATE. No Data. at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910) at com.mysql.jdbc.ResultSet.next(ResultSet.java:7287) at org.hibernate.loader.Loader.doQuery(Loader.java:697) at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236) at org.hibernate.loader.Loader.doList(Loader.java:2220) at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104) at org.hibernate.loader.Loader.list(Loader.java:2099) at org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:289) at org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1695) at org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:142) at org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:152) at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:66) at prodme.service.Search_service_impl.search(Search_service_impl.java:30) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy11.search(Unknown Source) at prodme.action.Search.execute(Search.java:24) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:404) at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:267) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:229) at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation $2.doProfiling(DefaultActionInvocation.java:224) at com.opensymphony.xwork2.DefaultActionInvocation $2.doProfiling(DefaultActionInvocation.java:223) at com.opensymphony.xwork2.util.profiling.UtilTimerStack.profile(UtilTimerStack.java:455) at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:221) at com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:150) at org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:48) at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:86) at com.opensymphony.xwork2.DefaultActionInvocation $2.doProfiling(DefaultAction