Re: LocaleProvder not unique
thank you, will look at it and report on dev On Wed, Mar 15, 2017, at 09:23, Lukasz Lenart wrote: > Christian > > Change is here https://github.com/apache/struts/pull/122 > > 2017-03-14 10:16 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>: > > Feel free to register an issue with your case > > > > 2017-03-14 10:13 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > >> Yes, actually I think you are right: LocaleProvider and TextProvider > >> have both the same issue. It's just popping up for me with > >> LocaleProvider first, but TextProvider will surely follow. > >> > >> I try to read more dev list again, so feel free to ping me whenever you > >> want me to test/help > >> > >> On Tue, Mar 14, 2017, at 06:57, Lukasz Lenart wrote: > >>> https://issues.apache.org/jira/browse/WW-4756 > >>> > >>> I know that this is for TextProvider but the same approach I can use > >>> for LocaleProvider > >>> > >>> 2017-03-14 6:53 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>: > >>> > 2017-03-13 21:51 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > >>> >> OK, using component scan i had success with using DefaultLocaleProvider > >>> >> as default in my applicationContext.xml: > >>> >> >>> >> class="com.opensymphony.xwork2.DefaultLocaleProvider" primary="true" /> > >>> >> > >>> >> (mind the primary) > >>> >> > >>> >> So far it makes halfway sense to me. A few tests fail still because > >>> >> they > >>> >> access getText and do no receive a context. Digging into this > >>> > > >>> > Hmm... I think I see your point and this is somehow aligned with what > >>> > I want to do with TextProvider layer. I mean, there is already a > >>> > TextProviderFactory that is used to create custom TextProviders so I > >>> > think I will used instead of TextProvider to inject as a dependency. > >>> > This will allow to have TextProvider implemented by the ActionSupport > >>> > and use TextProviderFactory as a dependency and there be type > >>> > conflicts. > >>> > > >>> > Here is a first step to do so > >>> > https://github.com/apache/struts/pull/121 > >>> > > >>> > I will start another PR soon to replace TextProvider with > >>> > TextProviderFactory, if you could test this approach it would be cool > >>> > :) > >>> > > >>> > > >>> > Regards > >>> > -- > >>> > Łukasz > >>> > + 48 606 323 122 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 > >> > > - > 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: LocaleProvder not unique
Yes, actually I think you are right: LocaleProvider and TextProvider have both the same issue. It's just popping up for me with LocaleProvider first, but TextProvider will surely follow. I try to read more dev list again, so feel free to ping me whenever you want me to test/help On Tue, Mar 14, 2017, at 06:57, Lukasz Lenart wrote: > https://issues.apache.org/jira/browse/WW-4756 > > I know that this is for TextProvider but the same approach I can use > for LocaleProvider > > 2017-03-14 6:53 GMT+01:00 Lukasz Lenart <lukaszlen...@apache.org>: > > 2017-03-13 21:51 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > >> OK, using component scan i had success with using DefaultLocaleProvider > >> as default in my applicationContext.xml: > >> >> class="com.opensymphony.xwork2.DefaultLocaleProvider" primary="true" /> > >> > >> (mind the primary) > >> > >> So far it makes halfway sense to me. A few tests fail still because they > >> access getText and do no receive a context. Digging into this > > > > Hmm... I think I see your point and this is somehow aligned with what > > I want to do with TextProvider layer. I mean, there is already a > > TextProviderFactory that is used to create custom TextProviders so I > > think I will used instead of TextProvider to inject as a dependency. > > This will allow to have TextProvider implemented by the ActionSupport > > and use TextProviderFactory as a dependency and there be type > > conflicts. > > > > Here is a first step to do so > > https://github.com/apache/struts/pull/121 > > > > I will start another PR soon to replace TextProvider with > > TextProviderFactory, if you could test this approach it would be cool > > :) > > > > > > Regards > > -- > > Łukasz > > + 48 606 323 122 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
Re: LocaleProvder not unique
OK, using component scan i had success with using DefaultLocaleProvider as default in my applicationContext.xml: (mind the primary) So far it makes halfway sense to me. A few tests fail still because they access getText and do no receive a context. Digging into this On Mon, Mar 13, 2017, at 20:44, Christian Grobmeier wrote: > > > On Mon, Mar 13, 2017, at 19:08, Lukasz Lenart wrote: > > 2017-03-13 19:03 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > > > Wether @Service was right or not, I need to somehow tell Spring how to > > > find my beans (i.e. @Component). > > > I can understand Springs confusion, when it realizes every Action is a > > > LocaleProvider. > > > > > > Is there any best practice? > > > > Struts will delegate creation of any object to Spring, if Spring fails > > it will fall back to Struts ObjectFactory to create the object. So as > > far I know, Spring should be able create an object from a class with > > default constructor implemented. > > Sure, but if you use the Spring component scanner, we are back to the > problem I was running into earlier. Because if I am not having an > annotation, it's not picked up by Spring, but by Struts, which returns > it to Spring. Standard testing is very difficult. > > > > > > > > Regards > > -- > > Łukasz > > + 48 606 323 122 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 > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: LocaleProvder not unique
On Mon, Mar 13, 2017, at 19:08, Lukasz Lenart wrote: > 2017-03-13 19:03 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > > Wether @Service was right or not, I need to somehow tell Spring how to > > find my beans (i.e. @Component). > > I can understand Springs confusion, when it realizes every Action is a > > LocaleProvider. > > > > Is there any best practice? > > Struts will delegate creation of any object to Spring, if Spring fails > it will fall back to Struts ObjectFactory to create the object. So as > far I know, Spring should be able create an object from a class with > default constructor implemented. Sure, but if you use the Spring component scanner, we are back to the problem I was running into earlier. Because if I am not having an annotation, it's not picked up by Spring, but by Struts, which returns it to Spring. Standard testing is very difficult. > > > Regards > -- > Łukasz > + 48 606 323 122 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
Re: LocaleProvder not unique
Sorry, one more thing. With removing the @Service annotation I delegated the instantiation of the Actions to Struts as the Spring component scanner will not find my Bean no more. Struts - to my knowledge - will somehow create the bean using Spring too. The problem to use the applicationContext outside the web environment, i .e. test cases. Wether @Service was right or not, I need to somehow tell Spring how to find my beans (i.e. @Component). I can understand Springs confusion, when it realizes every Action is a LocaleProvider. Is there any best practice? On Mon, Mar 13, 2017, at 18:29, Christian Grobmeier wrote: > > > On Mon, Mar 13, 2017, at 18:26, Lukasz Lenart wrote: > > 2017-03-13 17:55 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > > > Removing @Service helped. In addition I had to remove the remaining > > > Actions from applicationContext.xml (I am in the middle of a > > > transition). > > > > > > It's kind a weird, because it worked with the previous version of > > > Struts. Was there a change in the injection behavior? I am glad I know > > > about @Service yet, but still, I would love to know. > > > > No, it isn't related to an injection mechanism, I mean there was no > > change as far I know. Basically defining actions as services is a bad > > idea - actions should be clients for services not to provide them. As > > ActionSupport implements LocaleProvider by default it means it can be > > injected in any bean that requires it (e.g. I18NInterceptor). > > > > I am not sure why it worked before, LocaleProvider is there for a bit > > and it's used in few places but since 2.5.5 is also used in the > > interceptor https://issues.apache.org/jira/browse/WW-4677 - maybe > > that's the case. > > Got it, thank you a lot. > > Christian > > > > > > > Regards > > -- > > Łukasz > > + 48 606 323 122 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 > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: LocaleProvder not unique
On Mon, Mar 13, 2017, at 18:26, Lukasz Lenart wrote: > 2017-03-13 17:55 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > > Removing @Service helped. In addition I had to remove the remaining > > Actions from applicationContext.xml (I am in the middle of a > > transition). > > > > It's kind a weird, because it worked with the previous version of > > Struts. Was there a change in the injection behavior? I am glad I know > > about @Service yet, but still, I would love to know. > > No, it isn't related to an injection mechanism, I mean there was no > change as far I know. Basically defining actions as services is a bad > idea - actions should be clients for services not to provide them. As > ActionSupport implements LocaleProvider by default it means it can be > injected in any bean that requires it (e.g. I18NInterceptor). > > I am not sure why it worked before, LocaleProvider is there for a bit > and it's used in few places but since 2.5.5 is also used in the > interceptor https://issues.apache.org/jira/browse/WW-4677 - maybe > that's the case. Got it, thank you a lot. Christian > > > Regards > -- > Łukasz > + 48 606 323 122 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
Re: LocaleProvder not unique
Removing @Service helped. In addition I had to remove the remaining Actions from applicationContext.xml (I am in the middle of a transition). It's kind a weird, because it worked with the previous version of Struts. Was there a change in the injection behavior? I am glad I know about @Service yet, but still, I would love to know. Thanks Lukasz! On Mon, Mar 13, 2017, at 16:44, Christian Grobmeier wrote: > > > On Mon, Mar 13, 2017, at 16:31, Lukasz Lenart wrote: > > 2017-03-13 16:25 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > > > @Service > > > @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) > > > public class EmptyAction extends AbstractAction { > > > > Looks like you have turned each action in a bean. Can you drop > > @Service annotation? It's not needed, you should use @Service only for > > services that you want to inject into actions. > > I can try that. > > For the record, I just found out 2.5.5 is the first version of Struts > where my code stopped working. It's still working with 2.5.2 > > > > > > > Regards > > -- > > Łukasz > > + 48 606 323 122 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 > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: LocaleProvder not unique
On Mon, Mar 13, 2017, at 16:31, Lukasz Lenart wrote: > 2017-03-13 16:25 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > > @Service > > @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) > > public class EmptyAction extends AbstractAction { > > Looks like you have turned each action in a bean. Can you drop > @Service annotation? It's not needed, you should use @Service only for > services that you want to inject into actions. I can try that. For the record, I just found out 2.5.5 is the first version of Struts where my code stopped working. It's still working with 2.5.2 > > > Regards > -- > Łukasz > + 48 606 323 122 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
Re: LocaleProvder not unique
Sure. I use annotations, i. e.: @Service @Scope(value = ConfigurableBeanFactory.SCOPE_PROTOTYPE) public class EmptyAction extends AbstractAction { (AbstractAction extends ActionSupport) In applicationContext: I have used my own stack with: - The action config is still xml. like: /jsp/mysite.jsp It worked with 2.5.1, but no more with 2.5.10.1. Spring version is 4.1.6.RELEASE Thanks Lukasz! Christian On Mon, Mar 13, 2017, at 16:12, Lukasz Lenart wrote: > 2017-03-13 16:02 GMT+01:00 Christian Grobmeier <grobme...@apache.org>: > > Hello all, > > > > I trying to upgrade my Struts app from 2.5.1 to 2.5.10.1. > > > > I saw there are some changes in I18nInterceptor like that: > > https://github.com/apache/struts/commit/ea92e95461386f1ddfda37bb09ec170b8e306ae7#diff-f9eff9d34d35d47f349c7fa0531e51bdR130 > > > > My actions extend from ActionSupport, which is implementing > > LocaleProvider. > > I am also using Spring for DI. > > > > Unfortunately I now get this exception when starting the container: > > > > SpringObjectFactory- Error building bean > > org.springframework.beans.factory.UnsatisfiedDependencyException: Error > > creating bean with name > > 'org.apache.struts2.interceptor.I18nInterceptor': Unsatisfied dependency > > expressed through bean property 'localeProvider': : No qualifying bean > > of type [com.opensymphony.xwork2.LocaleProvider] is defined: expected > > single matching bean but found 95: emptyAction, ... > > > > It lists all my actions and it seems as Spring would try to instantiate > > I18nInterceptor after my actions. > > > > Does anybody else experience that or got an idea how to improve my code? > > This is strange, can you share how did you setup your actions in > struts.xml? > > > Regards > -- > Łukasz > + 48 606 323 122 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
LocaleProvder not unique
Hello all, I trying to upgrade my Struts app from 2.5.1 to 2.5.10.1. I saw there are some changes in I18nInterceptor like that: https://github.com/apache/struts/commit/ea92e95461386f1ddfda37bb09ec170b8e306ae7#diff-f9eff9d34d35d47f349c7fa0531e51bdR130 My actions extend from ActionSupport, which is implementing LocaleProvider. I am also using Spring for DI. Unfortunately I now get this exception when starting the container: SpringObjectFactory- Error building bean org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.apache.struts2.interceptor.I18nInterceptor': Unsatisfied dependency expressed through bean property 'localeProvider': : No qualifying bean of type [com.opensymphony.xwork2.LocaleProvider] is defined: expected single matching bean but found 95: emptyAction, ... It lists all my actions and it seems as Spring would try to instantiate I18nInterceptor after my actions. Does anybody else experience that or got an idea how to improve my code? Thanks Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Munich: Free Struts talk in JUGM
Hey folks, if you live near Munich, you are welcome to join the talk of Struts Committer Christoph Nenning on 25.08.! He is usually a bit a shy guy so i am posting this so nobody misses it. Here is the full address of the location and the sponsor of this talk: mgm technology partners - Frankfurter Ring 105a - D-80807 München - 3. OG - 19:00 Uhr The title of the talk is Struts is not dead (translated) so this is the ideal time to ask a lot of nasty questions to Christoph. Regards, Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Apple sec breach.. Struts?
On Fri, Aug 2, 2013 at 7:01 AM, Jim Macalister jimmacalis...@gmail.com wrote: To get to my point. Struts2 is a great framework and we do use it for production systems. I think we should all contribute at least by donating directly to the struts2 developers. This will ensure the life of the project as well. I suggest that the core developers should be compensated for their efforts and i am willing to donate with no contract. I am sure this will free the developers from other tasks. Please set up a mechanism for us to donate. Thanks Jim. Within the ASF we only provide a mechanism to donate to the ASF itself. All projects will benefit from it. See: http://www.apache.org/foundation/contributing.html If you would like to support individual developers then currently you need to contact them directly or check out their websites if they accept donations. Also sometimes we run small community events, like the Strutsathon: http://strutsathon.opensource.io At this event, 4 committers of Struts are participating and travel on own cost. You can of course donate here too to reduce traveling cost or for dinner. Cheers, Christian Regards On Wed, Jul 31, 2013 at 5:30 PM, Paul Benedict pbened...@apache.org wrote: I'll voice my personal opinion. No matter what framework you choose (Struts, MyFaces, Tapestry, etc.), it is the responsibility of all IT shops to do a security vulnerability assessment before first releasing to production and after each update. That is Security 101 because there are multitude of attack vectors that can be exploited through any inadvertent mistake here and there. Sometimes the mistake will be in your code, sometimes it will be in third party dependencies, but you own the final product so you must take responsibility for the entire product. Did a company like Apple, who sits on billions of cash, do that? I don't know. I hope they did because that would be performing due diligence. They are not poor by any means. I'll hope for the best here. Lastly, it cannot be ignored that Struts is a free product built by volunteers. The work done here is long, arduous, and passionate -- and on a budget of $0. There is no money coming in to fund anything expensive. Unlike some other Apache projects where corporations (like IBM) are funding development, no one is funding Struts. You get the best that volunteers can do without them receiving a dime. The obvious implication is that you, who consume volunteer work for free, must take the product as is and do your part of making sure your application is secure. PS: If you find a security vulnerability in Struts, please privately report it to secur...@apache.org so it can be fixed. Cheers, Paul -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: missing action
I am not familiar with the Run As options of the IDE as I use command line for such tasks, but basically you are expected to create a war file and deploy it to your container when something changes. Personally I am using the mvn jetty plugin and Jrebel (when doing open source work) for that. Can you check if the class file is actually existent in your container? Also you try to re-create a war file and see if it works. Cheers On Wed, Jul 31, 2013 at 4:10 AM, Tommy Pham tommy...@gmail.com wrote: Hi Dave, I right click on the project Run As Run on server. It worked OK when for the previous tutorial: http://struts.apache.org/release/2.3.x/docs/create-struts-2-web-application-using-maven-to-manage-artifacts-and-to-build-the-application.html Am I supposed to build a war and deploy it that way even though I have Tomcat on my dev system? Thanks, Tommy On Tue, Jul 30, 2013 at 6:43 PM, Dave Newton davelnew...@gmail.com wrote: How are you deploying the app? On Jul 30, 2013 6:28 PM, Tommy Pham tommy...@gmail.com wrote: Hi, I'm trying to follow the tutorial: http://struts.apache.org/release/2.3.x/docs/hello-world-using-struts-2.html to create a Struts 2 application with maven and eclipse but encountering a 404 error with missing action with this error in the console: Jul 30, 2013 3:24:41 PM com.opensymphony.xwork2.util.logging.jdk.JdkLogger error SEVERE: Dispatcher initialization failed Unable to load configuration. - action - file:/D:/data/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/sample_app/WEB-INF/classes/struts.xml:17:80 at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:70) at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:446) at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:490) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281) at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:262) at org.apache.catalina.core.ApplicationFilterConfig.init(ApplicationFilterConfig.java:107) at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4746) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5399) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559) at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) at java.util.concurrent.FutureTask.run(Unknown Source) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: Action class [org.apache.struts.tutorial.action.HelloWorldAction] not found - action - file:/D:/data/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/sample_app/WEB-INF/classes/struts.xml:17:80 at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.verifyAction(XmlConfigurationProvider.java:482) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addAction(XmlConfigurationProvider.java:426) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.addPackage(XmlConfigurationProvider.java:552) at com.opensymphony.xwork2.config.providers.XmlConfigurationProvider.loadPackages(XmlConfigurationProvider.java:292) at org.apache.struts2.config.StrutsXmlConfigurationProvider.loadPackages(StrutsXmlConfigurationProvider.java:112) at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reloadContainer(DefaultConfiguration.java:250) at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:67) ... 17 more Jul 30, 2013 3:24:41 PM org.apache.catalina.core.StandardContext filterStart SEVERE: Exception starting filter struts2 Unable to load configuration. - action - file:/D:/data/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/sample_app/WEB-INF/classes/struts.xml:17:80 at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:502) at org.apache.struts2.dispatcher.ng.InitOperations.initDispatcher(InitOperations.java:74) at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.init(StrutsPrepareAndExecuteFilter.java:57) at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:281) at
Re: Apple sec breach.. Struts?
I read that. I don't think we should do anything. The blog post is speculative. Nobody from Apple did tell us if it was really a Struts problem or not. If it is, then well, we can't do anything. This doesn't make Struts a dangerous framework at all, it just highlights you should update when your framework provider recommends it. It also highlights we are taking security issues serious. Also it should be mentioned that no company (to my knowledge) is in any way supporting the development of Struts. Apple got a lot of money, they could fund the development of the framework of their choice. At least they should be able to roll out new security patches. Maybe others think different, but except with continuing to improve struts, we cannot do anything bout it. On Wed, Jul 31, 2013 at 2:13 PM, Frans Thamura fr...@meruvian.org wrote: Anyone read this? http://java.dzone.com/articles/was-struts-responsible-apples How we handle this? F -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Changing locale for any current request
Have you tried request only for these links? See: http://struts.apache.org/release/2.3.x/docs/i18n-interceptor.html basically using foo.action?request_only_locale=en_US your locale would not be stored in the session, it's just for this request On Thu, Jul 25, 2013 at 10:15 AM, Antonio Sánchez juntandolin...@gmail.com wrote: I will include a header in all pages that displays links for translating current page (at any moment) to different locales. Something like: ES | EN | IT These links will render current page (query, action... ) in the requested locale. How is this usually performed? I guess I must remember all requests performed and use it to render the links. Is this correct? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Struts Hackathon in Germany
Hello all, I would like to invite you to a Struts Hackathon in Augsburg, Germany. The Hackathon is free, thanks to our sponsor of GFU. GFU provides a lot of great trainings. Please see more information here: http://strutsathon.opensource.io/ If you would like to join us, please let us know. There are currently 4 Struts PMC members confirmed to show up there. Our goal is to make Struts better and to help newcomers to work on Struts directly. If any questions, feel free to ping me directly or on this list. Thanks! Christian -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: ServletResponseAware - request can be null?
On Mon, Jul 8, 2013 at 9:42 PM, Paul Benedict pbened...@apache.org wrote: Do this test. Put a breakpoint in the setter that is storing the response. You either have the case where the interceptor is not being fired (and thus your method is not being called) or you have found a null somehow being passed in. I bet the former is the case, but you'll have to test to find out. I actually did this. Locally it is always there. But in production it is null sometimes. I cannot debug there, but for some reason i decided to make a log.warn when it is happening. I didn't expect it to happen, but it does. I am going to read the interceptor code... On Mon, Jul 8, 2013 at 2:38 PM, Lukasz Lenart lukaszlen...@apache.orgwrote: 2013/7/5 Christian Grobmeier grobme...@gmail.com: I am implementing the ServletResponseAware interface and found out that sometimes the HttpServletResponse is null when I execute() the action. ServletConfigInterceptor is definitely executed before. Actually often the HttpServletResponse is not null and my code seems to work. Not sure if I should worry about that or not. Any ideas under which conditions the HttpServletResponse can be null (in a Struts 2 application, recent version)? Hm... this is strange, I thought Response should always be available Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
ServletResponseAware - request can be null?
Hi, I am implementing the ServletResponseAware interface and found out that sometimes the HttpServletResponse is null when I execute() the action. ServletConfigInterceptor is definitely executed before. Actually often the HttpServletResponse is not null and my code seems to work. Not sure if I should worry about that or not. Any ideas under which conditions the HttpServletResponse can be null (in a Struts 2 application, recent version)? Thanks! Christian -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: angularjs and struts action result
On Thu, Feb 21, 2013 at 8:03 AM, Lukasz Lenart lukaszlen...@apache.org wrote: 2013/2/20 Frans Thamura fr...@meruvian.org: anyone working with struts2 action result (#name etc) and integrate with angularjs AngularJS expects JSON via REST so everything is already supported by Struts2 I did that recently with my own app and it works perfectly. Except, that a REST style is not required (though its a good idea). You still can simply use basic Struts 2 and just use the JSON result type. All the Angular.js examples on my blog were created with a Struts 2 backend: http://www.grobmeier.de/all-posts-from-this-blog Cheers Regards -- Łukasz + 48 606 323 122 http://www.lenart.org.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Java security issue vs. struts?
On Wed, Jan 16, 2013 at 11:12 PM, Emi Lu em...@encs.concordia.ca wrote: On 01/16/2013 05:02 PM, Chris Pratt wrote: I believe the description says it all. This Security Alert addresses security issues CVE-2013-0422 (US-CERT Alert TA13-010A - Oracle Java 7 Security Manager Bypass Vulnerability) and another vulnerability affecting Java running in web browsers. *These vulnerabilities are not applicable to Java running on servers,* standalone Java desktop applications or embedded Java applications. They also do not affect Oracle server-based software. Thank you Chris. Moreover, if I call jfreechart to generate reports through web applications, it will not be affected, I believe? As long as you do not use Applets to output JFreechart data you should be fine (saying: if you generate images with JFreechart) Emi On Wed, Jan 16, 2013 at 1:54 PM, Emi Lu em...@encs.concordia.ca mailto:em...@encs.concordia.ca wrote: Hello, Does someone know how this java security issue related to struts framework? http://www.oracle.com/__technetwork/topics/security/__alert-cve-2013-0422-1896849.__html http://www.oracle.com/technetwork/topics/security/alert-cve-2013-0422-1896849.html Thanks a lot! Emi --__--__- To unsubscribe, e-mail: user-unsubscribe@struts.__apache.org mailto:user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org mailto:user-h...@struts.apache.org -- Emi Lu, ENCS, Concordia University, Montreal H3G 1M8 em...@encs.concordia.ca+1 514 848-2424 x5884 - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 Plugin for Netbeans
I have tried Eclipse and Netbeans and finally found out that life is so freaking easy with IntelliJ and the Struts 2 plugin. I could not believe it first, because it was the Struts-guys who recommended it to me and I was previously using Eclipse for 10 years or so. My advice: do exactly what Lukasz said. If you want to have some great support for your struts 2 dev, go with IntelliJ and forget Eclipse and Netbeans. On Fri, Apr 20, 2012 at 4:20 AM, Frans Thamura fr...@meruvian.org wrote: as a eclipse user. :) any idea? F On Fri, Apr 20, 2012 at 1:19 AM, Łukasz Lenart lukasz.len...@googlemail.com wrote: 2012/4/19 rob stone floripa...@gmail.com: I am trying to incorporate the Struts 2 plug-in into the Netbeans IDE and having problems. The Netbeans version is 7.0.1 which is the latest available for Debian. Use IntelliJ IDEA, give up with NB ;-) Kind regards -- Łukasz http://www.lenart.org.pl/ mobile +48 606 323 122, office +27 11 0838747 Warszawa JUG conference - Confitura http://confitura.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts/CMS/Drupal
Tony, can Drupal consume json data easily? You probably can use Struts as some kind of data layer which delivers only json data. You might want to look at Quercus: http://quercus.caucho.com/ Quercus is a Java implementation of PHP. It might serve Drupal, and this way you might have a chance to access Java Klasses from PHP. But you will still loose JSP et al - this would be a php domain then. If using Quercus I can only recommend using the whole Resin server... while Quercus might run on other servers, it is a bit pita to get it running there. Cheers Christian On Thu, Mar 29, 2012 at 8:07 PM, Santinello, Anthony anthony.santine...@experian.com wrote: Hi.. Wonder if I can get some advice/suggestions.. Has anyone used Drupal and Struts together? Drupal is a CMS for managing content/web features. I have a user that wants to use Drupal. Our application uses Struts; anyway to combine the two. Pretty much using Drupal as the View? Any ideas how to do so? I was thinking about Struts pointing to PHP; but then you lose the power of JSP/JSTL/Forms/etc? If not does anyone know of a CMS that integrates easily with struts? Thanks, Tony -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts/CMS/Drupal
On Thu, Mar 29, 2012 at 8:32 PM, Santinello, Anthony anthony.santine...@experian.com wrote: The only way I see it possibly working is having PHP making calls to the back-end logic via some web-service? And try to re-use the code/business logic we used for Struts? Thats possible, if you don't use tools like Quercus. You can use the JSON Plugin for that. Its bundled http://struts.apache.org/2.3.1.2/docs/json-plugin.html Or you use this plugin: https://github.com/grobmeier/jjson Cheers Might be way off on this? -Original Message- From: Dave Newton [mailto:davelnew...@gmail.com] Sent: Thursday, March 29, 2012 1:17 PM To: Struts Users Mailing List Subject: Re: Struts/CMS/Drupal Define integrates; Alfresco has a pretty flexible API. Using Drupal and Struts together seems a bit nonsensical to me, but I'm not familiar with its API (or if it has one). Bear in mind that even without an API you can always just make requests, or wrap its DB, or... Dave On Thu, Mar 29, 2012 at 2:07 PM, Santinello, Anthony anthony.santine...@experian.com wrote: Hi.. Wonder if I can get some advice/suggestions.. Has anyone used Drupal and Struts together? Drupal is a CMS for managing content/web features. I have a user that wants to use Drupal. Our application uses Struts; anyway to combine the two. Pretty much using Drupal as the View? Any ideas how to do so? I was thinking about Struts pointing to PHP; but then you lose the power of JSP/JSTL/Forms/etc? If not does anyone know of a CMS that integrates easily with struts? Thanks, Tony - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts/CMS/Drupal
On Thu, Mar 29, 2012 at 8:39 PM, Santinello, Anthony anthony.santine...@experian.com wrote: Christian -- I'll have to check it out some more. I have heard of quercus as a possible option. Just have to try it. So..Struts would call PHP pages using quercus instead of JSP pages? Or it sounds like what your saying is the PHP would make requests to Struts that would do the business logic and return data(json/xml) to the PHP to process; am I close? But it sounds like I would lose the dynamic nature of JSP pages? In the Quercus case: Web Request - Drupal/PHP - Struts classes You would be able to reuse you java classes, but you also might loose the Struts interceptor stack. In JSON/Rest case: Web Request - Drupal/PHP - web request- Struts action You would keep your Struts interceptors here. And you have not the pain with Quercus (which can be complex sometimes) The problem is, Drupal does use its own database with content. You would have to work that all up and redirect to Struts. To be honest, this all is pretty challenging. My guess is, if you use Drupal for CMS work, then you will not manage to get the Data to your Struts app without pain. You have only a serious chance if struts delivers business data (facts, user data whatever) and Drupal manages the CMS stuff. But then you have two databases Guess you'll have a lot of fun pretty soon. Thanks for you help. -- Tony -Original Message- From: Christian Grobmeier [mailto:grobme...@gmail.com] Sent: Thursday, March 29, 2012 1:20 PM To: Struts Users Mailing List Subject: Re: Struts/CMS/Drupal Tony, can Drupal consume json data easily? You probably can use Struts as some kind of data layer which delivers only json data. You might want to look at Quercus: http://quercus.caucho.com/ Quercus is a Java implementation of PHP. It might serve Drupal, and this way you might have a chance to access Java Klasses from PHP. But you will still loose JSP et al - this would be a php domain then. If using Quercus I can only recommend using the whole Resin server... while Quercus might run on other servers, it is a bit pita to get it running there. Cheers Christian On Thu, Mar 29, 2012 at 8:07 PM, Santinello, Anthony anthony.santine...@experian.com wrote: Hi.. Wonder if I can get some advice/suggestions.. Has anyone used Drupal and Struts together? Drupal is a CMS for managing content/web features. I have a user that wants to use Drupal. Our application uses Struts; anyway to combine the two. Pretty much using Drupal as the View? Any ideas how to do so? I was thinking about Struts pointing to PHP; but then you lose the power of JSP/JSTL/Forms/etc? If not does anyone know of a CMS that integrates easily with struts? Thanks, Tony -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Current status in testing with struts2, spring3 +junit 4?
2012/3/20 Łukasz Lenart lukasz.len...@googlemail.com: As I see there is a small mess with the test classes. Struts 2 has three StrutsTestCase classes, in core in junit plugin and in testng plugin. It would be nice to clean them up. Remove StrutsTestCase from core and two other StrutsTestCase classes rename accordingly, Also adding support for the Convention plugin for both. Thoughts ? Very much +1. I am currently very busy, but I am willing to support this. But I will take me a while to get some free slots. Besides what you said, I have seen there is a one testcase - one action restriction. I think this should be removed too I have already looked into that, but didn't succeed with a solution. Cheers Christian Regards -- Łukasz http://www.lenart.org.pl/ mobile +48 606 323 122, office +27 11 0838747 Warszawa JUG conference - Confitura http://confitura.pl/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Advice needed: Offline Struts App
Hi, yes I know Struts 2 is a web framework. But recently somebody told me he would love to see a desktop version of my app instead of a cloud based version. I think this would be great for me too. Now I am considering different ways... not sure, probably somebody here already did the same in the past. I mean, many of the interceptors are probably not necessary in a desktop app. My Action are there - I could use them straightaway without interceptors (or some other great features of Struts). Basically I would just need to replace my HTML/JS frontend with something else, probably JavaFX. Anybody around who had a similar job with S2 in the past? Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Advice needed: Offline Struts App
the customers for my apps are mostly non-techies... I am afraid they will fail without having an exe file/jar file/app file. have you managed that? On Thu, Mar 15, 2012 at 4:29 PM, Frans Thamura fr...@meruvian.org wrote: put the tomcat or jetty as services to make it standalone apps, execute using localhost that is the way i use it here F On Thu, Mar 15, 2012 at 10:25 PM, Christian Grobmeier grobme...@gmail.com wrote: Hi, yes I know Struts 2 is a web framework. But recently somebody told me he would love to see a desktop version of my app instead of a cloud based version. I think this would be great for me too. Now I am considering different ways... not sure, probably somebody here already did the same in the past. I mean, many of the interceptors are probably not necessary in a desktop app. My Action are there - I could use them straightaway without interceptors (or some other great features of Struts). Basically I would just need to replace my HTML/JS frontend with something else, probably JavaFX. Anybody around who had a similar job with S2 in the past? Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Advice needed: Offline Struts App
thanks - i will evaluate that On Thu, Mar 15, 2012 at 4:33 PM, Frans Thamura fr...@meruvian.org wrote: you can use izpack F On Thu, Mar 15, 2012 at 10:31 PM, Christian Grobmeier grobme...@gmail.com wrote: the customers for my apps are mostly non-techies... I am afraid they will fail without having an exe file/jar file/app file. have you managed that? On Thu, Mar 15, 2012 at 4:29 PM, Frans Thamura fr...@meruvian.org wrote: put the tomcat or jetty as services to make it standalone apps, execute using localhost that is the way i use it here F On Thu, Mar 15, 2012 at 10:25 PM, Christian Grobmeier grobme...@gmail.com wrote: Hi, yes I know Struts 2 is a web framework. But recently somebody told me he would love to see a desktop version of my app instead of a cloud based version. I think this would be great for me too. Now I am considering different ways... not sure, probably somebody here already did the same in the past. I mean, many of the interceptors are probably not necessary in a desktop app. My Action are there - I could use them straightaway without interceptors (or some other great features of Struts). Basically I would just need to replace my HTML/JS frontend with something else, probably JavaFX. Anybody around who had a similar job with S2 in the past? Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Advice needed: Offline Struts App
On Thu, Mar 15, 2012 at 5:11 PM, Hantsy Bai han...@gmail.com wrote: I suggest you use other framework such as Stripes, Spring MVC instead of Struts1/2.x. Struts development progress is too slow, after three years of Spring MVC jsr 330 support, struts 2 begin to support it, and Struts 2 still does not support jsr 303 officially, and REST support is also not good as Spring MVC etc. Of course, personally I like component/event based framework such as JSF/Wicket. Thanks Hantsy, but my web app is already done in S2 and I am very happy with it. I have tried Wicket and its really not my cup of tea. I even tried Spring MVC, but i don't like it very much too. I just need a chance to reuse my code for an offline-app. Regards Hantsy On 3/15/2012 23:37, Frans Thamura wrote: an interesting in manage engine, try it, installer with encrypted mysql, struts2 app F On Thu, Mar 15, 2012 at 10:35 PM, Christian Grobmeier grobme...@gmail.com wrote: thanks - i will evaluate that On Thu, Mar 15, 2012 at 4:33 PM, Frans Thamurafr...@meruvian.org wrote: you can use izpack F On Thu, Mar 15, 2012 at 10:31 PM, Christian Grobmeier grobme...@gmail.com wrote: the customers for my apps are mostly non-techies... I am afraid they will fail without having an exe file/jar file/app file. have you managed that? On Thu, Mar 15, 2012 at 4:29 PM, Frans Thamurafr...@meruvian.org wrote: put the tomcat or jetty as services to make it standalone apps, execute using localhost that is the way i use it here F On Thu, Mar 15, 2012 at 10:25 PM, Christian Grobmeier grobme...@gmail.com wrote: Hi, yes I know Struts 2 is a web framework. But recently somebody told me he would love to see a desktop version of my app instead of a cloud based version. I think this would be great for me too. Now I am considering different ways... not sure, probably somebody here already did the same in the past. I mean, many of the interceptors are probably not necessary in a desktop app. My Action are there - I could use them straightaway without interceptors (or some other great features of Struts). Basically I would just need to replace my HTML/JS frontend with something else, probably JavaFX. Anybody around who had a similar job with S2 in the past? Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Advice needed: Offline Struts App
On Thu, Mar 15, 2012 at 5:31 PM, Marcus Bond mar...@marcusbond.me.uk wrote: Do you mean that they wish to have it running locally or that they want to see a native UI application rather than a browser application? If it is the first scenario then why not simply give them a zipped up tomcat server with the web-app already deployed and either a script to run it or ask them to install it as a service. If you really need an installer then create one to do the same thing. In the latter case then you're going to need a lot of code, firstly for the UI and secondly to get all the data from UI components on to your actions. You would probably do better to just use your model and service layers from the web app ignoring the Struts side of things altogether. If you really need something in the future that would be relatively pain free to have both web app and desktop versions then perhaps take a look at Eclipse RCP and RAP.. whether the reality lives up to the dream though is an exercise for the reader :) Its actually the latter case :-) I thought I would reuse my action-classes, as they contain a good bunch of business logic. I think it is what you meant with service layer. My current plan is actually to let the Struts stuff go and replace the UI with JavaFX. It seems you are advising the same (or similar) :-) Cheers Christian M -Original Message- From: Christian Grobmeier [mailto:grobme...@gmail.com] Sent: 15 March 2012 15:26 To: Struts Users Mailing List Subject: Advice needed: Offline Struts App Hi, yes I know Struts 2 is a web framework. But recently somebody told me he would love to see a desktop version of my app instead of a cloud based version. I think this would be great for me too. Now I am considering different ways... not sure, probably somebody here already did the same in the past. I mean, many of the interceptors are probably not necessary in a desktop app. My Action are there - I could use them straightaway without interceptors (or some other great features of Struts). Basically I would just need to replace my HTML/JS frontend with something else, probably JavaFX. Anybody around who had a similar job with S2 in the past? Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Advice needed: Offline Struts App
On Thu, Mar 15, 2012 at 8:49 PM, Wes Wannemacher w...@wantii.com wrote: Christian, have you considered using XWork? Struts2 is basically a web implementation of the command pattern framework implemented by XWork. I worked on a project where I embedded XWork in a non-web-app and was very happy with it. Actually no, I didn't. But you are right, it might make sense to figure that out! If you have any more hints/links etc in that direction please let me know. What was your frontend technology? Swing? At the moment I need both, Web and the Non-Web features. Will try to see if I can separate these for my two apps. -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Advice needed: Offline Struts App
On Thu, Mar 15, 2012 at 9:44 PM, Brian Thompson elephant...@gmail.com wrote: Another option that might work for you is an Adobe AIR app. There's a sample AIR web browser app [1]; install that demo and test your S2 app in it. If it works out properly, you can embed your Tomcat stack in the AIR app [2] and customize the browser from the sample to interact with your embedded Tomcat instance. Interesting option. Not sure if I should cross the AIR path. But it lead me again to JavaFX: they have WebKit integrated (same as with AIR). Don't know if that works very well, but it is in Java, and that might have the benefit people don't need the AIR runtime in addition to Java. Anyway pretty cool links you sent, and definitely worth to consider. Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: 'Best' Struts Development Envirnoment?
I can agree on what has been said about IntelliJ. It took me one week to move over from Eclipse (speaking of getting your workflow back). But then I have improved my speed a lots. not only the S2 plugin is great, there are many other cool things, like for Android dev. And I was a long time eclipse user before. http://www.grobmeier.de/from-eclipse-to-intellij-idea-13102011.html On Tue, Jan 24, 2012 at 6:10 PM, Burton Rhodes burtonrho...@gmail.com wrote: I think this has been addressed before on this list, but I am wondering what you guys have found is the best environment to develop Struts. Currently I use Eclipse Indigo and don't really see any 'good' plugins. Since I use the XML method rather than annotations to map my actions, I find myself scrolling my incredibly long XML file to find the related action mappings. Surely there is a better way to do this? Also, a better auto complete feature for Struts tags in jsps would be nice. Am I willing to pay for software so I am not limited to eclipse for net beans. But the switch would need to offer a compelling reason to switch. Any advice would be welcome. Thanks, Burton -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Can't insert picture on a XSSFWorkbook
wrong list, use u...@poi.apache.org instead Cheers Christian On Fri, Jan 20, 2012 at 1:10 PM, Felipe Issa felipe.i...@simova.com.br wrote: Hi. I'm using apache poi 3.8 beta 5 (20111217) and i can't get it to insert a picture on a XSSFWorkbook. It works just fine when i try to insert it on a HSSFWorkbook, but when i change the type of the file it doesn't show anything on the sheet. Does anyone knows how to fix this? Is it a bug? Here is the code i'm using: public void insertPicture() throws Exception{ /* * 0 = HSSFWorkbook * anything else = XSSFWorkbook */ int type = 1; Workbook wb = null; if(type == 0){ wb = new HSSFWorkbook(); }else{ wb = new XSSFWorkbook(); } CreationHelper createHelper = wb.getCreationHelper(); StringBuffer sb = new StringBuffer(); sb.append(C:\\temp\\); File f = new File(sb.toString()); if (!f.isDirectory()) { f.mkdirs(); } String dataHoje = new SimpleDateFormat(-MM-dd_HH-mm-ss).format(Util.getCurrentDate()); sb.append(file_); sb.append(dataHoje); if(type == 0){ sb.append(.xls); }else{ sb.append(.xlsx); } File arquivo = new File(sb.toString()); if (!arquivo.exists()) { arquivo.createNewFile(); } FileOutputStream outputStream; Sheet sheet = null; try { outputStream = new FileOutputStream(arquivo); sheet = wb.createSheet(); Drawing patriarch= sheet.createDrawingPatriarch(); ClientAnchor anchor = createHelper.createClientAnchor(); anchor.setCol1(4); anchor.setCol2(4); anchor.setRow1(0); anchor.setRow2(0); anchor.setDx1(400); anchor.setDx2(655); anchor.setDy1(10); anchor.setDy2(200); anchor.setAnchorType(1); File pic = new File(C:\\Temp\\img_ok.png); long length = pic.length( ); byte[]picData = new byte[ ( int ) length ]; FileInputStream picIn = new FileInputStream( pic ); picIn.read(picData); int index = wb.addPicture(picData, wb.PICTURE_TYPE_PNG); patriarch.createPicture(anchor,index); wb.write(outputStream); outputStream.close(); } catch (Exception e) { throw e; } } Thanks in advice! - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de
Re: Mobile Device Support
Look at responsive CSS frameworks. Actually I would not put anything for this into struts code if possible, you should make it just a css/javascript only trick: http://idesignow.com/css/7-css-grid-layout-frameworks-for-responsive-web-design.html I am a bootstrap fan, 2.0 is supporting responsive design Using this you will not even have to differ between two different views. If this is not possible, you can load css by screen type with JavaScript. Again, touching Struts application for that is usually not necessary and it is always a good idea to keep your presentation code on the presentation side of life my 2 cents of course other may think different Cheers Christian On Fri, Jan 13, 2012 at 6:00 PM, CRANFORD, CHRIS chris.cranf...@setech.com wrote: I have been asked to investigate adding mobile device support to an existing Struts2 application. I was wondering if others could explain how you added mobile detection and view support for your Struts2 applications. Did you use an interceptor to set a session Boolean value and keyed your view from that variable? Did your interceptor append/prefix your invocation result with a mobile value so that different views were rendered? There are a number of ways to implement it obviously, but wanted to get a feel for what others may have tried in the past and the obstacles that may have surfaced to point you along a specific path. Thanks in advance, Chris - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 Webinar in Wednesday
I did not write a review, but this is the original online: http://vimeo.com/34043627 On Fri, Dec 23, 2011 at 3:50 PM, Siddiq Syed siddiq...@yahoo.com wrote: I missed it too... Where can I find the review for it ? Sent from my iPhone On Dec 22, 2011, at 11:29 PM, Reshmi ra...@trinitymobility.com wrote: Dear Grobmeier, I also missed the webminar,Can you please send a review of it? -Original Message- From: Christian Grobmeier [mailto:grobme...@gmail.com] Sent: Friday, December 23, 2011 12:23 AM To: Struts Users Mailing List Subject: Re: Struts 2 Webinar in Wednesday I was there, it is pretty cool You can interview me on chat, if you need some info. I installed it for my struts-dev env Cheers On Thu, Dec 22, 2011 at 7:18 PM, Maurizio Cucchiara mcucchi...@apache.org wrote: Unfortunately I missed the webinar, is there an offline version? Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin :http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 22 December 2011 14:53, Bogomil Shopov shopov.bogo...@gmail.com wrote: On 22 December 2011 11:50, Anirudh Bhardwaj anirudhbhardwa...@gmail.com wrote: Hi Bobo, You are more than welcome :) //Bogo A great seminar Thank you for informing us and providing a good opportunity Anirudh On Mon, Dec 19, 2011 at 10:01 PM, Bogomil Shopov shopov.bogo...@gmail.comwrote: On 19 December 2011 17:22, Brian Thompson elephant...@gmail.com wrote: What time (GMT) on Wednesday? Wed, Dec 21, 2011 5:00 PM - 6:00 PM GMT //Bogo Brian On Mon, Dec 19, 2011 at 10:16 AM, Bogomil Shopov shopov.bogo...@gmail.comwrote: Hey guys, We will have free Struts 2 related webinar in Wednesday. I invite you to join if you are interested in making your life fun with Struts 2 and JRebel. I am looking forward to meet you there. https://www3.gotomeeting.com/register/751400870 -- Bogomil Bogo Shopov Internet enthusiast in motion http://about.me/bogo http://talkweb.eu #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web Programmer and a Father. #Mozilla, #OpenData #Foss Rebellion. #Bulgarian Living in #Prague. -- Bogomil Bogo Shopov Internet enthusiast in motion http://about.me/bogo http://talkweb.eu #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web Programmer and a Father. #Mozilla, #OpenData #Foss Rebellion. #Bulgarian Living in #Prague. -- Anirudh Bhardwaj 9268307298 -- Bogomil Bogo Shopov Internet enthusiast in motion http://about.me/bogo http://talkweb.eu #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web Programmer and a Father. #Mozilla, #OpenData #Foss Rebellion. #Bulgarian Living in #Prague. -- http://www.grobmeier.de https://www.timeandbill.de - 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 -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 Webinar in Wednesday
I was there, it is pretty cool You can interview me on chat, if you need some info. I installed it for my struts-dev env Cheers On Thu, Dec 22, 2011 at 7:18 PM, Maurizio Cucchiara mcucchi...@apache.org wrote: Unfortunately I missed the webinar, is there an offline version? Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin :http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 22 December 2011 14:53, Bogomil Shopov shopov.bogo...@gmail.com wrote: On 22 December 2011 11:50, Anirudh Bhardwaj anirudhbhardwa...@gmail.com wrote: Hi Bobo, You are more than welcome :) //Bogo A great seminar Thank you for informing us and providing a good opportunity Anirudh On Mon, Dec 19, 2011 at 10:01 PM, Bogomil Shopov shopov.bogo...@gmail.comwrote: On 19 December 2011 17:22, Brian Thompson elephant...@gmail.com wrote: What time (GMT) on Wednesday? Wed, Dec 21, 2011 5:00 PM - 6:00 PM GMT //Bogo Brian On Mon, Dec 19, 2011 at 10:16 AM, Bogomil Shopov shopov.bogo...@gmail.comwrote: Hey guys, We will have free Struts 2 related webinar in Wednesday. I invite you to join if you are interested in making your life fun with Struts 2 and JRebel. I am looking forward to meet you there. https://www3.gotomeeting.com/register/751400870 -- Bogomil Bogo Shopov Internet enthusiast in motion http://about.me/bogo http://talkweb.eu #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web Programmer and a Father. #Mozilla, #OpenData #Foss Rebellion. #Bulgarian Living in #Prague. -- Bogomil Bogo Shopov Internet enthusiast in motion http://about.me/bogo http://talkweb.eu #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web Programmer and a Father. #Mozilla, #OpenData #Foss Rebellion. #Bulgarian Living in #Prague. -- Anirudh Bhardwaj 9268307298 -- Bogomil Bogo Shopov Internet enthusiast in motion http://about.me/bogo http://talkweb.eu #JRebel Community Guy, #OpenWeb Hacker, #Pirate Politician, #Web Programmer and a Father. #Mozilla, #OpenData #Foss Rebellion. #Bulgarian Living in #Prague. -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Help Struts 1.3
Hello, On Tue, Dec 13, 2011 at 10:46 AM, AlexCross mattiap...@yahoo.it wrote: How can i read data from DB and display using Jsp with Struts? What's the correct logic of struts(1.3)? Not sure what you expecting as an answer. Basics are: create a struts.xml and tie a view and an action together. The action should call the class which does the DB select and then create a databean. But this will not help you very much, you really need to take a look to the documentation: http://struts.apache.org/1.3.10/index.html If you have a choice, you should better go with Struts 2 instead. Cheers Christian Thank's to all. -- View this message in context: http://struts.1045723.n5.nabble.com/Help-Struts-1-3-tp5070969p5070969.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 -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Cimande 2.0 and Mervpolis 2.0
Not sure what BlueOxygen should do, but when I try to login with the credentials below: org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is org.hibernate.TransactionException: JDBC begin failed: org.springframework.orm.hibernate3.HibernateTransactionManager.doBegin(HibernateTransactionManager.java:596) org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:371) org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:335) org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:105) org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) $Proxy28.getList(Unknown Source) org.blueoxygen.cimande.security.login.LoginForm.execute(LoginForm.java:92) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) On Fri, Nov 25, 2011 at 12:03 PM, Frans Thamura fr...@meruvian.org wrote: hi all we just release cimande 2.0, s2-spring-hibernate project, and we also create data source connector under project called medallion (CMIS, GIS, Workflow using Joget). have a try http://demo.blueoxygen.org - admin/blueoxygen , sorry the FB and twitter, i stil fix, :) but.. www.mervpolis.com - using same engine, the FB login/register run well. have a try the cimande. 2.0 has been in maven central also http://search.maven.org/#search%7Cga%7C1%7Ccimande tutorial to use cimande in http://space.meruvian.org/blueoxygen/cimande we are working to make website blueoxygen.org more informative :) sorry. -- Frans Thamura (曽志胜) Chief of Advisory Meruvian. Integrated Hypermedia Java Solution Provider. Mobile: +628557888699 Blog: http://blogs.mervpolis.com/roller/flatburger (id) FB: http://www.facebook.com/meruvian TW: http://www.twitter.com/meruvian / @meruvian Website: http://www.meruvian.org We grow because we share the same belief. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Dynamic Result Selection
On Sat, Nov 19, 2011 at 9:06 AM, rohan jamkhedkar rgjamkhed...@yahoo.co.in wrote: Hi Christian, Thank you for your response. I had actually defined all three results, success, input and error and My class did extend ActionSupport. But the problem was, whenever an error occurred during Interceptor invocation, framework would try to find value of nextPage. As action is not executed it would not find nextPage on valueStack. So I want to know is there any way of getting around this problem? Can I specify value for nextPage before any interceptor is invoked? Ah, now I understand better. Have you tried to define a default value for $nextPage in your class? Like: class MyAction { private String nextPage = errorpage.jsp; Actually the action itself will not be executed if an interceptor error occurs. If the default value does not work, I think it might be a good idea to write an own interceptor which catches something like that or to extend the throwing interceptor to put a correct value into the object. cheers Christian Thanks Regards, Rohan From: Christian Grobmeier grobme...@gmail.com To: Struts Users Mailing List user@struts.apache.org; rohan jamkhedkar rgjamkhed...@yahoo.co.in Sent: Saturday, 19 November 2011 1:21 PM Subject: Re: Dynamic Result Selection Hello Rohan, On Sat, Nov 19, 2011 at 8:44 AM, rohan jamkhedkar rgjamkhed...@yahoo.co.in wrote: result name=success%{nextPage}/result try to add these results too: result name=input%{nextPage}/result result name=error%{nextPage}/result Input is what is returned when some input is missing, error in case an error happens. Please also see the class ActionSupport, were these String constants are defined. To use it, extend ActionSupport and return for example: return SUCCESS; Of course you don't need to use ActionSupport, but I think it is a good idea :-) Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Dynamic Result Selection
Hello Rohan, On Sat, Nov 19, 2011 at 8:44 AM, rohan jamkhedkar rgjamkhed...@yahoo.co.in wrote: result name=success%{nextPage}/result try to add these results too: result name=input%{nextPage}/result result name=error%{nextPage}/result Input is what is returned when some input is missing, error in case an error happens. Please also see the class ActionSupport, were these String constants are defined. To use it, extend ActionSupport and return for example: return SUCCESS; Of course you don't need to use ActionSupport, but I think it is a good idea :-) Cheers Christian -- http://www.grobmeier.de https://www.timeandbill.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: utf8 problems...
Maurizio, thanks for your suggestion. With your mail I have found the solution. On Sun, Nov 13, 2011 at 6:31 PM, Maurizio Cucchiara mcucchi...@apache.org wrote: constant name=struts.i18n.encoding value=UTF-8/ (struts.xml) had not effect - it seem it was enabled already parser content-type=text/html;charset=UTF-8 class=com.opensymphony.module.sitemesh.parser.HTMLPageParser / (sitemesh.xml) This killed everything - layout gone :-) I needed to remove the charset you put into content type (and used an attribute called encoding). But didn't help But then I thought about this: %@ page contentType=text/html; charset=UTF-8 pageEncoding=UTF-8 % This was only in my decorator jsp page. But sitemesh expects this to be in every jsp page. I fixed it on some pages already and it seem to help. Cheers Christian I usually start from a very simple example, then go ahead (does your data display correctly without SM?). How did you import your data inside mysql? Ensure that your data was encoded correctly inside the DB itself: select hex(field) from Table where condition; As last option you can even consider a Character Encoding Servlet Filter, but to be frank I never felt the need to use it. Twitter :http://www.twitter.com/m_cucchiara G+ :https://plus.google.com/107903711540963855921 Linkedin :http://www.linkedin.com/in/mauriziocucchiara Maurizio Cucchiara On 13 November 2011 17:35, Christian Grobmeier grobme...@gmail.com wrote: Hi guys, I am searching for a utf-8 problem in my app. I have struts 2 with sitemesh 2.x bundled. backoffice is apache cayenne which connects to mysql with: useUnicode=truecharacterEncoding=utf8 Now I suspect sitemesh somehow. Any ideas were I could look appreciated Is sitemesh still recommended btw? 2.x version is pretty old and 3.x is in alpha for quite a while. Cheers Christian -- http://www.grobmeier.de - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
utf8 problems...
Hi guys, I am searching for a utf-8 problem in my app. I have struts 2 with sitemesh 2.x bundled. backoffice is apache cayenne which connects to mysql with: useUnicode=truecharacterEncoding=utf8 Now I suspect sitemesh somehow. Any ideas were I could look appreciated Is sitemesh still recommended btw? 2.x version is pretty old and 3.x is in alpha for quite a while. Cheers Christian -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [ANN] Struts 2 Plugin for IntelliJ IDEA 11 - Early Access
Looks pretty nice. Are the changes available in the community edition or is is ultimate version only? Cheers Christian On Wed, Sep 28, 2011 at 8:04 PM, Yann Cébron yann.ceb...@googlemail.com wrote: Early Access Preview has started for the next major version of JetBrains IntelliJ IDEA, and Struts 2 Plugin already has a lot of new features to offer: * OGNL Language support * Action class properties resolving, including refactoring * Smart navigation actions (go from JSP-Action-struts.xml) * Better integration of validation.xml files * and much, much more Please find more details, links and screenshots here: http://strutsidea.blogspot.com/2011/09/intellij-idea-11-nika-first-eap.html Looking forward to your feedback and comments, Yann - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [ANN] Struts 2 Plugin for IntelliJ IDEA 11 - Early Access
Hi, In the meanwhile that Yann answers your question, may I ask you why are you so interested on CE version? to be honest, UE has a cost of 175 €. I am not sure if IDEA would help me so much it is worth the money. You could say, then download the trial, which I might do. But with my slow internet connection I try to save every mb I can. Are you IDEA user? Happy? Cheers Christian Maurizio Cucchiara On 29 September 2011 10:50, Christian Grobmeier grobme...@gmail.com wrote: Looks pretty nice. Are the changes available in the community edition or is is ultimate version only? Cheers Christian On Wed, Sep 28, 2011 at 8:04 PM, Yann Cébron yann.ceb...@googlemail.com wrote: Early Access Preview has started for the next major version of JetBrains IntelliJ IDEA, and Struts 2 Plugin already has a lot of new features to offer: * OGNL Language support * Action class properties resolving, including refactoring * Smart navigation actions (go from JSP-Action-struts.xml) * Better integration of validation.xml files * and much, much more Please find more details, links and screenshots here: http://strutsidea.blogspot.com/2011/09/intellij-idea-11-nika-first-eap.html Looking forward to your feedback and comments, Yann - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [ANN] Struts 2 Plugin for IntelliJ IDEA 11 - Early Access
Even with the repricing? Will try it out. Have a couple of months left, I think. Using another ide after nearly 10 years feels like relocating to a new city, signing the contract for a new job and programming a different language all at one time. Cheers On Thu, Sep 29, 2011 at 11:44 AM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: Ok, as I suspected: idea is free for apache (and generally for OS developer) committers. Maurizio Cucchiara Il giorno 29/set/2011 11.12, Christian Grobmeier grobme...@gmail.com ha scritto: Hi, In the meanwhile that Yann answers your question, may I ask you why are you so interested on CE... to be honest, UE has a cost of 175 €. I am not sure if IDEA would help me so much it is worth the money. You could say, then download the trial, which I might do. But with my slow internet connection I try to save every mb I can. Are you IDEA user? Happy? Cheers Christian Maurizio Cucchiara On 29 September 2011 10:50, Christian Grobmeier grobme...@gmail.com wr... -- http://www.grobmeier.de - To un... -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [ANN] Struts 2 Plugin for IntelliJ IDEA 11 - Early Access
Struts 2 plugin is only available in Ultimate Edition as it requires Java EE/Web functionality. OK I have downloaded the package. meanwhil I could find add framework support. One question: why is the plugin downloading struts itself again instead of using the libs from my maven repos? And why can't I choose a version number myself? What I not like at the moment (more related to IDEA) is the fact it creates an lib folder in my project folder and creates an out folder. Try to figure that out Regards, Yann On 29 September 2011 10:50, Christian Grobmeier grobme...@gmail.com wrote: Looks pretty nice. Are the changes available in the community edition or is is ultimate version only? Cheers Christian On Wed, Sep 28, 2011 at 8:04 PM, Yann Cébron yann.ceb...@googlemail.com wrote: Early Access Preview has started for the next major version of JetBrains IntelliJ IDEA, and Struts 2 Plugin already has a lot of new features to offer: * OGNL Language support * Action class properties resolving, including refactoring * Smart navigation actions (go from JSP-Action-struts.xml) * Better integration of validation.xml files * and much, much more Please find more details, links and screenshots here: http://strutsidea.blogspot.com/2011/09/intellij-idea-11-nika-first-eap.html Looking forward to your feedback and comments, Yann - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Returning response object only from Action
Hi Ajib, public ActionForward execute(ActionMapping mapping, ActionForm inForm, HttpServletRequest request, HttpServletResponse response) throws Exception { // Get a list of characters associated with the select TV show String tvShow = (String) request.getParameter(tvShow); if (tvShow == null) { tvShow = ; } // use a json lib, like: http://code.google.com/p/jjson/ // to generate json from an arrayList ListString character = getCharacters(tvShow); JSONArray arr = new JSONArray(); for (String string : character) { arr.add(new JSONString(string)); } String responseString = arr.toJSON(); // use text/plain: response.setContentType(text/plain); PrintWriter out = response.getWriter(); // use response String out.println(responseString); out.flush(); return null; // Not forwarding to anywhere, response is fully-cooked } // End execute() How can I avoid creating HTML in action class and send the Arraylist /JSON to view? Similar to that. :-) Cheers Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Returning response object only from Action
Ajib, I am using jQuery, which makes an json object out of the json string you would get. This is very straightforward. Since you are using plain javascript this is not possible so easily. Basically you get a string and need to turn it into a jsonobject. You could do it like that: http://www.json.org/js.html You probably need to make something like that: var myObject = JSON.parse(data); and then you can iterate over myObject like an array and create the html you need. I am afraid, you'll need to dig that out on your own now, but I guess you have a good direction ;-) Cheers Christian On Wed, Sep 28, 2011 at 6:08 PM, Anjib Mulepati anji...@hotmail.com wrote: This is great I am able to get the String of all shows. But my ultimate goal was to get the result and populate in the select box. I am using AJAX since second box (charater) content depends upon first select box (tvshow). SO I need to parse String or is there any easy way to get values so that I can use that to populate the select box. Also when I was looking at the script on the JSP I was wondering how can I use that string to populate the select box. script var req; var which; function retrieveURL(url) { if (window.XMLHttpRequest) { // Non-IE browsers req = new XMLHttpRequest(); req.onreadystatechange = processStateChange; try { req.open(GET, url, true); } catch (e) { alert(e); } req.send(null); } else if (window.ActiveXObject) { // IE req = new ActiveXObject(Microsoft.XMLHTTP); if (req) { req.onreadystatechange = processStateChange; req.open(GET, url, true); req.send(); } } } function processStateChange() { if (req.readyState == 4) { // Complete if (req.status == 200) { // OK response var data = req.responseText; alert(data); document.getElementById(characters).innerHTML = data; } else { alert(Problem: + req.statusText); } } } /script html:form action=doSome html:select property=show onchange=retrieveURL('GetChars.do?tvID=' + this.value); html:options collection=showList property=showId labelProperty=showName / /html:select br/ Characters: span id=characters/span html:submit / /html:form On 9/28/2011 10:41 AM, Christian Grobmeier wrote: Hi Ajib, public ActionForward execute(ActionMapping mapping, ActionForm inForm, HttpServletRequest request, HttpServletResponse response) throws Exception { // Get a list of characters associated with the select TV show String tvShow = (String) request.getParameter(tvShow); if (tvShow == null) { tvShow = ; } // use a json lib, like: http://code.google.com/p/jjson/ // to generate json from an arrayList ListString character = getCharacters(tvShow); JSONArray arr = new JSONArray(); for (String string : character) { arr.add(new JSONString(string)); } String responseString = arr.toJSON(); // use text/plain: response.setContentType(text/plain); PrintWriter out = response.getWriter(); // use response String out.println(responseString); out.flush(); return null; // Not forwarding to anywhere, response is fully-cooked } // End execute() How can I avoid creating HTML in action class and send the Arraylist /JSON to view? Similar to that. :-) Cheers Christian - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Returning response object only from Action
On Wed, Sep 28, 2011 at 6:27 PM, Anjib Mulepati anji...@hotmail.com wrote: Thanks for your help. I get the part to convert to/from the JSON object . But my problem was to make such result fit within Struts. i.e. how can i populate the data into select box using struts tag? Oh ok... now this is a little time travel for me. Have not used Struts 1 in the past 5 years (thanks heaven). Do you know this tag? http://struts.apache.org/1.x/struts-taglib/tagreference.html#html:options You'll need that and make a bean accessible for this tag. here is a short example which might help you: http://www.vaannila.com/struts/struts-example/struts-html-select-tag-example-1.html Cheers Christian On 9/28/2011 12:14 PM, Christian Grobmeier wrote: Ajib, I am using jQuery, which makes an json object out of the json string you would get. This is very straightforward. Since you are using plain javascript this is not possible so easily. Basically you get a string and need to turn it into a jsonobject. You could do it like that: http://www.json.org/js.html You probably need to make something like that: var myObject = JSON.parse(data); and then you can iterate over myObject like an array and create the html you need. I am afraid, you'll need to dig that out on your own now, but I guess you have a good direction ;-) Cheers Christian On Wed, Sep 28, 2011 at 6:08 PM, Anjib Mulepatianji...@hotmail.com wrote: This is great I am able to get the String of all shows. But my ultimate goal was to get the result and populate in the select box. I am using AJAX since second box (charater) content depends upon first select box (tvshow). SO I need to parse String or is there any easy way to get values so that I can use that to populate the select box. Also when I was looking at the script on the JSP I was wondering how can I use that string to populate the select box. script var req; var which; function retrieveURL(url) { if (window.XMLHttpRequest) { // Non-IE browsers req = new XMLHttpRequest(); req.onreadystatechange = processStateChange; try { req.open(GET, url, true); } catch (e) { alert(e); } req.send(null); } else if (window.ActiveXObject) { // IE req = new ActiveXObject(Microsoft.XMLHTTP); if (req) { req.onreadystatechange = processStateChange; req.open(GET, url, true); req.send(); } } } function processStateChange() { if (req.readyState == 4) { // Complete if (req.status == 200) { // OK response var data = req.responseText; alert(data); document.getElementById(characters).innerHTML = data; } else { alert(Problem: + req.statusText); } } } /script html:form action=doSome html:select property=show onchange=retrieveURL('GetChars.do?tvID=' + this.value); html:options collection=showList property=showId labelProperty=showName / /html:select br/ Characters:span id=characters/span html:submit / /html:form On 9/28/2011 10:41 AM, Christian Grobmeier wrote: Hi Ajib, public ActionForward execute(ActionMapping mapping, ActionForm inForm, HttpServletRequest request, HttpServletResponse response) throws Exception { // Get a list of characters associated with the select TV show String tvShow = (String) request.getParameter(tvShow); if (tvShow == null) { tvShow = ; } // use a json lib, like: http://code.google.com/p/jjson/ // to generate json from an arrayList ListString character = getCharacters(tvShow); JSONArray arr = new JSONArray(); for (String string : character) { arr.add(new JSONString(string)); } String responseString = arr.toJSON(); // use text/plain: response.setContentType(text/plain); PrintWriter out = response.getWriter(); // use response String out.println(responseString); out.flush(); return null; // Not forwarding to anywhere, response is fully-cooked } // End execute() How can I avoid creating HTML in action class and send the Arraylist /JSON to view? Similar to that. :-) Cheers Christian - 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
Re: Convention plugin can't find Actions
On Mon, Aug 29, 2011 at 3:02 AM, chengas123 benjamin.j.mcc...@gmail.com wrote: Got it working. I needed to set the constants below in my struts.xml. Could be good to add this to the docs for other people using Jetty in embedded mode. constant name=struts.convention.action.fileProtocols value=jar,code-source / constant name=struts.convention.exclude.parentClassLoader value=false / I added it to the wiki, thanks for coming back with it. Pretty sure I need it in 2 months or so. https://cwiki.apache.org/confluence/display/WW/Convention+Plugin#ConventionPlugin-Jetty%28embedded%29 Cheers, Christian -Ben -- View this message in context: http://struts.1045723.n5.nabble.com/Convention-plugin-can-t-find-Actions-tp4744110p4744666.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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Deploy S2 apps with Mysql to cloud
can share how deploy the .war to the Ec2? i still dont get it, as us said it more virtual server, do u mean, u install OS/Linux first in the virtual rather deploy directly you have to install an os image first (i have choosen debian). Then usual process: install Tomcat/Jetty and all other tools you need. Then copy your file with scp to the EC2 and deploy it from there. my team try cloudfoundry, which it is more springMVC rather Struts2, but we also working on it. cloudbee, can share the experience? They have a free trial with less resources. I was not too happy with them. Finally I found out EC2 is cheaper and better suited for me needs; I love to have bit more control over things. You can also check out Heroku if you want Platform-As-A-Service. They have started yesterday with Java on their service. Looks interesting. F On Sat, Aug 27, 2011 at 10:33 AM, Maurizio Cucchiara mcucchi...@apache.org wrote: Hi Frans, the following is my usually software stack : Hibernate+MySQL+Spring+Struts2. Currently I successfully deployed that stack on Amazon EC2 either on CloudBees. EC2 is more a virtual server, CloudBees is more a platform as service (you can integrate your application with your control version system, and more), so the former is kind of system admin oriented, where the latter is developer oriented. I will try VMWare Cloud Fondry soon. Hope this help. Maurizio Cucchiara On 27 August 2011 05:18, Frans Thamura fr...@meruvian.org wrote: hi all anyone can share, ur experience deploy ur apps (using hibernate -mysql will be cool) to cloud which cloud services do you use? and how much, r u happy? we are on plan to do that -- Frans Thamura (曽志胜) Chief of Advisory Meruvian. Integrated Hypermedia Java Solution Provider. Mobile: +628557888699 Blog: http://blogs.mervpolis.com/roller/flatburger (id) FB: http://www.facebook.com/meruvian TW: http://www.twitter.com/meruvian / @meruvian Website: http://www.meruvian.org We grow because we share the same belief. - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [OT] JQuery or dojo?
Can any one suggest, for ajax which framework is better? Every answer is highly subjective, but I have made great experiences with jQuery. In addition, I was able to use jQuery mobile without pain later and there seems to be a huge community around jQuery. My current js combination is jQuery + https://github.com/janl/mustache.js CHeers Regards, Balwinder Kumar - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [OT] JQuery or dojo?
Out of curiosity. What are the criteria which speak for Dojo, in your opinion? On Tue, Aug 16, 2011 at 7:07 PM, Dave Newton davelnew...@gmail.com wrote: jQuery. Dave On Aug 16, 2011 1:01 PM, Balwinder balwinder@gmail.com wrote: Dave, My criteria is: Able to ajaxify my app seamlessly. Quick in implementation. Ease of maintenance. Quick to learn. Regards, Balwinder Kumar On 8/16/2011 10:26 PM, Dave Newton wrote: What are your criteria? IMO they're different things, Dojo is more of an app framework, although there's overlap in functionality at the low level. Dave On Aug 16, 2011 12:38 PM, Balwinderbalwinder@gmail.com wrote: Hi All, Can any one suggest, for ajax which framework is better? Regards, Balwinder Kumar - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: how to make onchange in s:select to submit a form and call a specific method in one action class
Or someone could provide more info will sj:select help satisfy the following requirement? (1) sj:select name=country onchange=to_change_region / (2) sj:select name=region onchange=to_change_city / (3) sj:select name=coutry / Actually, I prefer not to use complex javascript code to do change select1, select2 is updated, change select2, and select3 is updated. No chance without javascript. There is no struts on board functionality providing that feature. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Custom tag in Struts 1.3.8
Hi, I do not know a text tag in struts: http://struts.apache.org/2.2.3/docs/ui-tag-reference.html And the texfield tags renders correct with closing / (at least in my app) Might it be related to the tag itself? What doctype do you use? Cheers On Thu, Aug 11, 2011 at 7:18 PM, Anjib Mulepati anji...@hotmail.com wrote: Hi All, I was wondering if there is any way we can tell struts to put '/' at the end of the tag. For example if we have struts tag as html:text styleId=agencyName title=Agency Name size=30 property=agencyName value= / it will convert to input type=text name=agencyName size=30 value= id=agencyName title=Agency Name Now, is there anyway we can have this input type=text name=agencyName size=30 value= id=agencyName title=Agency Name / Thanks, Anjib - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Custom tag in Struts 1.3.8
oh :-)) I am sorry On Thu, Aug 11, 2011 at 7:31 PM, Dave Newton davelnew...@gmail.com wrote: wrong version of struts. On Aug 11, 2011 1:23 PM, Christian Grobmeier grobme...@gmail.com wrote: Hi, I do not know a text tag in struts: http://struts.apache.org/2.2.3/docs/ui-tag-reference.html And the texfield tags renders correct with closing / (at least in my app) Might it be related to the tag itself? What doctype do you use? Cheers On Thu, Aug 11, 2011 at 7:18 PM, Anjib Mulepati anji...@hotmail.com wrote: Hi All, I was wondering if there is any way we can tell struts to put '/' at the end of the tag. For example if we have struts tag as html:text styleId=agencyName title=Agency Name size=30 property=agencyName value= / it will convert to input type=text name=agencyName size=30 value= id=agencyName title=Agency Name Now, is there anyway we can have this input type=text name=agencyName size=30 value= id=agencyName title=Agency Name / Thanks, Anjib - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Using s:actionerror
Hello Maurizio, thanks for your kind help. But it was all my fault. I used validation annotations for fields but missed the fact I need s:fielderror instead of /s:actionerror. Now the difference is clear and everything works as expected. Sorry for the noise :-) Cheers, Christian On Tue, Aug 9, 2011 at 5:35 PM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: Hi Christian, I'm pretty sure that Dave understood simple, when you talked about plain theme. A part this, It should be work as you expected. Can you send further details? like action configuration, result... etc Maurizio Cucchiara On 9 August 2011 17:07, Christian Grobmeier grobme...@gmail.com wrote: On Tue, Aug 9, 2011 at 4:23 PM, Dave Newton davelnew...@gmail.com wrote: On Tue, Aug 9, 2011 at 10:20 AM, Christian Grobmeier wrote: Shouldn't at least the message text come out of it? No, the plain theme doesn't do much for you. Just to make sure.. I am using simple theme, i mixed up the name. Guess you meant the same. This should help then? s:actionerror theme=xhtml / Because it doesn't Have I to look elsewhere? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Using s:actionerror
Using s:actionerror / worked fine so far. But now it appears not to show my action errors anymore. For example with: @RequiredFieldValidator( type = ValidatorType.SIMPLE, fieldName = username, key = errors.usernamemissing) Or: this.addActionError(getText(errors.usernamemissing)); there is nothing shown. I have done many modification until i noticed that. Is it probably related when i switched to the plain theme? I am using the current 2.3.1-snapshot Thanks + Cheers! Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Using s:actionerror
Shouldn't at least the message text come out of it? On Tue, Aug 9, 2011 at 4:16 PM, Dave Newton davelnew...@gmail.com wrote: On Tue, Aug 9, 2011 at 10:14 AM, Christian Grobmeier wrote: Is it probably related when i switched to the plain theme? Yes; the plain templates don't do much for you. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Using s:actionerror
On Tue, Aug 9, 2011 at 4:23 PM, Dave Newton davelnew...@gmail.com wrote: On Tue, Aug 9, 2011 at 10:20 AM, Christian Grobmeier wrote: Shouldn't at least the message text come out of it? No, the plain theme doesn't do much for you. Just to make sure.. I am using simple theme, i mixed up the name. Guess you meant the same. This should help then? s:actionerror theme=xhtml / Because it doesn't Have I to look elsewhere? - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Using s:actionerror
Of course, I should use s:fielderror / when i try to print field errors. Btw, actionerror is doing stuff in simple theme, like field error does too. I have finally digged the code Cheers + Thanks! On Tue, Aug 9, 2011 at 5:07 PM, Christian Grobmeier grobme...@gmail.com wrote: On Tue, Aug 9, 2011 at 4:23 PM, Dave Newton davelnew...@gmail.com wrote: On Tue, Aug 9, 2011 at 10:20 AM, Christian Grobmeier wrote: Shouldn't at least the message text come out of it? No, the plain theme doesn't do much for you. Just to make sure.. I am using simple theme, i mixed up the name. Guess you meant the same. This should help then? s:actionerror theme=xhtml / Because it doesn't Have I to look elsewhere? -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Hello Maurizio, I do some change on the S2 Junit4 plugin, now it should be simpler run a test with or without spring. Could you test the latest version of the aforementioned plugin [1]? Christian, is this [2] your use case? WDYT? is more intuitive? not tested it yet, but yes, that is what I want to have, it looks great! Thank you very much for the work! One question roused in me when I see this one and even the old Junit3 testcase. I was always wondering were the struts.xml is drawn. In most cases of course I want to test the struts.xml as it is used in my webapp. But sometimes i might want to test something else, a special error case or maybe a result type. For these cases I might want to test with a variation of my struts.xml, and therefore this might be useful: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {your-application-context.xml}) @StrutsContextConfiguration(locations = {struts-test.xml}) public class YourActionIntegrationTest extends StrutsSpringJUnit4TestCaseYourAction { not sure if my idea makes sense, but wanted to bring it to discussion. Cheers! Christian [1] https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/ [2] https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13079421 On 3 August 2011 20:16, Christian Grobmeier grobme...@gmail.com wrote: Hi, at the moment I found out to test without that class. Not really a full test, but it works for my needs at the moment. Therefore I can wait until you have pushed your code to google. Please ping this list once it is done - guess some others ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your actions and interceptors. If you want to test either your actions or interceptors in isolation, you may not need this. Funny enough, I'm currently in the process of open sourcing our Struts 2 integration testing utility, which is based on StrutsJUnit4TestCase (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a few minutes, you may download it from google code. Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Hello Gabriel, thanks for the work, it looks really good! What I not like so much is the fact that the test methods name must match the Actions name. I didn't find this very intuitive. I could use the @Config option, which I like much more, but then i face the problem that one test method = one action. In some cases I might need the flexibility to call multiple actions in one test method. What I like is the support of another struts.xml file. I have mentioned this on the other mail to Maurizio. At the moment I must say I tend to Maurizios solution. I solves everything and is part of the struts 2 project. But I will watch your project from now on. Cheers! Christian On Wed, Aug 3, 2011 at 9:12 PM, Gabriel Belingueres belingue...@gmail.com wrote: There you go: http://code.google.com/p/struts2-junit/ Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hi, at the moment I found out to test without that class. Not really a full test, but it works for my needs at the moment. Therefore I can wait until you have pushed your code to google. Please ping this list once it is done - guess some others ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your actions and interceptors. If you want to test either your actions or interceptors in isolation, you may not need this. Funny enough, I'm currently in the process of open sourcing our Struts 2 integration testing utility, which is based on StrutsJUnit4TestCase (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a few minutes, you may download it from google code. Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - 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 -- http://www.grobmeier.de - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Hello Maurizio, today i have tested with your code and everything works well so far. There is only one thing I cannot understand, but that is maybe not related to your code. When I run it junit in eclipse, everything fine. Do I do it with mvn test, it suddenly stops. I do not see any exception, just the assert fails. I was wondering what the difference is. Maybe you have an idea on that, but I think it is off topic for your plugin. Cheers Christian On Mon, Aug 8, 2011 at 11:49 AM, Maurizio Cucchiara mcucchi...@apache.org wrote: Hi Christian, thanks for your precious feedback. your idea makes a lot of sense indeed! Unfortunately the struts.xml file name is one of the strong convention of S2 (the file name appears inside the code) and after a very quick look it would not seem simple to replace. Anyway, I'll take a deep look at this ASAP. Maurizio Cucchiara On 8 August 2011 10:35, Christian Grobmeier grobme...@gmail.com wrote: Hello Maurizio, I do some change on the S2 Junit4 plugin, now it should be simpler run a test with or without spring. Could you test the latest version of the aforementioned plugin [1]? Christian, is this [2] your use case? WDYT? is more intuitive? not tested it yet, but yes, that is what I want to have, it looks great! Thank you very much for the work! One question roused in me when I see this one and even the old Junit3 testcase. I was always wondering were the struts.xml is drawn. In most cases of course I want to test the struts.xml as it is used in my webapp. But sometimes i might want to test something else, a special error case or maybe a result type. For these cases I might want to test with a variation of my struts.xml, and therefore this might be useful: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {your-application-context.xml}) @StrutsContextConfiguration(locations = {struts-test.xml}) public class YourActionIntegrationTest extends StrutsSpringJUnit4TestCaseYourAction { not sure if my idea makes sense, but wanted to bring it to discussion. Cheers! Christian [1] https://builds.apache.org/job/Struts2/334/org.apache.struts$struts2-junit-plugin/ [2] https://issues.apache.org/jira/browse/WW-3667?focusedCommentId=13079421page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13079421 On 3 August 2011 20:16, Christian Grobmeier grobme...@gmail.com wrote: Hi, at the moment I found out to test without that class. Not really a full test, but it works for my needs at the moment. Therefore I can wait until you have pushed your code to google. Please ping this list once it is done - guess some others ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your actions and interceptors. If you want to test either your actions or interceptors in isolation, you may not need this. Funny enough, I'm currently in the process of open sourcing our Struts 2 integration testing utility, which is based on StrutsJUnit4TestCase (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a few minutes, you may download it from google code. Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http
How to StrutsJUnit4TestCase?
Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Thanks Maurizio. One of my key problems is the fact that there seems to be a problem with the spring integration when I extend this implementation. It says, i need to add the ContextListener to the web.xml. I was not able to figure out how I could enable my applicationContext. Finally I left out the Struts-Testcase and used: @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={classpath*:applicationContext.xml}) without it. Some javadocs on the class on how to do that would be fine also, maybe in combination with the issue you opened. Cheers On Wed, Aug 3, 2011 at 6:13 PM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: Opened https://issues.apache.org/jira/browse/WW-3667 On 3 August 2011 18:07, Maurizio Cucchiara maurizio.cucchi...@gmail.comwrote: Hi Christian, SJ4TC is /relatively/ young [1] and so there are no many documented use cases on the web. Anyway it would not be difficult to add the executeAction method. I'm going to open a new issue. [1] https://issues.apache.org/jira/browse/WW-3403 On 3 August 2011 13:56, Christian Grobmeier grobme...@gmail.com wrote: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: How to StrutsJUnit4TestCase?
Hi, at the moment I found out to test without that class. Not really a full test, but it works for my needs at the moment. Therefore I can wait until you have pushed your code to google. Please ping this list once it is done - guess some others ahve an interest in it too :-) Cheers Christian On Wed, Aug 3, 2011 at 7:54 PM, Gabriel Belingueres belingue...@gmail.com wrote: Hi, StrutsJUnit4TestCase is really tricky. I found few pointers in the web. I'm currently using it successfully for my modest testing requirements, but you don't need to provide a web.xml file. When I say integration testing utility, I mean testing a full blown interceptor stack with your actions and interceptors. If you want to test either your actions or interceptors in isolation, you may not need this. Funny enough, I'm currently in the process of open sourcing our Struts 2 integration testing utility, which is based on StrutsJUnit4TestCase (only tested it on Struts 2.2.3 I'm afraid), so if you can hold on a few minutes, you may download it from google code. Regards, Gabriel 2011/8/3 Christian Grobmeier grobme...@gmail.com: Hello all, today I tried to figure out how one can use StrutsJUnit4TestCase. I am currently puzzled. I found docs for the older implementation for Junit3 of course, but nothing on the StrutsJUnit4TestCase class. Any pointers? With the old stuff i simply did: this.executeAction() and all was well. Now it seems I have to give the class a web.xml - how? Thanks in advance Christian - 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 -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: [struts-user] How to encrypt the url?
is logging out to the login screen, so I have to give links like http://localhost:8080/UNOT/User/ViewProfile.action?id=1passwd =643def90app_login=Login So, is there any way to encrypt the url? Bad idea. But yes, and it is not a struts issue. So I will ask why can't you use a session? I would like to second that this is a bad idea. You should sha/md5 your password before sending it. This of course is client side and you could do that with javascript. You could use this: http://www.bichlmeier.info/sha256.html Anyway, people might be able to snif this encrypted password and use the encrypted version to login. The only benefit is they do not own the clear password, which might be used for other apps as email. Therefore you should go to https:// -- View this message in context: http://struts.1045723.n5.nabble.com/How-to-encrypt-the-url-tp4 644406p4644406.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 -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- - - - Jason Pyeron PD Inc. http://www.pdinc.us - - Principal Consultant 10 West 24th Street #100 - - +1 (443) 269-1555 x333 Baltimore, Maryland 21218 - - - -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- This message is copyright PD Inc, subject to license 20080407P00. - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Submit image button sends coordinates
Hi, using: s:submit type=image src=images/icons/app/32x32/sign-in.png name=submit / Sends the following to my action: submit = [ Submit ] submit.x = [ 40 ] submit.y = [ 7 ] x / y are coordinates of my click, defined by w3c. Now they are sent to my action, and OGNL tries to set it. Which leads to: Error setting expression 'submit.x' with value '[Ljava.lang.String;@a53ed8f' ognl.NoSuchPropertyException: java.lang.String.x Of course, ognl, sets a string submit, then tries to find the getX method on my string which does not exist. How can I deal with that? Cheers Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Submit image button sends coordinates
Thanks Maurizio. I don't want to reduce my error level, now I created something weird. Not nice, but it works: private Submit submitCoord = null; public Submit getSubmit() { return submitCoord; } public void setSubmit(String submit) { this.submitCoord = new Submit(submit); } class Submit { private int x = 0; private int y = 0; private String name = ; private Submit(String name) { super(); this.name = name; } public String getName() { return name; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } } Cheers Christian On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: Hi Christian, unfortunately IIRC there is no way to avoid that OGNL tries to find the property accessor. Adding this row in your log4j.xml (properties) should mute this log message (which it should not be a warning message) category name=com.opensymphony.xwork2.ognl.OgnlValueStack priority value=error/ /category On 26 July 2011 11:27, Christian Grobmeier grobme...@gmail.com wrote: Hi, using: s:submit type=image src=images/icons/app/32x32/sign-in.png name=submit / Sends the following to my action: submit = [ Submit ] submit.x = [ 40 ] submit.y = [ 7 ] x / y are coordinates of my click, defined by w3c. Now they are sent to my action, and OGNL tries to set it. Which leads to: Error setting expression 'submit.x' with value '[Ljava.lang.String;@a53ed8f' ognl.NoSuchPropertyException: java.lang.String.x Of course, ognl, sets a string submit, then tries to find the getX method on my string which does not exist. How can I deal with that? Cheers Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Submit image button sends coordinates
@Christian Good workaround, in my defence I can say that I have no problem to change the log level, thank to maven I can have different profile with different log level. hehe yes I have a similar setup I guess. But expected exceptions make me always nervous, even in development mode ,-) Maurizio Cucchiara Il giorno 26/lug/2011 12.26, Christian Grobmeier grobme...@gmail.com ha scritto: Thanks Maurizio. I don't want to reduce my error level, now I created something weird. Not nice, but it works: private Submit submitCoord = null; public Submit getSubmit() { return submitCoord; } public void setSubmit(String submit) { this.submitCoord = new Submit(submit); } class Submit { private int x = 0; private int y = 0; private String name = ; private Submit(String name) { super(); this.name = name; } public String getName() { return name; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } } Cheers Christian On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: Hi Christian, unfortunately IIRC there is no way to avoid that OGNL tries to find the property accessor. Adding this row in your log4j.xml (properties) should mute this log message (which it should not be a warning message) category name=com.opensymphony.xwork2.ognl.OgnlValueStack priority value=error/ /category On 26 July 2011 11:27, Christian Grobmeier grobme...@gmail.com wrote: Hi, using: s:submit type=image src=images/icons/app/32x32/sign-in.png name=submit / Sends the following to my action: submit = [ Submit ] submit.x = [ 40 ] submit.y = [ 7 ] x / y are coordinates of my click, defined by w3c. Now they are sent to my action, and OGNL tries to set it. Which leads to: Error setting expression 'submit.x' with value '[Ljava.lang.String;@a53ed8f' ognl.NoSuchPropertyException: java.lang.String.x Of course, ognl, sets a string submit, then tries to find the getX method on my string which does not exist. How can I deal with that? Cheers Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Submit image button sends coordinates
I see, I am one of those who always want to see whats going on Interesting read. Might be worth to compile a wiki entry? On Tue, Jul 26, 2011 at 3:46 PM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: There are different schools of thought, this is kind of question that has multiple answers: please, take a look at http://struts.1045723.n5.nabble.com/S2-OgnlValueStack-Error-setting-expression-warnings-after-upgrade-from-struts-2-to-struts-2-1-7-td3495667.html On 26 July 2011 14:58, Christian Grobmeier grobme...@gmail.com wrote: @Christian Good workaround, in my defence I can say that I have no problem to change the log level, thank to maven I can have different profile with different log level. hehe yes I have a similar setup I guess. But expected exceptions make me always nervous, even in development mode ,-) Maurizio Cucchiara Il giorno 26/lug/2011 12.26, Christian Grobmeier grobme...@gmail.com ha scritto: Thanks Maurizio. I don't want to reduce my error level, now I created something weird. Not nice, but it works: private Submit submitCoord = null; public Submit getSubmit() { return submitCoord; } public void setSubmit(String submit) { this.submitCoord = new Submit(submit); } class Submit { private int x = 0; private int y = 0; private String name = ; private Submit(String name) { super(); this.name = name; } public String getName() { return name; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } } Cheers Christian On Tue, Jul 26, 2011 at 11:49 AM, Maurizio Cucchiara maurizio.cucchi...@gmail.com wrote: Hi Christian, unfortunately IIRC there is no way to avoid that OGNL tries to find the property accessor. Adding this row in your log4j.xml (properties) should mute this log message (which it should not be a warning message) category name=com.opensymphony.xwork2.ognl.OgnlValueStack priority value=error/ /category On 26 July 2011 11:27, Christian Grobmeier grobme...@gmail.com wrote: Hi, using: s:submit type=image src=images/icons/app/32x32/sign-in.png name=submit / Sends the following to my action: submit = [ Submit ] submit.x = [ 40 ] submit.y = [ 7 ] x / y are coordinates of my click, defined by w3c. Now they are sent to my action, and OGNL tries to set it. Which leads to: Error setting expression 'submit.x' with value '[Ljava.lang.String;@a53ed8f' ognl.NoSuchPropertyException: java.lang.String.x Of course, ognl, sets a string submit, then tries to find the getX method on my string which does not exist. How can I deal with that? Cheers Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- Maurizio Cucchiara -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Hidden Exceptions
Hi, given this Action: public class MyAction { public String execute() throws Exception { // throws IllegalArgumentException } } I do not get a log output or anything else indicating that error. I have struts dev mode = true. Report page shows: Struts has detected an unhandled exception: At the moment I mostly need to debug to see whats going on. I would like to get all Exceptions into my logfile. How can I make sure this happens? Thanks, Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Hidden Exceptions
Cool thanks. This worked for me. As I don't use a default stack, it was better for me to configure directly: interceptor-ref name=exception param name=logEnabledtrue/param param name=logLevelERROR/param /interceptor-ref Cheers and thanks again, this helped me working with more comfort. Christian Is it the exception interceptor, because OGNL does some magic and calls the On Mon, May 30, 2011 at 3:25 PM, M.C. Wilson nijha...@gmail.com wrote: Well, let's see... I am no Struts expert, but one way that I know of to log errors is by using your struts.xml configuration. Make sure you have something like this in your interceptors: interceptors interceptor-stack name=appDefaultStack interceptor-ref name=defaultStack param name=exception.logEnabledtrue/param param name=exception.logLevelERROR/param /interceptor-ref /interceptor-stack /interceptors default-interceptor-ref name=appDefaultStack / Then, to make sure Struts handles all exceptions, add this below your interceptor section: global-results result name=error/your_error_page.jsp/result /global-results global-exception-mappings exception-mapping exception=java.lang.Exception result=error / /global-exception-mappings On May 30, 2011, at 5:40 AM, Christian Grobmeier wrote: Hi, given this Action: public class MyAction { public String execute() throws Exception { // throws IllegalArgumentException } } I do not get a log output or anything else indicating that error. I have struts dev mode = true. Report page shows: Struts has detected an unhandled exception: At the moment I mostly need to debug to see whats going on. I would like to get all Exceptions into my logfile. How can I make sure this happens? Thanks, Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Converting a hidden input field to Boolean?
Hi, given the following: s:hidden name=myBean.active value=true / and the fact MyBean contains a method with this signature: MyBean.setActive(Boolean value) {} I always receive null for this field in my Action. I guess it is because the conversion does not apply to hidden fields - right? Any chance i can make this work? Cheers Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Converting a hidden input field to Boolean?
Forget this. I found out that I do not need a setter for MyBean only, I do necessary need a getter. As I found out, getMyBean is always called before setting a property Cheers On Sun, May 1, 2011 at 10:41 AM, Christian Grobmeier grobme...@gmail.com wrote: Hi, given the following: s:hidden name=myBean.active value=true / and the fact MyBean contains a method with this signature: MyBean.setActive(Boolean value) {} I always receive null for this field in my Action. I guess it is because the conversion does not apply to hidden fields - right? Any chance i can make this work? Cheers Christian -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Struts 2 Interceptor Question
Can a Struts 2 interceptor change/add a request or session parameter? Yes, and you can look at an example when you have the source and open: com.opensymphony.xwork2.interceptor.ParametersInterceptor I'm trying to write a Struts 2 Exception Handler which is executed whenever there is an uncaught exception. To do that, I plan to use a custom interceptor based on the existing Struts 2 ExceptionMappingInterceptor. My custom interceptor needs to be able to send customized text to a jsp page which is displayed to the user. For example, a unique incidentId number will be displayed on the jsp page. Inside my intercept method, I can access the AccessInvocation's InvocationContext which contains the following methods: Map - getParameters() Map - getSession() void - put(key, value) Object - get(key) I tried modifying the Map returned by getParameters() and getSession(). I also tried using put(key, value). However, my changes were not visible on the jsp page when I used these methods. Is it possible to modify a request or session variable from an interceptor? Is there a better way to load dynamic information into a struts global-exception-mapping error page? As far as I can see it is done inside setParameters and its done via the ActionContext method. But I am not sure why your changes are not reflected. Anyway, hope this class gives you some inspiration. Cheers, Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Recommended number of forms in one action
Hi, this is question on best practice. It is: is it ok too let one Struts Action handle two different forms? For example: Assume an Action called RegistrationAction. Its intention is to use it for user registration. The first form is a set of three properties for the registration itself; the second one is a set of two properites containing an activation key and the users mail address. I am asking because it seems that validation is only allowed for one set of properties. This indicates I should create two actions: RegistrationAction ActivationAction But it seems a bit overloaded for only two methods. Cheers, Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Recommended number of forms in one action
Truly an excellent answer from both of you guys. It helped me recognize validation goes down to method level and I learned about the wildcard methods. In my example case, I will keep the two forms in one class. For future development i will create more classes as I like this approach more Cheers On Tue, Apr 19, 2011 at 4:26 PM, stanl...@gmail.com wrote: Great answer Eric! I would also add that using wildcard methods for the express purpose of minimizing the number of actions you have is bad medicine. I'm not suggesting you are, but I have seen this on client projects where they were more interested in check-in/check-out of a single action than they were in doing the right thing. Peace, Scott On Tue, Apr 19, 2011 at 9:17 AM, Eric Lentz eric.le...@sherwin.com wrote: I am asking because it seems that validation is only allowed for one set of properties. This indicates I should create two actions Validation can go down to the method level and you can validate what you desire for that method call. Just name the .xml file (if using that approach) with the method name as well the class name. I would personally allow my decision on number of classes to be driven based on class purpose. I try to limit classes to a finite set of responsibilities, usually very fine-grained, in favor or more classes. This provides easier reuse, unit testing, etc. When classes get to be big and multi-purpose, then they get confusing and ripe for refactoring. If you feel you have a single purpose that a single class should address, then use the one class. If you are serving multiple purposes that aren't related (doesn't sound like your case), then don't worry about having just a couple lines in a class. It is okay to have lots of classes. -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Conversion problem
Hi all, i have a form with only 6 values. 4 Dates, 1 int, one string. I created 2 different conversion classes for the 4 dates. One is for creating a good date from a string like 13:30, one is for the actual date. I don't know why, but the ones for dates work and the one for time does not work. Even when i use the same conversion class for all fields, the time fields do not work. In my jsp they are named correct: project.deadlineTime In my Pojo it is: Project.setDeadlineTime(Date deadlineTime) In my MyAction-conversion.properties: project.deadlineTime = de.blub.converter.TimeConverter As the property file has the working conversions defined, I assume it is drawn correct. To avoid a problem in the converter, i have returned a new Date and once exchanged it with the working stuff. But nothing helped It always claims Error setting expression 'project.deadlineTime' with value '[Ljava.lang.String;@73ea7821' ognl.MethodFailedException: Method setDeadlineTime failed for object Then I tried to enable some logging output in the Converters. But they do not output anything (for none of the fields). All other of my classes can create output on the specific level. Even when I debug I cannot breakpoint and step into them. It is as if they would not exist. In all other classes it works My questions: - any ideas what I could look for and why the two fields are not working? - why is there no logging possible? - and why can't I get into a breakpoint when debugging with eclipse and run-jetty-run plugin? Any help is appreciated :-( Thanks! Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Conversion problem
Hi, It appears to be trying to set an Array of Strings to your setDeadlineTime method, is it typed to take an Array of Strings? no arrays anywhere. But I found out I get more debug output with: log4j.logger.com.opensymphony.xwork2=DEBUG Now I could see that my conversion.properties file is not loaded. None of my converters is used, it works for the other fields with the default converter. A shortened logfile: DEBUG Property: deadlineTime DEBUG Class: ...Project DEBUG field-level type converter for property [deadlineTime] = none found DEBUG Property: project.deadlineTime DEBUG Class: ProjectsAction DEBUG global-level type converter for property [deadlineTime] = noe found DEBUG falling back to default type converter XWorkBasicConverter my time textfield throws an error, it cannot be handled by the default converter. Now my assumption is i have done something wrong with the conversion properties. My entity is named Project. The props is named: Project-conversion.properties Its located in the same package as Project. I have tried it with my Action ProjectsAction too. The file is ProjectsAction-conversion.properties Same location as ProjectsAction. Content is as follows: deadlineTime = de.converter.DateConverter or in the actions case: project.deadlineTime = de.converter.DateConverter Any ideas why this is not drawn by Struts? Thanks! Christian (*Chris*) On Mon, Apr 18, 2011 at 7:59 AM, Christian Grobmeier grobme...@gmail.comwrote: Hi all, i have a form with only 6 values. 4 Dates, 1 int, one string. I created 2 different conversion classes for the 4 dates. One is for creating a good date from a string like 13:30, one is for the actual date. I don't know why, but the ones for dates work and the one for time does not work. Even when i use the same conversion class for all fields, the time fields do not work. In my jsp they are named correct: project.deadlineTime In my Pojo it is: Project.setDeadlineTime(Date deadlineTime) In my MyAction-conversion.properties: project.deadlineTime = de.blub.converter.TimeConverter As the property file has the working conversions defined, I assume it is drawn correct. To avoid a problem in the converter, i have returned a new Date and once exchanged it with the working stuff. But nothing helped It always claims Error setting expression 'project.deadlineTime' with value '[Ljava.lang.String;@73ea7821' ognl.MethodFailedException: Method setDeadlineTime failed for object Then I tried to enable some logging output in the Converters. But they do not output anything (for none of the fields). All other of my classes can create output on the specific level. Even when I debug I cannot breakpoint and step into them. It is as if they would not exist. In all other classes it works My questions: - any ideas what I could look for and why the two fields are not working? - why is there no logging possible? - and why can't I get into a breakpoint when debugging with eclipse and run-jetty-run plugin? Any help is appreciated :-( Thanks! Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Conversion problem
Oh wow, is it true? It seem ProjectsAction-conversion.properties and ProjectsAction must be on the same location on classpath, but it must NOT reside in the classfolder itself. When I added it on the same folder just in src/main/resources its used from struts. Why not from the same location as the class is? Cheers Christian On Mon, Apr 18, 2011 at 5:40 PM, Christian Grobmeier grobme...@gmail.com wrote: Hi, It appears to be trying to set an Array of Strings to your setDeadlineTime method, is it typed to take an Array of Strings? no arrays anywhere. But I found out I get more debug output with: log4j.logger.com.opensymphony.xwork2=DEBUG Now I could see that my conversion.properties file is not loaded. None of my converters is used, it works for the other fields with the default converter. A shortened logfile: DEBUG Property: deadlineTime DEBUG Class: ...Project DEBUG field-level type converter for property [deadlineTime] = none found DEBUG Property: project.deadlineTime DEBUG Class: ProjectsAction DEBUG global-level type converter for property [deadlineTime] = noe found DEBUG falling back to default type converter XWorkBasicConverter my time textfield throws an error, it cannot be handled by the default converter. Now my assumption is i have done something wrong with the conversion properties. My entity is named Project. The props is named: Project-conversion.properties Its located in the same package as Project. I have tried it with my Action ProjectsAction too. The file is ProjectsAction-conversion.properties Same location as ProjectsAction. Content is as follows: deadlineTime = de.converter.DateConverter or in the actions case: project.deadlineTime = de.converter.DateConverter Any ideas why this is not drawn by Struts? Thanks! Christian (*Chris*) On Mon, Apr 18, 2011 at 7:59 AM, Christian Grobmeier grobme...@gmail.comwrote: Hi all, i have a form with only 6 values. 4 Dates, 1 int, one string. I created 2 different conversion classes for the 4 dates. One is for creating a good date from a string like 13:30, one is for the actual date. I don't know why, but the ones for dates work and the one for time does not work. Even when i use the same conversion class for all fields, the time fields do not work. In my jsp they are named correct: project.deadlineTime In my Pojo it is: Project.setDeadlineTime(Date deadlineTime) In my MyAction-conversion.properties: project.deadlineTime = de.blub.converter.TimeConverter As the property file has the working conversions defined, I assume it is drawn correct. To avoid a problem in the converter, i have returned a new Date and once exchanged it with the working stuff. But nothing helped It always claims Error setting expression 'project.deadlineTime' with value '[Ljava.lang.String;@73ea7821' ognl.MethodFailedException: Method setDeadlineTime failed for object Then I tried to enable some logging output in the Converters. But they do not output anything (for none of the fields). All other of my classes can create output on the specific level. Even when I debug I cannot breakpoint and step into them. It is as if they would not exist. In all other classes it works My questions: - any ideas what I could look for and why the two fields are not working? - why is there no logging possible? - and why can't I get into a breakpoint when debugging with eclipse and run-jetty-run plugin? Any help is appreciated :-( Thanks! Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Conversion problem
Good idea - I included it to the java files location. But eclipse automatically copies it to the classes folder (just doublechecked). However, mvn jetty:run does use the target/classes folder as classfolder, but the webapp folder is /src/main/webapp.(where WEB-INF resides). Probably the failure is b/c the target/classes are not in the WEB-INF folder. On Mon, Apr 18, 2011 at 6:32 PM, Chris Pratt thechrispr...@gmail.com wrote: Did you put it in the same location as the .class file, or the same location as the .java file? As far as I know if it's in the same location as the .class files (i.e. /WEB-INF/classes/com.package...) it should work, but normally the .java files don't get included in the .war file. (*Chris*) On Mon, Apr 18, 2011 at 9:01 AM, Christian Grobmeier grobme...@gmail.comwrote: Oh wow, is it true? It seem ProjectsAction-conversion.properties and ProjectsAction must be on the same location on classpath, but it must NOT reside in the classfolder itself. When I added it on the same folder just in src/main/resources its used from struts. Why not from the same location as the class is? Cheers Christian On Mon, Apr 18, 2011 at 5:40 PM, Christian Grobmeier grobme...@gmail.com wrote: Hi, It appears to be trying to set an Array of Strings to your setDeadlineTime method, is it typed to take an Array of Strings? no arrays anywhere. But I found out I get more debug output with: log4j.logger.com.opensymphony.xwork2=DEBUG Now I could see that my conversion.properties file is not loaded. None of my converters is used, it works for the other fields with the default converter. A shortened logfile: DEBUG Property: deadlineTime DEBUG Class: ...Project DEBUG field-level type converter for property [deadlineTime] = none found DEBUG Property: project.deadlineTime DEBUG Class: ProjectsAction DEBUG global-level type converter for property [deadlineTime] = noe found DEBUG falling back to default type converter XWorkBasicConverter my time textfield throws an error, it cannot be handled by the default converter. Now my assumption is i have done something wrong with the conversion properties. My entity is named Project. The props is named: Project-conversion.properties Its located in the same package as Project. I have tried it with my Action ProjectsAction too. The file is ProjectsAction-conversion.properties Same location as ProjectsAction. Content is as follows: deadlineTime = de.converter.DateConverter or in the actions case: project.deadlineTime = de.converter.DateConverter Any ideas why this is not drawn by Struts? Thanks! Christian (*Chris*) On Mon, Apr 18, 2011 at 7:59 AM, Christian Grobmeier grobme...@gmail.comwrote: Hi all, i have a form with only 6 values. 4 Dates, 1 int, one string. I created 2 different conversion classes for the 4 dates. One is for creating a good date from a string like 13:30, one is for the actual date. I don't know why, but the ones for dates work and the one for time does not work. Even when i use the same conversion class for all fields, the time fields do not work. In my jsp they are named correct: project.deadlineTime In my Pojo it is: Project.setDeadlineTime(Date deadlineTime) In my MyAction-conversion.properties: project.deadlineTime = de.blub.converter.TimeConverter As the property file has the working conversions defined, I assume it is drawn correct. To avoid a problem in the converter, i have returned a new Date and once exchanged it with the working stuff. But nothing helped It always claims Error setting expression 'project.deadlineTime' with value '[Ljava.lang.String;@73ea7821' ognl.MethodFailedException: Method setDeadlineTime failed for object Then I tried to enable some logging output in the Converters. But they do not output anything (for none of the fields). All other of my classes can create output on the specific level. Even when I debug I cannot breakpoint and step into them. It is as if they would not exist. In all other classes it works My questions: - any ideas what I could look for and why the two fields are not working? - why is there no logging possible? - and why can't I get into a breakpoint when debugging with eclipse and run-jetty-run plugin? Any help is appreciated :-( Thanks! Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de
Creating menu bar based on session information
Hi all, this is probably a trivial question, but I am unsure how to solve it best. I have an object User user. It has the properties name, password and ListRoles roles. Now I would like to create a navigation bar in my struts 2.2.1 jsp pages. I wanted to avoid huge chunks of logic in my code. Therefore java code in my templates should be avoided. I have thought if the if/else struts tag would help me. But can I access a list and look if a specific role is there? How do others do that? Thanks in advance, Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Creating menu bar based on session information
you could do something like this: s:if test=hasPrivilege(#user.roles).../s:if where (bool) hasPrivilege(ListRoles,...) is a function in your action. sounds good. I actually have now that signature in an AbstractAction from which all the other extend: public boolean hasPrivileg(String role) { ... } In my JSP: s:if test=hasPrivilege(\user\)Login/s:if I did not understand why you putted #user.roles in your example. However, my debugger is never going int the hasPrivileg method. What am I missing? Cheers Christian - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Creating menu bar based on session information
s:if test=hasPrivilege(\user\)Login/s:if The correct syntax is: s:if test=hasPrivileg('user') == trueYeah/s:if I really would enjoy some more debugging help in this area Cheers - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Creating menu bar based on session information
s:if test=hasPrivileg('user') == trueYeah/s:if Actually, you added a spelling mistake (+e on Privileg). However, the previous example would work fine. So a hybrid of the two: Actually I had the spelling typo before, but now saw that in english it is with +e s:if test=hasPrivilege('user')Yeah/s:if You are right, this works. After all I am not sure why I have lost so much time today on this. Thanks Christian is sufficient. Beez - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org -- http://www.grobmeier.de - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Forward to original page
Hello, there is a form, which is included in all three templates. It sets the sort-order for my results. The Problem is, when i change this order i would like to be forwarded to the page where the form has been submitted. You could pass the name of the forwarding as a hidden field into the form. The value of the field is defined in the tile definition of the actual page template. You might put tiles:importAttribute scope=request / into the page templates to have access to that page attribute (not sure about this). Thank you for the hint. Despite i believe i have not the best solution, i have one. This is very ugly, but i am under lack of time and have no better idea. script language=JavaScript type=text/javascript var ref=tiles:getAsString name=body /; /script Here i get my body-name in the main-template. At the end of my sub-template i read this javascript var and put it into an hidden field. Problem is, i could not get this value in my sub-template. Probably it doesn't know about the other templates... i have tried the import-tag, but this doesnt work. Well, it worx now, despite it's uglyness :) If someone can correct me, i am eager to hear. I believe i will have this problem again sooner or later. Thanks for your time, Christian Grobmeier - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forward to the requesting page
Hello all, i have written an small application with struts. Now i have a problem, which is easily to solve with such languages as PHP. But with Struts it seems not to be such easy. I have read all the documentation and what i could find in the archives nor in google. I have this pages (Tiles): frontend.overview frontend.details frontend.results there is a form, which is included in all three templates. It sets the sort-order for my results. The Problem is, when i change this order i would like to be forwarded to the page where the form has been submitted. for example: frontend.details - submit the form - action - business - action - forward to frontend.details The same with all templates. Do you have any suggestions? I tried allready such things: return(mapping.findForward(request.getServletPath())); altought request.getServletPath isn't giving me a logical name. Thanks in advance, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Forward to original page
Hello all, i have written an small application with struts. Now i have a problem, which is easily to solve with such languages as PHP. But with Struts it seems not to be such easy. I have read all the documentation and what i could find in the archives nor in google. I have this pages (Tiles): frontend.overview frontend.details frontend.results there is a form, which is included in all three templates. It sets the sort-order for my results. The Problem is, when i change this order i would like to be forwarded to the page where the form has been submitted. for example: frontend.details - submit the form - action - business - action - forward to frontend.details The same with all templates. Do you have any suggestions? I tried allready such things: return(mapping.findForward(request.getServletPath())); altought request.getServletPath isn't giving me a logical name. Thanks in advance, Christian -- take a look -- www.pfister.de Christian Grobmeier -- mailto:[EMAIL PROTECTED] AMAN Media GmbH network media Dorfstrasse 1-4 85235 Unterumbach @ Munich Germany fon: ++49-(0)8134-9100 fax: ++49-(0)8134-9110 technical support: mailto:[EMAIL PROTECTED] http://www.aman.de ~~ Diese eMail enthält vertrauliche und/oder rechtlich geschützte Informationen. Das unerlaubte Kopieren sowie die unbefugte Weitergabe/Weiterleitung dieser Mail ist nicht gestattet. Wenn Sie nicht der richtige Adressat sind oder diese eMail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail This e-mail may contain confidential and/or privileged information. Any unauthorized copying, disclosure or distribution/forwarding of the material in this email is strictly forbidden. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Forward to original page
Hello Rüdiger You could pass the name of the forwarding as a hidden field into the form. The value of the field is defined in the tile definition of the actual page template. You might put tiles:importAttribute scope=request / into the page templates to have access to that page attribute (not sure about this). Does this work? This sounds very good to me. Cause of an emergancy :( i must try this tomorrow. Thanks for this hint. Kindly Regards, Christian - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]