Re: select box dynamic loads depends on another select box
Hi Johannes, Can you tell me how to change this example to work for single select box. I mean If user change anything in select box, another 2 select boxes need to get change their data. Thanks in advace Ratna Johannes Geppert wrote: > > Maybe this helps you. > > http://code.google.com/p/struts2-jquery/wiki/SelectTag#A_simple_Doubleselect_with_Topics > > Best Regards > > Johannes Geppert > > > nani2ratna wrote: >> >> Hi Guys, >> >> I have 2 select boxes. If user changes one select box, then data in >> second one should be changed and reload from database. >> So when user changes first select box, asynchronous action should be >> called and should get the data from data base >> and upload that data to select box. >> >> Sorry for my english. >> >> Thanks >> RS >> > > -- View this message in context: http://old.nabble.com/select-box-dynamic-loads-depends-on-another-select-box-tp27238090p27354011.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
NoClassDefFoundError Exception
Hello, I am quite new in Struts2 Even I have the same errors.The jar files mentioned above are available there but still it gives me the same error Please tell me the solution here Jan 28, 2010 4:03:02 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Struts2Demo' did not find a matching property. Jan 28, 2010 4:03:02 PM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.j2ee.server:mkcl' did not find a matching property. Jan 28, 2010 4:03:02 PM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\WiFi\bin\;;C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\mysql-connector-java-3.1.6-bin\mysql-connector-java-3.1.6-bin\C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\jsp-api\C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api;C:\Program Files\Java\jdk1.6.0_14\bin;C:\Program Files\MySQL\MySQL Server 5.1\bin;C:\Program Files\Java\jdk1.6.0_14\bin;C:\Program Files\Java\jdk1.6.0_14\bin;C:\Program Files\Apache Software Foundation\apache-maven-2.2.1\bin; Jan 28, 2010 4:03:02 PM org.apache.coyote.http11.Http11Protocol init INFO: Initializing Coyote HTTP/1.1 on http-8080 Jan 28, 2010 4:03:02 PM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 403 ms Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardService start INFO: Starting service Catalina Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardEngine start INFO: Starting Servlet Engine: Apache Tomcat/6.0.20 Jan 28, 2010 4:03:02 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(WebappClassLoader.java:1387) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249) at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) at org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4450) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardHost.start(StandardHost.java:722) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) at org.apache.catalina.core.StandardService.start(StandardService.java:516) at org.apache.catalina.core.StandardServer.start(StandardServer.java:710) at org.apache.catalina.startup.Catalina.start(Catalina.java:583) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardContext start SEVERE: Error filterStart Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/mkcl] startup failed due to previous errors Jan 28, 2010 4:03:02 PM org.apache.coyote.http11.Http11Protocol start INFO: Starting Coyote HTTP/1.1 on http-8080 Jan 28, 2010 4:03:02 PM org.apache.jk.common.ChannelSocket init INFO: JK: ajp13 listening on /0.0.0.0:8009 Jan 28, 2010 4:03:02 PM org.apache.jk.server.JkMain start INFO: Jk running ID=0 time=0/16 config=null Jan 28, 2010 4:03:02 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 395 ms -- View this message in context: http://old.nabble.com/NoClassDefFoundError-Exception-tp17344914p27354174.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.apa
Re: NoClassDefFoundError Exception
Jars are in the maven dependency list? On Thu, Jan 28, 2010 at 3:59 PM, LotusHeart wrote: > > Hello, > I am quite new in Struts2 > Even I have the same errors.The jar files mentioned above are available > there but still it gives me the same error > Please tell me the solution here > > Jan 28, 2010 4:03:02 PM org.apache.tomcat.util.digester.SetPropertiesRule > begin > WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting > property 'source' to 'org.eclipse.jst.jee.server:Struts2Demo' did not find > a > matching property. > Jan 28, 2010 4:03:02 PM org.apache.tomcat.util.digester.SetPropertiesRule > begin > WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting > property 'source' to 'org.eclipse.jst.j2ee.server:mkcl' did not find a > matching property. > Jan 28, 2010 4:03:02 PM org.apache.catalina.core.AprLifecycleListener init > INFO: The APR based Apache Tomcat Native library which allows optimal > performance in production environments was not found on the > java.library.path: C:\Program > > Files\Java\jre6\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program > Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program > Files\PC Connectivity > > Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program > Files\Intel\WiFi\bin\;;C:\Program Files\Apache Software Foundation\Tomcat > > 6.0\lib\mysql-connector-java-3.1.6-bin\mysql-connector-java-3.1.6-bin\C:\Program > Files\Apache Software Foundation\Tomcat 6.0\lib\jsp-api\C:\Program > Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api;C:\Program > Files\Java\jdk1.6.0_14\bin;C:\Program Files\MySQL\MySQL Server > 5.1\bin;C:\Program Files\Java\jdk1.6.0_14\bin;C:\Program > Files\Java\jdk1.6.0_14\bin;C:\Program Files\Apache Software > Foundation\apache-maven-2.2.1\bin; > Jan 28, 2010 4:03:02 PM org.apache.coyote.http11.Http11Protocol init > INFO: Initializing Coyote HTTP/1.1 on http-8080 > Jan 28, 2010 4:03:02 PM org.apache.catalina.startup.Catalina load > INFO: Initialization processed in 403 ms > Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardService start > INFO: Starting service Catalina > Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardEngine start > INFO: Starting Servlet Engine: Apache Tomcat/6.0.20 > Jan 28, 2010 4:03:02 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(WebappClassLoader.java:1387) >at > > org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233) >at > > org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249) >at > > org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:397) >at > > org.apache.catalina.core.ApplicationFilterConfig.(ApplicationFilterConfig.java:108) >at > > org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3800) >at > org.apache.catalina.core.StandardContext.start(StandardContext.java:4450) >at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) >at > org.apache.catalina.core.StandardHost.start(StandardHost.java:722) >at > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045) >at > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443) >at > org.apache.catalina.core.StandardService.start(StandardService.java:516) >at > org.apache.catalina.core.StandardServer.start(StandardServer.java:710) >at org.apache.catalina.startup.Catalina.start(Catalina.java:583) >at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) >at java.lang.reflect.Method.invoke(Unknown Source) >at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288) >at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) > Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardContext start > SEVERE: Error filterStart > Jan 28, 2010 4:03:02 PM org.apache.catalina.core.StandardContext start > SEVERE: Context [/mkcl] startup failed due to previous errors > Jan 28, 2010 4:03:02 PM org.apache.coyote.http11.Http11Protocol start > INFO: Starting Coyote HTTP/1.1 on http-8080 > Jan 28, 2010 4:03:02 PM org.apache.jk.common.ChannelSocket init > INFO: JK: ajp13 listening on /0.0.0.0:8009 > Jan 28, 2010 4:03:02 PM org.apache.jk.server.JkMain start > INFO: Jk running ID=0 time=0/16 config=null > Jan 28, 2010 4:03:02 PM org.apache.catalina.startup.Catalina start > INFO: Server startup in 395 ms > > -- > View this message in context: > http://old.nabble.com/NoClassDefFoundError-Exception
Re: Not Able to call Action
Hi, Very Very thank you for Such a Wonderful Explanation about the Initial Configuration for Struts2. But, I have always stuck here(whenever i create application from scratch) I have checked all the My Configurations... but then also my application gives me error something like this: " Struts has detected an unhandled exception: Messages: No result defined for action secure.Login and result success " It will be nice if you will please give me some hint for above issue. Thanks Rahul newton.dave wrote: > > --- aum strut wrote: >> about entering valida data i am inputting valid data aal the tme.. > > I'm skeptical. Turn "devMode" on and check your logs. It might also be > related to the other issue, I suppose, but it's more likely that there is > a > conversion or validator error. > > Dave > > > - > 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://old.nabble.com/Not-Able-to-call-Action-tp15878011p27354274.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: Not Able to call Action
That needs to be defined in struts.xml action and its result. On Thu, Jan 28, 2010 at 4:10 PM, SweetRahul wrote: > > Hi, > > Very Very thank you for Such a Wonderful Explanation about the Initial > Configuration for Struts2. > > But, I have always stuck here(whenever i create application from > scratch) I have checked all the My Configurations... but then also my > application gives me error something like this: > > " Struts has detected an unhandled exception: > > Messages: No result defined for action secure.Login and result success " > > It will be nice if you will please give me some hint for above issue. > > Thanks > > Rahul > > > > > > newton.dave wrote: > > > > --- aum strut wrote: > >> about entering valida data i am inputting valid data aal the tme.. > > > > I'm skeptical. Turn "devMode" on and check your logs. It might also be > > related to the other issue, I suppose, but it's more likely that there is > > a > > conversion or validator error. > > > > Dave > > > > > > - > > 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://old.nabble.com/Not-Able-to-call-Action-tp15878011p27354274.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 > > -- Saeed Iqbal Independant Consultant J2EE - Application Architect / Developer
Re: Not Able to call Action
Yes. But still it gives me an error... My Struts.xml file contain the above action with name "login" and for double check in result i have provided name="success". My Action is executed successfully...but it will not display the page which is mapped to SUCCESS. If you want some more information... then please reply me. Thanks Rahul Saeed Iqbal-2 wrote: > > That needs to be defined in struts.xml action and its result. > > On Thu, Jan 28, 2010 at 4:10 PM, SweetRahul wrote: > >> >> Hi, >> >> Very Very thank you for Such a Wonderful Explanation about the Initial >> Configuration for Struts2. >> >> But, I have always stuck here(whenever i create application from >> scratch) I have checked all the My Configurations... but then also my >> application gives me error something like this: >> >> " Struts has detected an unhandled exception: >> >> Messages: No result defined for action secure.Login and result success " >> >> It will be nice if you will please give me some hint for above issue. >> >> Thanks >> >> Rahul >> >> >> >> >> >> > -- View this message in context: http://old.nabble.com/Not-Able-to-call-Action-tp15878011p27354451.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: Not Able to call Action
It says secure.Login not just login. Case Sensitive too. On Thu, Jan 28, 2010 at 4:25 PM, SweetRahul wrote: > > Yes. But still it gives me an error... > My Struts.xml file contain the above action with name "login" and for > double > check > in result i have provided name="success". > > My Action is executed successfully...but it will not display the page which > is mapped to SUCCESS. > > If you want some more information... then please reply me. > > Thanks > > Rahul > > > > Saeed Iqbal-2 wrote: > > > > That needs to be defined in struts.xml action and its result. > > > > On Thu, Jan 28, 2010 at 4:10 PM, SweetRahul > wrote: > > > >> > >> Hi, > >> > >> Very Very thank you for Such a Wonderful Explanation about the Initial > >> Configuration for Struts2. > >> > >> But, I have always stuck here(whenever i create application from > >> scratch) I have checked all the My Configurations... but then also > my > >> application gives me error something like this: > >> > >> " Struts has detected an unhandled exception: > >> > >> Messages: No result defined for action secure.Login and result success " > >> > >> It will be nice if you will please give me some hint for above issue. > >> > >> Thanks > >> > >> Rahul > >> > >> > >> > >> > >> > >> > > > > -- > View this message in context: > http://old.nabble.com/Not-Able-to-call-Action-tp15878011p27354451.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 > > -- Saeed Iqbal Independant Consultant J2EE - Application Architect / Developer
Re: Not Able to call Action
Yes, i have written it correct way...if i am not wrong. Please have a look at following struts.xml file my.jsp Login.jsp now here the URL is like this: "~/secure/login.action", Isn't it ? and the code in jsp file is as: The execute method is executed successfully...In console i got the provided username and password field values. But still it gives me error... I have not understand whats wrong in this code ? Rahul Saeed Iqbal-2 wrote: > > It says secure.Login not just login. Case Sensitive too. > > > > -- > Saeed Iqbal > Independant Consultant > J2EE - Application Architect / Developer > > -- View this message in context: http://old.nabble.com/Not-Able-to-call-Action-tp15878011p27354656.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: Not Able to call Action
It looks fine to me perhaps someone else can help you. On Thu, Jan 28, 2010 at 4:42 PM, SweetRahul wrote: > > Yes, i have written it correct way...if i am not wrong. > Please have a look at following struts.xml file > > > >my.jsp >Login.jsp > > > > now here the URL is like this: "~/secure/login.action", Isn't it ? > > and the code in jsp file is as: > > > > > > > > > The execute method is executed successfully...In console i got the provided > username and password field values. > > But still it gives me error... I have not understand whats wrong in this > code ? > > Rahul > > > Saeed Iqbal-2 wrote: > > > > It says secure.Login not just login. Case Sensitive too. > > > > > > > > -- > > Saeed Iqbal > > Independant Consultant > > J2EE - Application Architect / Developer > > > > > > -- > View this message in context: > http://old.nabble.com/Not-Able-to-call-Action-tp15878011p27354656.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 > > -- Saeed Iqbal Independant Consultant J2EE - Application Architect / Developer
Re: Not Able to call Action
Hi Saeed, Thanks for trying to solve my issue. Actually...Struts 2 is a Great Framework for Developing Web Applications. But the word great adds more complexity to the Framework. I am using Dojo with Struts2, but unexpectedly it did not works with IE it works in Mozilla FF but not in IE. So, Is there any other plugins available for using Ajax in a Web Application ? Thanks Rahul Saeed Iqbal-2 wrote: > > It looks fine to me perhaps someone else can help you. > > > -- View this message in context: http://old.nabble.com/Not-Able-to-call-Action-tp15878011p27354800.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: select box dynamic loads depends on another select box
you can publish more then one topics like this: nani2ratna wrote: > > Hi Johannes, > > Can you tell me how to change this example to work for single select box. > I mean If user change anything in select box, another 2 select boxes need > to get change their data. > > Thanks in advace > Ratna > > > Johannes Geppert wrote: >> >> Maybe this helps you. >> >> http://code.google.com/p/struts2-jquery/wiki/SelectTag#A_simple_Doubleselect_with_Topics >> >> Best Regards >> >> Johannes Geppert >> >> >> nani2ratna wrote: >>> >>> Hi Guys, >>> >>> I have 2 select boxes. If user changes one select box, then data in >>> second one should be changed and reload from database. >>> So when user changes first select box, asynchronous action should be >>> called and should get the data from data base >>> and upload that data to select box. >>> >>> Sorry for my english. >>> >>> Thanks >>> RS >>> >> >> > > - --- web: http://www.jgeppert.com twitter: http://twitter.com/jogep -- View this message in context: http://old.nabble.com/select-box-dynamic-loads-depends-on-another-select-box-tp27238090p27355701.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
Struts2+spring plugin problem
Hi All, I am new to struts2+spring and i am just trying to learn. I have added following in web.xml. struts2 org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter struts2 /* org.springframework.web.context.ContextLoaderListener org.apache.struts2.tiles.StrutsTilesListener org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/tiles.xml In struts.xml, http://struts.apache.org/dtds/struts-2.0.dtd";> /jsp/Login.jsp /jsp/Home.jsp /jsp/Home.jsp /jsp/Login.jsp /jsp/Login.jsp /jsp/Home.jsp In Login.jsp, After deplying this application, if i access localhost:8080/appname/ It goes to login page and after entering the credential, if i click Login button, the corresponding action class gets called after looking into spring's applicationCotext.xml. But if i access the loging page agin and hits the Login button, i am getting the following error. HTTP Status 500 - type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception java.lang.RuntimeException: Invalid action class configuration that references an unknown class named [loginAction] org.apache.struts2.convention.ConventionsServiceImpl.determineResultPath(ConventionsServiceImpl.java:100) org.apache.struts2.convention.ConventionUnknownHandler.determinePath(ConventionUnknownHandler.java:385) org.apache.struts2.convention.ConventionUnknownHandler.handleUnknownResult(ConventionUnknownHandler.java:274) com.opensymphony.xwork2.DefaultUnknownHandlerManager.handleUnknownResult(DefaultUnknownHandlerManager.java:76) com.opensymphony.xwork2.DefaultActionInvocation.createResult(DefaultActionInvocation.java:215) com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:356) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:266) com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:252) 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:237) com.opensymphony.xwork2.interceptor.ConversionErrorInterceptor.intercept(ConversionErrorInterceptor.java:122) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) 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:237) 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:237) com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:179) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.MultiselectInterceptor.intercept(MultiselectInterceptor.java:75) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.CheckboxInterceptor.intercept(CheckboxInterceptor.java:94) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) org.apache.struts2.interceptor.FileUploadInterceptor.intercept(FileUploadInterceptor.java:235) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ModelDrivenInterceptor.intercept(ModelDrivenInterceptor.java:89) com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:237) com.opensymphony.xwork2.interceptor.ScopedModelDrivenInterceptor.intercept(ScopedModelDrivenInterceptor.java:130) com.opensymphony.xwork2.DefaultActionInvocation.invok
Re: using a custom struts.multipart.parser in struts2.1.8.1
Lo and behold! This does work. . . the problem I was initially running into was that I was using the name: struts.multipart.parser and not the correct (new as of 2.1.8 ?) struts.multipart.handler So yes, defining the bean to use, in this case jakartax, will accomplish just what a struts-plugin.xml configuration file with the same bean definition will do. This, however, will not work (whereas it did at least in version 2.1.6): Brice On Wed, Jan 27, 2010 at 11:38 PM, Lukasz Lenart < lukasz.len...@googlemail.com> wrote: > 2010/1/27 Stephen Ince : > > The following may not be necessary. > > Struts.xml > > > > > > > > > name="jakartax" > > class="com.loadgeneral.struts2.JakartaMultiPartRequestx" > > scope="default" /> > > > > I'm curious why this didn't work... this is the normal approach to > define beans in Struts 2. > > > Regards > -- > Lukasz > http://www.lenart.org.pl/ > Kapituła Javarsovia 2010 > http://javarsovia.pl > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
I18nInterceptor / request_locale not working as expected
Hi list, I'm using struts 2.1.8 with JDK6 I've Message.properties | Message_de_DE.properties and Message_en_US.properties. When switching the local via a browser plugin everything works fine and I can see that Session.WW_TRANS_I18N_LOCALE contains the expected locale (de_DE or en_US). Now I've added a languages.jsp that contains 2 links Constructed like this: en_US English de_DE Deutsch When using one of these links I can see that Session.WW_TRANS_I18N_LOCALE changes it's value accordingly but the displayed language stays the same and doesn't change. languages.jsp uses an action like the following: --snip- public class LanguagesShowAction extends ActionSupport implements ServletRequestAware { HttpServletRequest request; private Map application; private Map session; public String execute() { application = ActionContext.getContext().getApplication(); session = ActionContext.getContext().getSession(); session.put("referer", "languages"); String localeParam = request.getParameter("request_locale"); System.out.println("localeParam = " + localeParam); if (localeParam != null && !localeParam.isEmpty()) { return "localeChngd"; //used to redirect to another jsp } System.out.println("loading languages page"); return SUCCESS; ---snap--- Any ideas on what I may have done wrong? Additional info needed? Regards, Stephan - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Tiles2.2.1, Struts2.1.8.1, Spring2.5.6 ===> "UnresolvingLocaleDefinitionsFactory.java:102" ???
Good afternoon, Tiles2.2.1, Struts 2.1.8.1, Spring 2.5.6, tried simple example, but always got the following error: === java.lang.NullPointerException org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:102) org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:364) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:618) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321) org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105) ... ... Could someone tell me why I get this error? Thanks a lot! -- Lu Ying (1) web.xml xmlns="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";> Struts2 Testing contextConfigLocation /WEB-INF/applicationContext*.xml org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/tiles.xml struts2 org.apache.struts2.dispatcher.FilterDispatcher actionPackages user.actions struts2 /* org.springframework.web.context.ContextLoaderListener org.apache.struts2.tiles.StrutsTilesListener begin.jsp (2) struts.xml ... ... class="org.apache.struts2.views.tiles.TilesResult" /> class="example.action.tiles.ProcessTile1"> welcome (3) tiles.xml (4) jsp file "> Tile example1 (5) baseLayout.jsp hello world - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Tiles2.2.1, Struts2.1.8.1, Spring2.5.6 ===> "UnresolvingLocaleDefinitionsFactory.java:102" ???
As far as I know the Struts-Tiles plugin supplied with Struts 2.1.8.1 does not support Tiles 2.2 (or 2.1 for that matter). (*Chris*) On Thu, Jan 28, 2010 at 11:15 AM, Emi Lu wrote: > Good afternoon, > > Tiles2.2.1, Struts 2.1.8.1, Spring 2.5.6, tried simple example, but always > got the following error: > === > java.lang.NullPointerException > > > org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:102) > > org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:364) > > org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:618) > > org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321) > org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105) > ... ... > > Could someone tell me why I get this error? > > Thanks a lot! > -- > Lu Ying > > (1) 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";> > > Struts2 Testing > > > > contextConfigLocation > /WEB-INF/applicationContext*.xml > > > > > > > org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG > /WEB-INF/tiles.xml > > > > > > > > struts2 > > org.apache.struts2.dispatcher.FilterDispatcher > > actionPackages > user.actions > > > > > > struts2 > /* > > > > > > org.springframework.web.context.ContextLoaderListener > > > > org.apache.struts2.tiles.StrutsTilesListener > > > > > > begin.jsp > > > > > > > > > > (2) struts.xml > ... ... > > > > > > > class="org.apache.struts2.views.tiles.TilesResult" /> > > > class="example.action.tiles.ProcessTile1"> > welcome > > > > > > > > (3) tiles.xml > > > > > > > > > > (4) jsp file > "> Tile example1 > > (5) baseLayout.jsp > hello world > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re: Tiles2.2.1, Struts2.1.8.1, Spring2.5.6 ===> "UnresolvingLocaleDefinitionsFactory.java:102" ???
Thank you Chris! As far as I know the Struts-Tiles plugin supplied with Struts 2.1.8.1 does not support Tiles 2.2 (or 2.1 for that matter). This is exactly the reason! I think both struts2 & Tiles2' official websites should highlight this in a very prominent position! Lowered the version to tiles2.0.7, everything is fine. What a wasting of time of all my debugging!!! I hope everything will knows about it in advance and no need to debug anymore ! -- Lu Ying Good afternoon, Tiles2.2.1, Struts 2.1.8.1, Spring 2.5.6, tried simple example, but always got the following error: === java.lang.NullPointerException org.apache.tiles.definition.UnresolvingLocaleDefinitionsFactory.getDefinition(UnresolvingLocaleDefinitionsFactory.java:102) org.apache.tiles.impl.BasicTilesContainer.getDefinition(BasicTilesContainer.java:364) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:618) org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321) org.apache.struts2.views.tiles.TilesResult.doExecute(TilesResult.java:105) ... ... Could someone tell me why I get this error? Thanks a lot! -- Lu Ying (1) 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";> Struts2 Testing contextConfigLocation /WEB-INF/applicationContext*.xml org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG /WEB-INF/tiles.xml struts2 org.apache.struts2.dispatcher.FilterDispatcher actionPackages user.actions struts2 /* org.springframework.web.context.ContextLoaderListener org.apache.struts2.tiles.StrutsTilesListener begin.jsp (2) struts.xml ... ... welcome (3) tiles.xml (4) jsp file "> Tile example1 (5) baseLayout.jsp hello world - 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
Modifying action mapping per device type
Hi, I am wanting to implement a site such that some actions may have a different mapping depending upon the device used (e.g. regular browser / mobile device etc.) but what I don't want to do is have to litter my actions with this type of logic. It could be at the result mapping level (i.e. in struts.xml) such that say a result of success would map to a jsp of somePage.jsp for regular browsers and somePageMobile.jsp for a mobile device (there will be more complications to this as I'd like to be able to have fine grained control based on the user agent so there may be many versions of a jsp such as somePageWinMobile6_5_htc.jsp). There are couple of ways I can think of to do this, but they're ugly: - JSP level logic to render the page differently - dont want it, I'd rather individual jsp's for each supported device (or family) as this allows developers who are working on targeting a site to a specific device to concentrate on that device. - Tiles template level logic - again not ideal as I would like to be able to use specific templates for device types. Better but not perfect would be some sort of post action result modifying interceptor such that in the struts.xml I could define a number of different result mappings such as success, success_winmob, success_blackberry_storm and have the result string that has been returned from the action (success) modified by some sort of interceptor (e.g. appending the suffix prior to struts mapping it off to a view) - the filter itself could be configured as to whether or not to alter result strings based on the action and the user device. - Is it possible to modify the result string post action but prior to struts resolving the mapping? And if so would I have access to the the name of the action? Any suggestions here are greatly appreciated! Web technologies being used are Struts2, Tiles2 and JSP. Regards, Marcus - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: I18nInterceptor / request_locale not working as expected [INVALID/SOLVED]
I beg your pardon for spamming. I'm mixing JSTL/Struts2 and my i18n messages are generated using JSTL. JSTL uses a java.util.Locale Object stored in the session via key "javax.servlet.jsp.jstl.fmt.locale". While Struts2 uses it's own key. Now using the JSTL key to stuff the current locale into and everything is fine. So long, Stephan Am 28.01.2010 um 20:07 schrieb Stephan R. Mueller: > Hi list, > > I'm using struts 2.1.8 with JDK6 > > I've Message.properties | Message_de_DE.properties > and Message_en_US.properties. > > When switching the local via a browser plugin everything > works fine and I can see that Session.WW_TRANS_I18N_LOCALE > contains the expected locale (de_DE or en_US). > Now I've added a languages.jsp that contains 2 links > Constructed like this: > >en_US > >English > > > >de_DE > >Deutsch > > When using one of these links I can see that > Session.WW_TRANS_I18N_LOCALE changes it's value > accordingly but the displayed language stays the same and > doesn't change. > languages.jsp uses an action like the following: > --snip- > public class LanguagesShowAction extends ActionSupport implements > ServletRequestAware { > > HttpServletRequest request; > private Map application; > private Map session; > > public String execute() { > > application = ActionContext.getContext().getApplication(); > session = ActionContext.getContext().getSession(); > session.put("referer", "languages"); > > String localeParam = request.getParameter("request_locale"); > > System.out.println("localeParam = " + localeParam); > > if (localeParam != null && !localeParam.isEmpty()) { > return "localeChngd"; //used to redirect to another jsp > } > System.out.println("loading languages page"); > return SUCCESS; > ---snap--- > > Any ideas on what I may have done wrong? > Additional info needed? > > Regards, > Stephan > - > 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: Modifying action mapping per device type
How about using different packages/namespaces for the views? /bb/index.jsp /wm/index.jsp 2010/1/28 Marcus Bond : > Hi, > > I am wanting to implement a site such that some actions may have a different > mapping depending upon the device used (e.g. regular browser / mobile device > etc.) but what I don't want to do is have to litter my actions with this > type of logic. It could be at the result mapping level (i.e. in struts.xml) > such that say a result of success would map to a jsp of somePage.jsp for > regular browsers and somePageMobile.jsp for a mobile device (there will be > more complications to this as I'd like to be able to have fine grained > control based on the user agent so there may be many versions of a jsp such > as somePageWinMobile6_5_htc.jsp). > > There are couple of ways I can think of to do this, but they're ugly: > - JSP level logic to render the page differently - dont want it, I'd rather > individual jsp's for each supported device (or family) as this allows > developers who are working on targeting a site to a specific device to > concentrate on that device. > - Tiles template level logic - again not ideal as I would like to be able to > use specific templates for device types. > > Better but not perfect would be some sort of post action result modifying > interceptor such that in the struts.xml I could define a number of different > result mappings such as success, success_winmob, success_blackberry_storm > and have the result string that has been returned from the action (success) > modified by some sort of interceptor (e.g. appending the suffix prior to > struts mapping it off to a view) - the filter itself could be configured as > to whether or not to alter result strings based on the action and the user > device. - Is it possible to modify the result string post action but prior > to struts resolving the mapping? And if so would I have access to the the > name of the action? > > Any suggestions here are greatly appreciated! > Web technologies being used are Struts2, Tiles2 and JSP. > > Regards, > Marcus > > - > 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: Modifying action mapping per device type
> There are couple of ways I can think of to do this, but they're ugly: > - JSP level logic to render the page differently - dont want it, I'd > rather individual jsp's for each supported device (or family) as this > allows developers who are working on targeting a site to a specific > device to concentrate on that device. > - Tiles template level logic - again not ideal as I would like to be > able to use specific templates for device types. As you rightly say, this is a maintenance nightmare. > > Better but not perfect would be some sort of post action result > modifying interceptor such that in the struts.xml I could define a > number of different result mappings such as success, success_winmob, > success_blackberry_storm and have the result string that has been > returned from the action (success) modified by some sort of interceptor > (e.g. appending the suffix prior to struts mapping it off to a view) - > the filter itself could be configured as to whether or not to alter > result strings based on the action and the user device. - Is it possible > to modify the result string post action but prior to struts resolving > the mapping? And if so would I have access to the the name of the action? > You can attach PreResultListeners[1] onto interceptor & action stack executions. These execute after an action is executed, but before the result is rendered. At this point, you are free to reach in and fiddle with the action's returned result code. You can get the action's name if you require, and manipulate the action in any way - it can be fetched from the ActionInvocation. I've used this feature in the past to perform a final "security checkpoint" on any item being pulled from a database - the PreResultListener examines the action (by reflection or otherwise) to find the object, and checks the user is allowed to retrieve it. Your idea is probably the sanest way to do it. Write an interceptor[2] that gets the HttpRequest[3] object, and examines the user agent to determine what kind of device is making the request. Then it attaches an appropriate PreResultListener to the stack (for example, you could have individual subclasses for each device type, and maybe configure them with a string representing the version, which the PreResultListener uses in its internal logic). The PreResultListeners examine the action's result, and if it's success they modify it to success_devicetype_version, which corresponds to the JSP /WEB-INF/jsp/devicetype/version/success.jsp, for example. The only ugly part of this is you'll have lots of results defined for each action in struts.xml, but at least you have sane separation of your JSPs. HTH, Andy. [1] http://struts.apache.org/2.1.8.1/docs/can-we-access-an-actions-result.html [2] http://struts.apache.org/2.1.8.1/docs/interceptors.html [3] http://struts.apache.org/2.1.8.1/docs/how-can-we-access-the-httpservletrequest.html - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Different results with spring
Hello all, I have a problem when using spring and the spring aplication context. If I configure the action class directly from struts.conf, my action does just the correct behavior. (1) But if I configure the action in a spring file and in struts.conf put only the spring bean name everything gets piped to the input result (the prepare method is executed, but not the action method).(2) I would benefit if the second scenario worked, because in the spring configuration is quite complex and have more than one bean of the same type (1) (struts.conf) (2) (struts.conf) (spring.xml) I hope someone can help me Si quieres ser más positivo, pierde un electrón Miguel Ruiz Velasco Sobrino - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org