Re: [Stripes-users] Empty requests parameters
Hello, Have you turned on logs ? Stripes can tell you everything it does, which could help pinpoint the problem (binding/validation ? bean resolution ? etc.). HTH Rémi 2017-07-19 13:00 GMT+02:00 MJ: > Hello, > > Nothing special, a sample action bean like > > @UrlBinding(Bindings.LOGIN) > public class LoginActionBean extends ActionBean { > @DefaultHandler > @HandlesEvent("connect") > public Resolution connect() throws Exception { > return new ForwardResolution(Resolutions.HOME); > } > } > > I am using Glassfish 4 and Stripes 1.5.7, the problem is many request are > empty parameters in entry point of ActionBean, and i can't understand what > is wrong. NB: the some request work fine but sometimes server recive it > with > empty parameters (1/10 request failed). > > Thank you for your help. > > > > > -- > View this message in context: http://stripes.996289.n3. > nabble.com/Empty-requests-parameters-tp18061p18077.html > Sent from the stripes-users mailing list archive at Nabble.com. > > > -- > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] retrieve StripesFilter configuration outside of an Stripes request
Yes ServletContextAware suffers the same problem. I think the best option right now, with the current codebase, is to subclass StripesFilter and do whatever you need in init(). This way you are quite sure the filter is there :P A more "Stripey" way to handle this would be a proper initializer component, like : @StartupListener class MyStartupListener implements StripesStartupListener { onStripesAppStarted(...); onStripesAppStopped(...); } Stripes could scan for such component(s) and call it (them). Cheers Rémi 2016-08-02 15:09 GMT+02:00 Juan Pablo Santos Rodríguez < juanpablo.san...@gmail.com>: > Hi Rémi, > > indeed the init sequence problem is there, but the mbean is going to be > called much fewer times than a regular intercepted URL. It doesn't matter > too much if the mbean returns an empty map (people using the mbean would > know the application is starting). Besides, at the time the MBean is going > to be called most probably Stripes Filter has finished initializing anyways. > > The problem with the ServletContextListener equivalent is that you're not > going to be sure if StripesFilter is configured/present or not at context > init time. For instance, it is not on Stripes http test support classes and > who knows on any given container. This same lifecycle problem also happens > implementing ServletContextAware, so right now I've to check every time if > the urlbindings have been grabbed or not. The CustomConfigurableComponent > approach would allow solving this issue, and also allow further custom > extensions of Stripes, by allowing one-off set-up tasks. > > By what I've seen from Stripes source code, it shouldn't be too > complicated, after all the initialization is done, scan classes > implementing that interface and calling their init(Configuration) methods. > I can send a PR, but I fear I won't be able at least until mid-september > (current workload + holidays). > > > > br, > juan pablo > > On Tue, Aug 2, 2016 at 2:44 PM, VANKEISBELCK Remi <r...@rvkb.com> wrote: > >> Hi again Juan Pablo, >> >> Cool ! Glad to know it works. >> >> Indeed, you still have a "init sequence" problem, but I guess that those >> url bindings are irrelevant until the filter is up. >> I mean, you get the actual result by invoking the MBean : it returns an >> empty list of bindings if the filter is not ready yet. >> >> There are probably other ways to do this without "polling", which you >> will eventually do if you need to *wait* for those bindings in order to >> trigger some other processing. >> Stuff like the @CustomConfigurableComponent you talked about : some kind >> of Stripes "ServletContextListener" equivalent, that could invoke another >> service to do whatever needed on startup/destroy. >> I also needed this in most of my apps, and I ended up using the JEE base >> API, which feels mush less "integrated" and has some lifecycle issues... >> >> Feel free to propose an enhancement :) >> >> Cheers >> >> Rémi >> >> >> 2016-08-02 12:47 GMT+02:00 Juan Pablo Santos Rodríguez < >> juanpablo.san...@gmail.com>: >> >>> Hi Rémi, >>> >>> thanks for the tip! :-) Although my JMX MBean doesn't have access to the >>> servlet context, it's also a Spring managed bean, so I've also made it >>> ServletContextAware, which solves the access to the servletContext from the >>> MBean. >>> >>> At the time of servletContext injection, the Stripes Filter hasn't >>> initialized yet, so I just grab the reference to the servletContext there, >>> and ended up with an action method in the lines of: >>> >>> public Map< String, Object > bindings() { >>> if( !scannedConfiguration && servletContext != null ) { >>> final StripesFilter sf = ( StripesFilter >>> )servletContext.getAttribute( StripesFilter.class.getName() ); >>> if ( sf != null ) { >>> grabUrlBindingsFrom( sf.getInstanceConfiguration() ); >>> scannedConfiguration = true; >>> LOG.info( "Stripes Filter configuration readed" ); >>> } else { >>> LOG.warn( "Stripes Filter not yet initialized" ); >>> } >>> } >>> return stripesUrlBindings; >>> } >>> >>> >>> best regards, >>> juan pablo >>> >>> >>> On Mon, Aug 1, 2016 at 7:21 PM, VANKEISBELCK Remi <r...@rvkb.com> wrote: >>> >>>&g
Re: [Stripes-users] retrieve StripesFilter configuration outside of an Stripes request
Hi again Juan Pablo, Cool ! Glad to know it works. Indeed, you still have a "init sequence" problem, but I guess that those url bindings are irrelevant until the filter is up. I mean, you get the actual result by invoking the MBean : it returns an empty list of bindings if the filter is not ready yet. There are probably other ways to do this without "polling", which you will eventually do if you need to *wait* for those bindings in order to trigger some other processing. Stuff like the @CustomConfigurableComponent you talked about : some kind of Stripes "ServletContextListener" equivalent, that could invoke another service to do whatever needed on startup/destroy. I also needed this in most of my apps, and I ended up using the JEE base API, which feels mush less "integrated" and has some lifecycle issues... Feel free to propose an enhancement :) Cheers Rémi 2016-08-02 12:47 GMT+02:00 Juan Pablo Santos Rodríguez < juanpablo.san...@gmail.com>: > Hi Rémi, > > thanks for the tip! :-) Although my JMX MBean doesn't have access to the > servlet context, it's also a Spring managed bean, so I've also made it > ServletContextAware, which solves the access to the servletContext from the > MBean. > > At the time of servletContext injection, the Stripes Filter hasn't > initialized yet, so I just grab the reference to the servletContext there, > and ended up with an action method in the lines of: > > public Map< String, Object > bindings() { > if( !scannedConfiguration && servletContext != null ) { > final StripesFilter sf = ( StripesFilter > )servletContext.getAttribute( StripesFilter.class.getName() ); > if ( sf != null ) { > grabUrlBindingsFrom( sf.getInstanceConfiguration() ); > scannedConfiguration = true; > LOG.info( "Stripes Filter configuration readed" ); > } else { > LOG.warn( "Stripes Filter not yet initialized" ); > } > } > return stripesUrlBindings; > } > > > best regards, > juan pablo > > > On Mon, Aug 1, 2016 at 7:21 PM, VANKEISBELCK Remi <r...@rvkb.com> wrote: > >> Hi again, >> >> Ok, seems too complicated. >> >> Another way maybe : use the StripesFilter instance that is bound to the >> ServletContext. In net.sourceforge.stripes.controller.StripesFilter#init : >> >> this.servletContext.setAttribute(StripesFilter.class.getName(), this); >> >> >> So I guess that you can retrieve the filter's configuration by : >> >> StripesFilter sf = (StripesFilter)servletContext.getAttribute( >> StripesFilter.class.getName()) >> Configuration c = sf.getInstanceConfiguration(); >> >> Now for the multiple configs, I'm not aware of any docs, users, or even >> use cases for the feature. >> I don't see the need for a webapp with multiple runtime configs, >> especially in Stripes which does everything once at startup time... I think >> it's a relic from ancient ages where containers were not managing >> classloader isolation very well... >> If you find any use for this, please tell me, I'd like to know :P >> >> HTH >> >> Rémi >> >> 2016-08-01 19:03 GMT+02:00 Juan Pablo Santos Rodríguez < >> juanpablo.san...@gmail.com>: >> >>> Hi Remi, >>> >>> quite there, but still not sure if there is a better way to do this. >>> >>> ConfigurableComponent is used on two separate places: >>> - to instantiate core parts of Stripes (i.e. object factory, action bean >>> resolver, property binder, context factory, etc.). Stripes only allows to >>> have on of each one of those parts, so if I want to access there Stripes' >>> configuration I have to replace one of those core, default classes with a >>> custom one. Not very appealing. Also, at that stage, Stripes Configuration >>> hasn't finished, so depending on which part you substitute, you may not >>> have all the information you need from Stripes configuration. >>> >>> - to initialize Interceptors which also implement ConfigurableComponent. >>> I went this way, hoping that I could declare an Interceptor without >>> annotating it with @Intercepts (so it would be called only when >>> initializated), but if the Interceptor isn't annotated, then it gets >>> ignored. So I've ended up with an empty intercepts() method which get's >>> called on every request, but at least I'm able to get the required >>> configuration at init() time. Not the cleanest thing, but it gets things >>> done. I also
Re: [Stripes-users] retrieve StripesFilter configuration outside of an Stripes request
Hi again, Ok, seems too complicated. Another way maybe : use the StripesFilter instance that is bound to the ServletContext. In net.sourceforge.stripes.controller.StripesFilter#init : this.servletContext.setAttribute(StripesFilter.class.getName(), this); So I guess that you can retrieve the filter's configuration by : StripesFilter sf = (StripesFilter)servletContext.getAttribute(StripesFilter. class.getName()) Configuration c = sf.getInstanceConfiguration(); Now for the multiple configs, I'm not aware of any docs, users, or even use cases for the feature. I don't see the need for a webapp with multiple runtime configs, especially in Stripes which does everything once at startup time... I think it's a relic from ancient ages where containers were not managing classloader isolation very well... If you find any use for this, please tell me, I'd like to know :P HTH Rémi 2016-08-01 19:03 GMT+02:00 Juan Pablo Santos Rodríguez < juanpablo.san...@gmail.com>: > Hi Remi, > > quite there, but still not sure if there is a better way to do this. > > ConfigurableComponent is used on two separate places: > - to instantiate core parts of Stripes (i.e. object factory, action bean > resolver, property binder, context factory, etc.). Stripes only allows to > have on of each one of those parts, so if I want to access there Stripes' > configuration I have to replace one of those core, default classes with a > custom one. Not very appealing. Also, at that stage, Stripes Configuration > hasn't finished, so depending on which part you substitute, you may not > have all the information you need from Stripes configuration. > > - to initialize Interceptors which also implement ConfigurableComponent. I > went this way, hoping that I could declare an Interceptor without > annotating it with @Intercepts (so it would be called only when > initializated), but if the Interceptor isn't annotated, then it gets > ignored. So I've ended up with an empty intercepts() method which get's > called on every request, but at least I'm able to get the required > configuration at init() time. Not the cleanest thing, but it gets things > done. I also looked at ObjectPostProcessors, but they're instantiated too > early to be able to have a look at url bindings. > > Ideally, to support this kind of use cases, it would be nice to have some > sort of CustomConfigurableComponent (empty interface extending > ConfigurableComponent) which Stripes could use to initialize all classes > implementing it after it's done with the other ConfigurableComponents. > Thoughts? > > Finally, just out of curiosity, regarding multiple configs: I've come > accross some comments on StripesFilter saying that it's possible, is there > any more documentation about this feature? I've had a quick look at > StripesFilter code, so most probably are more comments or javadocs > elsewhere. > > > thanks in advance, > juan pablo > > > > On Thu, Jul 28, 2016 at 3:09 PM, VANKEISBELCK Remi <r...@rvkb.com> wrote: > >> Hi Juan Pablo, >> >> Maybe keep the configuration it as a static field of a >> @ConfigurableComponent ? >> >> Note that it'll work only if you have one config. Stripes config allows >> to do lots of fancy stuff that I personally never used, but who knows, that >> door is open :P >> >> Cheers >> >> Rémi >> >> >> >> 2016-07-28 14:27 GMT+02:00 Juan Pablo Santos Rodríguez < >> juanpablo.san...@gmail.com>: >> >>> Hi, >>> >>> we're currently developing some MBeans for some administrative tasks and >>> we would like to expose all registered ActionBeans URLs through JMX. >>> Obtaining them is easy, if you have a request routed through StripesFilter: >>> >>> Map< String, Object > stripesUrlBindings() { >>> final Map< String, Object > stripesUrlBindings = new HashMap<>(); >>> if( StripesFilter.getConfiguration() != null && >>> StripesFilter.getConfiguration().getActionResolver() instanceof >>> AnnotatedClassActionResolver ) { >>> final AnnotatedClassActionResolver acar = ( >>> AnnotatedClassActionResolver >>> )StripesFilter.getConfiguration().getActionResolver(); >>> final Map< String, Class< ? extends ActionBean > > >>> stripesOriginalUrlBindings = acar.getUrlBindingFactory().getPathMap(); >>> for( final Map.Entry< String, Class< ? extends ActionBean > >>> > entry : stripesOriginalUrlBindings.entrySet() ) { >>> final Map< String, String > map = new LinkedHashMap<>(); >>> map.put( "actionbe
Re: [Stripes-users] retrieve StripesFilter configuration outside of an Stripes request
Hi Juan Pablo, Maybe keep the configuration it as a static field of a @ConfigurableComponent ? Note that it'll work only if you have one config. Stripes config allows to do lots of fancy stuff that I personally never used, but who knows, that door is open :P Cheers Rémi 2016-07-28 14:27 GMT+02:00 Juan Pablo Santos Rodríguez < juanpablo.san...@gmail.com>: > Hi, > > we're currently developing some MBeans for some administrative tasks and > we would like to expose all registered ActionBeans URLs through JMX. > Obtaining them is easy, if you have a request routed through StripesFilter: > > Map< String, Object > stripesUrlBindings() { > final Map< String, Object > stripesUrlBindings = new HashMap<>(); > if( StripesFilter.getConfiguration() != null && > StripesFilter.getConfiguration().getActionResolver() instanceof > AnnotatedClassActionResolver ) { > final AnnotatedClassActionResolver acar = ( > AnnotatedClassActionResolver > )StripesFilter.getConfiguration().getActionResolver(); > final Map< String, Class< ? extends ActionBean > > > stripesOriginalUrlBindings = acar.getUrlBindingFactory().getPathMap(); > for( final Map.Entry< String, Class< ? extends ActionBean > > > entry : stripesOriginalUrlBindings.entrySet() ) { > final Map< String, String > map = new LinkedHashMap<>(); > map.put( "actionbean", entry.getValue().getCanonicalName() > ); > stripesUrlBindings.put( "{[" + entry.getKey() + > "],methods=[*]}", map ); > } > } > return stripesUrlBindings; > } > > However, a JMX call is not going to be routed through the StripesFilter so > StripesFilter.getConfiguration() yields null, and an error stating that the > request hasn't been routed through Stripes is logged. > > any ideas on how to proceed? > > > thanks in advance, > juan pablo > > > -- > > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > > -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Stripes 1.7.0-beta4 is out
Hi folks, Stripes 1.7.0-beta4 is on its way to Maven Central. It's a minor bugfix release. Enjoy, Rémi -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] 1.7.0-beta2 is out
Dear Stripers, 1.7.0-beta2 is on it way to maven central, and should be available in a few hours. It's a minor bugfix release. Enjoy, Rémi -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] new 1.7.0 beta?
Ok, there is a bug on master currently, we need to fix this before I can release. Shouldn't take very long, stay tuned... Cheers Rémi 2016-04-25 14:35 GMT+02:00 VANKEISBELCK Remi <r...@rvkb.com>: > Hi Juan Pablo, > > I'll release a beta2 ASAP. I just noticed that webtests are broken on > master, I have to understand why... > > Will keep you posted. > > Cheers > > Rémi > > 2016-04-22 11:46 GMT+02:00 Juan Pablo Santos Rodríguez < > juanpablo.san...@gmail.com>: > >> Hi, >> >> we're using Stripes 1.7.0 beta1 for some of our ongoing developments, in >> which we noticed issues #51 and #53. Now that the relevant PR have been >> merged on master I was wondering if a new beta could be pushed to central? >> O:-) >> >> So far, aside from those issues, beta1 has been working nicely so we >> wouldn't mind jump to beta2 as soon it is available. Souns reasonable? >> >> >> thanks, >> juan pablo >> >> p.d.: as an aside, >> https://stripesframework.atlassian.net/wiki/display/STRIPES/Home points >> to JIRA as the project's issue tracker but the project seems to be using >> github for that now. Some OSS projects require an issue (either at JIRA or >> at github) + a PR, some are fine with just a PR, others are sometimes fine >> with e-mails.. Which / where is the appropiate way / you guys are more >> comfortable to raise an issue for Stripes? >> >> >> -- >> Find and fix application performance issues faster with Applications >> Manager >> Applications Manager provides deep performance insights into multiple >> tiers of >> your business applications. It resolves application problems quickly and >> reduces your MTTR. Get your free trial! >> https://ad.doubleclick.net/ddm/clk/302982198;130105516;z >> ___ >> Stripes-users mailing list >> Stripes-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/stripes-users >> >> > -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] new 1.7.0 beta?
Hi Juan Pablo, I'll release a beta2 ASAP. I just noticed that webtests are broken on master, I have to understand why... Will keep you posted. Cheers Rémi 2016-04-22 11:46 GMT+02:00 Juan Pablo Santos Rodríguez < juanpablo.san...@gmail.com>: > Hi, > > we're using Stripes 1.7.0 beta1 for some of our ongoing developments, in > which we noticed issues #51 and #53. Now that the relevant PR have been > merged on master I was wondering if a new beta could be pushed to central? > O:-) > > So far, aside from those issues, beta1 has been working nicely so we > wouldn't mind jump to beta2 as soon it is available. Souns reasonable? > > > thanks, > juan pablo > > p.d.: as an aside, > https://stripesframework.atlassian.net/wiki/display/STRIPES/Home points > to JIRA as the project's issue tracker but the project seems to be using > github for that now. Some OSS projects require an issue (either at JIRA or > at github) + a PR, some are fine with just a PR, others are sometimes fine > with e-mails.. Which / where is the appropiate way / you guys are more > comfortable to raise an issue for Stripes? > > > -- > Find and fix application performance issues faster with Applications > Manager > Applications Manager provides deep performance insights into multiple > tiers of > your business applications. It resolves application problems quickly and > reduces your MTTR. Get your free trial! > https://ad.doubleclick.net/ddm/clk/302982198;130105516;z > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > > -- Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Asynchronous Actions (beta)
Dear Stripers, Asynchronous Actions are now available in master (1.7.0-SNAPSHOT). I have also released a beta, so that you don't need to build yourself : net.sourceforge.stripes stripes 1.7.0-beta1 (I've just released, so it might take a few hours to propagate to Maven Central) For those who haven't followed the conversations on github, Async Actions allow to write non-blocking/asynchronous event handlers, "a la Servlet3 async". The related wiki page (probably needs some improvements) : https://stripesframework.atlassian.net/wiki/display/STRIPES/Asynchronous+Actions The github ticket(s) : https://github.com/StripesFramework/stripes/issues/37 https://github.com/StripesFramework/stripes/issues/47 (tomcat bug) There's a (simple) async action in the examples webapp : https://github.com/StripesFramework/stripes/blob/master/examples/src/main/java/net/sourceforge/stripes/examples/async/AsyncActionBean.java As usual, feedback is most appreciated. Cheers Rémi -- Transform Data into Opportunity. Accelerate data analysis in your applications with Intel Data Analytics Acceleration Library. Click to learn more. http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes-users Digest, Vol 113, Issue 4
Hi Ron, Sending an email at the end of the task is even easier : you don't need polling at all ! Simply submit a runnable with your webservice call and response handling (send the email) to an ExecutorService from the action. This is "fire and forget" : submission to the executor doesn't block. Then just return a redirect to the action you want. Stuff like : public Resolution submitTaskAndProceed() { executorService.submit(new MyTask(this)); return new RedirectResolution(MyActionAfterSubmitTask.class); } As you see the action can be an argument of the task, in case you need it. I prefer to pass actual required data as it makes your task testable outside of Stripes. The whole point here is that your action bean is a regular one. It submits a job to a thread pool, that's all. HTH Rémi 2016-01-25 17:54 GMT+01:00 Ron King <ronck...@gmail.com>: > The link that Joaquin describes is not quite what I want either. I want to > allow the user to go ahead and > continue to work, not wait one minute before they can go on. This seems to > describe a scenario where a 'wait page' would be updated periodically, and > I don't want the user to have to wait at all. Sending an email from within > the action upon completion would work for me as far as notifying the user > about their form submission. > > It appears to me that If I can get the response writer to write out my new > page at the beginning of the submission, it would satisfy my requirement. > How can I ensure that the writer is flushed? > > > https://stripesframework.atlassian.net/wiki/display/STRIPES/Wait+Page+for+Long+Events > > On Mon, Jan 25, 2016 at 3:00 AM, < > stripes-users-requ...@lists.sourceforge.net> wrote: > >> Send Stripes-users mailing list submissions to >> stripes-users@lists.sourceforge.net >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/stripes-users >> or, via email, send a message with subject or body 'help' to >> stripes-users-requ...@lists.sourceforge.net >> >> You can reach the person managing the list at >> stripes-users-ow...@lists.sourceforge.net >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Stripes-users digest..." >> >> >> Today's Topics: >> >>1. Re: Writing to response.writer is not working (Joaquin Valdez) >>2. Re: Infinite loop issue on stripes layout components inside >> jsp tag (Zlatka Mihaylova) >> >> >> -- >> >> Message: 1 >> Date: Sat, 23 Jan 2016 11:41:57 -0700 >> From: Joaquin Valdez <joaquinfval...@gmail.com> >> Subject: Re: [Stripes-users] Writing to response.writer is not working >> To: r...@rvkb.com, Stripes Users List >> <stripes-users@lists.sourceforge.net> >> Message-ID: <c434177a-267a-42a6-be86-4bf7d6b64...@gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Hi! >> >> Is this the same idea as this: >> >> >> https://stripesframework.atlassian.net/wiki/display/STRIPES/Wait+Page+for+Long+Events >> ? >> >> Joaquin >> >> > On Jan 23, 2016, at 10:52 AM, VANKEISBELCK Remi <r...@rvkb.com> wrote: >> > >> > Hi again, >> > >> > Seems like a regular "long running job / polling" scenario. It can be >> done with current Stripes version, even if it will be less performant if >> your http client is really non blocking, but that's another story. >> > >> > So here's how I'd do this. >> > >> > 1/ Server side >> > >> > In the ActionBean, I'd submit a task to an executor service (a thread >> pool) with that long running job that calls the webservice. This task >> should update the back-end state in some way, so that you can do polling >> and know when it's done. >> > The same ActionBean can handle Ajax polling via another event method. >> This one will be called from some JS code in your page. >> > >> > public class MyAction implements ActionBean { >> > >> > public Resolution triggerLongRunningJob() { >> > // retrieve Executor Service, from servlet context or custom >> ActionBeanContext >> > ExecutorService executorService = ... ; >> > // submit task >> > executorService.submit(new MyLongRunningTask(...); >> > // return a redirect resolution to the "wait" screen >> > return new Redirect
Re: [Stripes-users] Using an executor with Stripes, on Tomcat 8
No there's no issue using an ExecutorService inside a container. Most frameworks use their own thread pools today. Just create it in an init context listener or something like this, and shutdown it properly when the app closes. Cheers Rémi 2016-01-26 17:23 GMT+01:00 Ron King <ronck...@gmail.com>: > Remi, from some of my reading, I'm getting the impression > that one should be careful when using threads inside of a > servlet container. How do you do this, can you elaborate? > > On Tue, Jan 26, 2016 at 9:23 AM, < > stripes-users-requ...@lists.sourceforge.net> wrote: > >> Send Stripes-users mailing list submissions to >> stripes-users@lists.sourceforge.net >> >> To subscribe or unsubscribe via the World Wide Web, visit >> https://lists.sourceforge.net/lists/listinfo/stripes-users >> or, via email, send a message with subject or body 'help' to >> stripes-users-requ...@lists.sourceforge.net >> >> You can reach the person managing the list at >> stripes-users-ow...@lists.sourceforge.net >> >> When replying, please edit your Subject line so it is more specific >> than "Re: Contents of Stripes-users digest..." >> >> >> Today's Topics: >> >>1. Re: Flushing a writer before the ActionBean has completed >> (Ron King) >> >> >> -- >> >> Message: 1 >> Date: Tue, 26 Jan 2016 09:23:06 -0600 >> From: Ron King <ronck...@gmail.com> >> Subject: Re: [Stripes-users] Flushing a writer before the ActionBean >> has completed >> To: stripes-users@lists.sourceforge.net >> Message-ID: >> < >> can2l1vr_sxg8xo13fun2-vo82r6r2rqvxw5jf0gxjpdezjj...@mail.gmail.com> >> Content-Type: text/plain; charset="utf-8" >> >> Thanks Remi, I'll give this some thought, this helps a lot. >> Also, I did come up with a way to prompt the user at the beginning of the >> submission. >> I pop up a jquery-ui dialog box, instead of trying to use the response >> writer >> to write a new page. >> >> On Tue, Jan 26, 2016 at 2:15 AM, < >> stripes-users-requ...@lists.sourceforge.net> wrote: >> >> > Send Stripes-users mailing list submissions to >> > stripes-users@lists.sourceforge.net >> > >> > To subscribe or unsubscribe via the World Wide Web, visit >> > https://lists.sourceforge.net/lists/listinfo/stripes-users >> > or, via email, send a message with subject or body 'help' to >> > stripes-users-requ...@lists.sourceforge.net >> > >> > You can reach the person managing the list at >> > stripes-users-ow...@lists.sourceforge.net >> > >> > When replying, please edit your Subject line so it is more specific >> > than "Re: Contents of Stripes-users digest..." >> > >> > >> > Today's Topics: >> > >> >1. Re: Stripes-users Digest, Vol 113, Issue 4 (VANKEISBELCK Remi) >> > >> > >> > -- >> > >> > Message: 1 >> > Date: Tue, 26 Jan 2016 09:15:03 +0100 >> > From: VANKEISBELCK Remi <r...@rvkb.com> >> > Subject: Re: [Stripes-users] Stripes-users Digest, Vol 113, Issue 4 >> > To: Stripes Users List <stripes-users@lists.sourceforge.net> >> > Message-ID: >> >
Re: [Stripes-users] Writing to response.writer is not working
Hi again, Seems like a regular "long running job / polling" scenario. It can be done with current Stripes version, even if it will be less performant if your http client is really non blocking, but that's another story. So here's how I'd do this. 1/ Server side In the ActionBean, I'd submit a task to an executor service (a thread pool) with that long running job that calls the webservice. This task should update the back-end state in some way, so that you can do polling and know when it's done. The same ActionBean can handle Ajax polling via another event method. This one will be called from some JS code in your page. public class MyAction implements ActionBean { public Resolution triggerLongRunningJob() { // retrieve Executor Service, from servlet context or custom ActionBeanContext ExecutorService executorService = ... ; // submit task executorService.submit(new MyLongRunningTask(...); // return a redirect resolution to the "wait" screen return new RedirectResolution(getClass(), "displayWaitScreen") } public Resolution displayWaitScreen() { return new ForwardResolution("/WEB-INF/jsp/wait-screen.jsp"); } public Resolution poll() { // find task completion status and return to the client String jsonTaskCompletion = ... ; return new StreamingResolution("application/json", jsonTaskCompletion); } // the long running task code is in a Runnable private class MyLongRunningTask implements Runnable { public void run() { // call the webservice and update internal state } } } 2/ Client side First you'll submit the form to the 'triggerLongRunningJob' event. This will launch the background task and return directly. Then, you'll send xhr requests to the 'poll' event, that will tell you what to do next. If task has completed, then you'll probably change the location of the browser in some way in order to display a "result" page of some sort (ie use your data from the completed task and do whatever you need with it). HTH Rémi 2016-01-23 17:05 GMT+01:00 Ron King: > Hi everyone, > > I want to write an html page back to the user at the very beginning of an > ActionBean submit method. > The method calls a web service that takes around a minute to respond, and > I want to put up a message > before the web service finishes. > > I'm on Tomcat 8. I tried flushing the writer, but the page still doesn't > display until after I return the > Resolution from the submit method. > > Is there a way to make it write immediately? > > Regards, > > Ron > > > -- > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140 > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > > -- Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311=/4140___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Where does variable 'contacts' came from in the book about Stripes?
Hi, When you write this in EL : ${actionBean.contacts} It actually looks for a JavaBean property named "contacts" on an object named "actionBean" bound to a JSP scope (here, request). In that case, it ends up invoking "getContacts". Cheers Rémi 2015-12-23 18:10 GMT+01:00 Tika Spic: > I'm currently only reading the book "Stripes: ...and Java web development > is fun again". > Since I'm not new to web development, I'm able to read this book without > practicing in editor. > > I have spot a problem on page 47 in the following line: > > > > What is this reference "contacts"? It is not explicitly declared in the > action bean. It does exist only in this method name: > > public List getContacts() { >return contactDao.read(); > } > > So, was the "contacts" reference accidentally dropped from the code or > Stripes perhaps uses implicit declarations according to some naming > conventions, e.g. method naming? I believe that it was accidentally dropped, > since in the first chapter a "date" reference was used in similar way, but > now I'm not sure that there is not some kind of implicit declarations since > Stripes forces convention over configuration. > > > -- > > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > > -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Newbie
Hi, You are right that samples in the distribution should show how to lake the best out of the fwk. Unfortunately, it's not always true in our case... The Calc example for instance is crappy, and we should rewrite it. It doesn't even follow the "pre-action" pattern and allows access to JSPs. Also, we have all samples in the same webapp. We should have separate webapps for separate samples instead, would be less confusing (dependencies, custom interceptors etc). I'd recommend "bugzooky", as it shows indexed props, the s:form taglib, post-and-redirect, and things like this. It's probably the most comprehensive sample we have for "traditional" webapp dev (ie not Ajax). There's no forum I know of, but the list is just the same. There ain't too many people, so feel free to drop an email whenever you have a question. Cheers Rémi 2015-12-21 22:21 GMT+01:00 tika: > > > > > > tika, > > You've already gotten some great answers from other folks. I'll only add > that you should also check out the Stripes example applications. They are > a > great way to see easy to understand examples of real world use cases. > Welcome to Stripes! > > > > -- Rick > > > > > > On Mon, Dec 21, 2015 at 9:02 AM, tika > wrote:Hi all. > > I haven't been programming web apps for a long time and now I want to > rework > > one of my apps from Struts 1 to something else. It seems to me that, > > compared to other web frameworks, Stripes seems to be appropriate for my > > needs and flavour. My question is regarding the book about Stripes. It > was > > published in 2008 and I'm wondering what part of that book is still valid > > for Stripes 1.6? > > Second, I will also vote for JsonBuilderFactory as my favourite is genson > > library. > > Kind regards. Tika. > > > -- > Thank you all. > > Yes, I'm aware of the existence of the new book about Stripes but wanted > some more info about "Stripes: ...and Java web development is fun again". > I'm very glad to hear it is still valid. It says a lot about framework. > > Thank you for your tip Rick. I usually use to say that framework example > applications can be considered as a best framework usage patterns so are > something that should not be avoided. > > p.s. > Is there some forum about Stripes? > > -- > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] OSGi + Stripes
Hi Yann, Stripes's classpath scanning has its ways. It does several tricks in order to try to find the classes in the "CLASSPATH", but this is off the Java spec, and therefore not guaranteed to work correctly everywhere. It depends a lot on the environment that creates the app's class loaders... How is your app packaged (ie where are the action bean classes) ? What app server are you using ? Cheers Rémi 2015-11-02 20:27 GMT+01:00 Yann Bourdeau: > Hi All, > > I’m trying to create a bundle in OSGi (Karaf 3,.0.3) of a Stripes > application. I’m not too much familiar with OSGi but i’m familiar with > Stripes. I’m trying to run the calculator sample and everything is working > fine except for the scanning of the action beans. The action bean do not > seems to be found when scanned at the startup. Do I need to do something > special to the package that contains the action beans. Like exporting it? > Any help is welcome. > > thanks in advance. > > Yann Bourdeau, M.Ing. > Senior Software Developer > 438-499-4607 > yann.bourd...@noviflow.com > > > > > > -- > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] OSGi + Stripes
I have absolutely zero knowledge of those OSGI servers, but as soon as they manage class (re)loading etc, I guess that Stripes "Virtual File System" gets confused. This is one of the major issues today with Stripes IMHO, the VFS. We already have regular JEE servers that we don't support, so I guess OSGI is even worse :/ Classpath scanning is done by the class : net.sourceforge.stripes.vfs.DefaultVFS Maybe you could configure the logs to DEBUG for this logger and see what it outputs ? This (plus an explanation of the "war" contents) would help to understand where it fails. Cheers Remi 2015-11-03 16:46 GMT+01:00 Yann Bourdeau <yann.bourd...@noviflow.com>: > Hi Remi, > > Thanks for replying. > > I use Apache Karaf 3.0.3 on top of Apache Felix. > > I use the felix maven bundle creator in Maven. I have exported the package > the contains the Action Bean. I have modified the class path ton include > WEB-INF/classes (where if i’m not mistaken it is where the Action Bean > package reside). I know that class loaders are modified by the OSGi > container. Maybe it is not possible. > > thanks > > Le 3 nov. 2015 à 10:14, VANKEISBELCK Remi <r...@rvkb.com> a écrit : > > Hi Yann, > > Stripes's classpath scanning has its ways. It does several tricks in order > to try to find the classes in the "CLASSPATH", but this is off the Java > spec, and therefore not guaranteed to work correctly everywhere. It depends > a lot on the environment that creates the app's class loaders... > > How is your app packaged (ie where are the action bean classes) ? > What app server are you using ? > > Cheers > > Rémi > > > 2015-11-02 20:27 GMT+01:00 Yann Bourdeau <yann.bourd...@noviflow.com>: > >> Hi All, >> >> I’m trying to create a bundle in OSGi (Karaf 3,.0.3) of a >> Stripes application. I’m not too much familiar with OSGi but i’m familiar >> with Stripes. I’m trying to run the calculator sample and everything is >> working fine except for the scanning of the action beans. The action bean >> do not seems to be found when scanned at the startup. Do I need to do >> something special to the package that contains the action beans. Like >> exporting it? Any help is welcome. >> >> thanks in advance. >> >> Yann Bourdeau, M.Ing. >> Senior Software Developer >> 438-499-4607 >> yann.bourd...@noviflow.com >> >> >> >> >> >> -- >> ___ >> Stripes-users mailing list >> Stripes-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/stripes-users >> > > > -- > ___ > Stripes-users mailing list > Stripes-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/stripes-users > > > Yann Bourdeau, M.Ing. > Senior Software Developer > 438-499-4607 > yann.bourd...@noviflow.com > > > > -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Integrate Hibernate or eBean with Stripes
Hi, Unfortunately there ain't no official Stripes/Hibernate plugin as far as I know. We had Stripernate once but it doesn't seem to exist any more. We discussed this on IRC recently and agreed it's a problem, the lack of such integration layers... We're typically in the case of someone who wants to persist data (everybody or almost does) and we have no real answer for him. It's doable and many of us rolled their own solution, but it's not available directly, as a plugin, whereas it totally could (Stripernate). Anyway, here's how it goes : 1/ setup the SessionFactory at init time (webapp listener or load-on-startup servlet), configure the entity classes etc 2/ register Type Converter(s) and Formatters for Entity classes : those will convert incoming HTTP params to Entity objects (we often refer to this as hydratation of the Domain Objects) 3/ manage transactions (per request - OSIV, per DAO call, ...) 4/ integrate Validator to ValidationMetadataProvider I think integrating another ORM would be pretty much similar. 1,2 and 3 are pretty easy to handle. 4 is another story. Here's some code (from Woko http://woko.pojosontheweb.com) if you want to have a look : 1/ https://github.com/pojosontheweb/woko/blob/develop/hibernate/src/main/java/woko/hibernate/HibernateStore.java (implementation of the persistence layer built on hibernate) 2/ https://github.com/pojosontheweb/woko/blob/develop/core/src/main/java/woko/actions/WokoTypeConverter.java and https://github.com/pojosontheweb/woko/blob/develop/core/src/main/java/woko/actions/WokoFormatter.java and their factories : those use the ObjectStore in 1/ in order to do the job. 3/ https://github.com/pojosontheweb/woko/blob/develop/core/src/main/java/woko/actions/WokoTxInterceptor.java (OSIV style, implemented as a Stripes Interceptor) 4/ https://github.com/pojosontheweb/woko/blob/develop/core/src/main/java/woko/actions/nestedvalidation/NestedValidationMetadataProvider.java Again, this code is clearly not something you should need to worry about, it is quite specific Stripes/Hb gluecode. So I'd start with a built-in stack if I were you, be it Woko or another, but with one single requirement : your UI code (ie controllers and views) should not depend on the framework. If it's done correctly, persistence is non-intrusive, and you should be able to replace the whole thing without impacting the whole app. The code that depends on Hb is the Type Converters and stuff, but again, this is transparent. With Woko, and probably the other folks' frameworks too, you just write annotated entities and have all the rest working directly (1,2,3, and 4). Then you can write your ActionBeans and JSPs, with a persistence layer that works ootb. You don't have to use *all* of those stacks, and they can serve as a bootstrap for writing applicative code directly instead of plumbing. You can even remove the dep on the fwk eventually, and implement the persistence layer differently. Cheers Rémi 2015-08-21 2:27 GMT+02:00 parveen yadav parveenyadavtit...@gmail.com: Hi All, This is my first interaction with Stripes. The framework looks clean and simple. I come from Oracle Commerce(formally ATG) background and do not have experience with any other frameworks at all. I am unable to find any step by step guide to integrate Hibernate or EBean with stripes. The documentation (only for Hibernate) provided on the site is more for a experienced programmer. I am developing a portal related to real-estate. It will be really helpful if someone could help me out on integrating ebeans or hibernate with Stripes thanks yadav -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Static-typed Views in Stripes
Hi folks, As I explained in a previous email, I'm trying to make Views statically typed in Stripes, like Scala Templates are in Play2. I think I have something quite cool, that I'd like to share with you. Here's a draft of an article I wrote to explain all this : https://github.com/pojosontheweb/ttt-stripes-quickstart/blob/master/ARTICLE.md To have a look at the sources and play with the test app (java8) : git clone https://github.com/pojosontheweb/ttt-stripes-quickstart.git cd ttt-stripes-quickstart mvn jetty:run = http://localhost:8080/ It ain't production-ready yet, and lacks IDE tooling (only an IDEA plugin is available yet, and it lacks features such as refactoring, debugger etc), but it's definitely promising. A type-safe alternative to JSP. Finally. Feedback/review most appreciated. Cheers Rémi -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Typed Text Templates with Stripes
Hi folks, I have managed to wrap up a 0.1-beta release for those who want to try out TTT templates with Stripes. The whole TTT fwk (compiler, build tools, IDE plugin) is there : https://github.com/pojosontheweb/ttt The Stripes integration is here : https://github.com/pojosontheweb/ttt/tree/master/stripes For the impatient, here's a TTT-style Calculator template https://github.com/pojosontheweb/ttt/blob/master/stripes-testprj/src/main/java/stttripes/templates/CalculatorTemplate.ttt, adapted from the Stripes Examples. I don't have much of the JSP tags ported yet (basically only s:form and s:link), but it's easier than I thought. I hope to continue with this and cover the whole features soon. Tell me what you think. Cheers Rémi -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Typed Text Templates with Stripes
Hi Nestor, I don't know razor, but it doesn't seem to have the signature as first class citizen, like TTT does. new MyTemplate( myFoo, myBar ).render( out ); It's a huge difference. With TTT, if you change the signature of a template, then the ActionBean(s) using it will not compile. Compare this to using a jsp:forward, which ain't typesafe at all... As for JSP/Scriptlets, I'm trying to stick to JSP subset just because this way I can reuse JSP IDE tooling. It's really cool to see the completion, error reporting etc at work without actually coding anything, just associating .ttt files to JSP editor in IDEA... So I've managed to use only parts of the JSP syntax for my own needs. For example, I use the JSP declaration (first code-like block in template, the between %! and %) in order to declare the template's signature. So this template : %! String foo; % has 1 arg 'foo' of type String. It compiles to an immutable class with one constructor that accepts all defined arguments, and has a render() method : new MyTemplate( hey there ).render( out ); Cheers Rémi 2015-08-06 2:17 GMT+02:00 Nestor Hernandez ilu...@gmail.com: Hey Remi. Looks good. Seems to try to emulate ASP. NET razor template. But, seems like you're intentionally breaking rules about the use of scriptlets. El 5/8/2015 19:00, VANKEISBELCK Remi r...@rvkb.com escribió: Hi folks, I have managed to wrap up a 0.1-beta release for those who want to try out TTT templates with Stripes. The whole TTT fwk (compiler, build tools, IDE plugin) is there : https://github.com/pojosontheweb/ttt The Stripes integration is here : https://github.com/pojosontheweb/ttt/tree/master/stripes For the impatient, here's a TTT-style Calculator template https://github.com/pojosontheweb/ttt/blob/master/stripes-testprj/src/main/java/stttripes/templates/CalculatorTemplate.ttt, adapted from the Stripes Examples. I don't have much of the JSP tags ported yet (basically only s:form and s:link), but it's easier than I thought. I hope to continue with this and cover the whole features soon. Tell me what you think. Cheers Rémi -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] [Stripes-dev] Stripes 1.6 Released!
Cool ! Nice work fellows ! I thought we were pretty much dead ;P Is there any kinda major changes page where we can see what's really different compared to 1.x ? The processors etc... I've been away from the IRC channel for a while, but I recall that the others (Ben and the gang) had changed a few things like the lifecycle changes etc. Aside from my daily job, I've been trying Play! recently and I've been quite impressed. It has the strongest foundation I've seen, plus a ton of neat little things. Anyway, here' my wish list for 2.0, inspired from Play! : 1/ Async, non-blocking support 2/ Dynamic action beans (ie that are resolved at run-time instead of startup-time) 3/ Better flash scope (using cookies for example) 4/ Built-in JSON support 5/ Statically Typed templates 6/ Full Java config (probably already doable, not sure) 7/ Nested Validation (we do this already on 1.7 with Woko, but it's a bit hackish) BeanValidatio JSR ? 8/ Hot reload (JavaRebel ?) I have tried 1/ over the 1.7 codebase and it seemed impossible. Same for 2/ : the concept of dynamic actions isn't compatible with the current lifecycle... Cheers ! Rémi 2015-07-23 23:09 GMT+02:00 Rick Grashel rgras...@gmail.com: Hi all, I wanted to take this opportunity to announce the formal release of Stripes v1.6. For those who are running earlier versions of Stripes (v1.5.8 or earlier) or even earlier versions of 1.6-SNAPSHOT, there are significant improvements and defect fixes. The list of items included in this release are at the following link: https://stripesframework.atlassian.net/issues/?filter=10230 You can download the latest release from Github here: https://github.com/StripesFramework/stripes/releases Or you can download it directly from Jenkins: https://stripesframework.ci.cloudbees.com/job/Stripes%201.6.0/lastSuccessfulBuild/artifact/dist/target/ The 1.6 release has been published to Sonatype repo, so it is available through Maven for inclusion in your POMs (thanks, Ben!). Planning for Stripes 2.0 is going to be underway. If you have suggestions for improvements, fixes, or new features you'd like to see, please feel free to enter an issue request in JIRA ( https://stripesframework.atlassian.net/), post a message here (stripes-users, stripes-devel), or let us know on IRC (#stripes). There have been some great suggestions already for things to help take Stripes 2.0 into the future. We'd love to hear your feedback. Thanks! -- Rick -- ___ Stripes-development mailing list stripes-developm...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-development -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes-users Digest, Vol 107, Issue 4
The excerpt from the doc is when you *cannot* use ranges. The best practise for resuming downloads is range. There ain't no alternative AFAIK in the HTTP protocol. From the spec : https://tools.ietf.org/html/rfc7233#section-1 Hypertext Transfer Protocol (HTTP) clients often encounter interrupted data transfers as a result of canceled requests or dropped connections. When a client has stored a partial representation, it is desirable to request the remainder of that representation in a subsequent request rather than transfer the entire representation And from the Stripes docs : Reasons for enabling byte range serving: ... - Supporting resuming download managers I'm pretty much sure that's what you want... Cheers Rémi 2015-06-23 1:17 GMT+02:00 Heather and Jon Turgeon tashiba40_evergr...@hotmail.com: Hi Remi, I did consider rangeSupport but I read this in the docs as a reason why not to use range support. The input to this StreamingResolution http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/StreamingResolution.html was created on-demand, and retrieving in byte ranges would redo this process for every byte range. All my content is generated on demand, but my users often see failed downloads. I personally have only seen this when the internet connection is dropped (we are all on sailboats so our connections are either wifi or 3G). I guess my question is does anyone know the best practice for retrying dynamic content downloads? I am guessing it is something in my Javascript (I am using jquery and ajax to do the download) where I make sure the download was complete, if not try again for x numbers of times before giving up? From: stripes-users-requ...@lists.sourceforge.net Subject: Stripes-users Digest, Vol 107, Issue 4 To: stripes-users@lists.sourceforge.net Date: Mon, 22 Jun 2015 12:00:53 + Send Stripes-users mailing list submissions to stripes-users@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/stripes-users or, via email, send a message with subject or body 'help' to stripes-users-requ...@lists.sourceforge.net You can reach the person managing the list at stripes-users-ow...@lists.sourceforge.net When replying, please edit your Subject line so it is more specific than Re: Contents of Stripes-users digest... Today's Topics: 1. Re: File downloads, not really sure how to phrase question (Nestor Hernandez) 2. Re: File downloads, not really sure how to phrase question (VANKEISBELCK Remi) 3. Re: File downloads, not really sure how to phrase question (Nestor Hernandez) -- Message: 1 Date: Sun, 21 Jun 2015 11:39:56 -0500 From: Nestor Hernandez ilu...@gmail.com Subject: Re: [Stripes-users] File downloads, not really sure how to phrase question To: Stripes Users List stripes-users@lists.sourceforge.net Message-ID: CAMsyVLKAgNracwgYpqoENRZDy88SNPp8akeVC1c9=5wwgh+...@mail.gmail.com Content-Type: text/plain; charset=utf-8 Hi Jon, I think your requirement has more to do with the way you manage your files than with Stripes. My advise that you split the file in multiple parts and then give option to the user to download those parts A quick google for 'split file java' send me to http://www.eecis.udel.edu/~trnka/CISC370-05J/code/FileSplitter/FileSplitter.java . Maybe you can adapt that code. El jun. 21, 2015 3:42 AM, Heather and Jon Turgeon tashiba40_evergr...@hotmail.com escribi?: Hi all, my app builds files to download upon a user's request. Using StreamingResolution seems to work well most of the time. One problem I seem to be having is my site sort of supports users with internet connections that are frequently less than great (it is a site used by sailors cruising in remote areas of the world). I think what I need to implement is some sort of multi-part with checksum for these downloads in order to get these files to my users. Could someone point me in the right direction as to how to go about this using Stripes? I am guessing something on the client end will also need to be written? Jon -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- next part -- An HTML attachment was scrubbed... -- Message: 2 Date: Mon, 22 Jun 2015 12:55:17 +0200 From: VANKEISBELCK Remi r...@rvkb.com Subject: Re: [Stripes-users] File downloads, not really sure how to phrase question To: Stripes Users List stripes-users@lists.sourceforge.net Message-ID: CAG-EEs1CwFapEPoqtjz6
Re: [Stripes-users] File downloads, not really sure how to phrase question
Hi Have you considered using range support ? http://svn.tools.ietf.org/svn/wg/httpbis/specs/rfc7233.html It allows a client to specify a range of the resource to be fetched, so that the resource can be downloaded in chunks. Stripes does provide support for Ranges : http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/StreamingResolution.html#setRangeSupport(boolean) Most media players / download tools (even the browsers) implement ranges client-side. For example, when you browser downloads a large file, the download may be interrupted several times without you even noticing it. The browser uses ranges to resume the download from where it last stopped. Cheers Rémi 2015-06-21 10:42 GMT+02:00 Heather and Jon Turgeon tashiba40_evergr...@hotmail.com: Hi all, my app builds files to download upon a user's request. Using StreamingResolution seems to work well most of the time. One problem I seem to be having is my site sort of supports users with internet connections that are frequently less than great (it is a site used by sailors cruising in remote areas of the world). I think what I need to implement is some sort of multi-part with checksum for these downloads in order to get these files to my users. Could someone point me in the right direction as to how to go about this using Stripes? I am guessing something on the client end will also need to be written? Jon -- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Monitor 25 network devices or servers for free with OpManager! OpManager is web-based network management software that monitors network devices and physical virtual servers, alerts via email sms for fault. Monitor 25 devices for free with no restriction. Download now http://ad.doubleclick.net/ddm/clk/292181274;119417398;o___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] CMS Integration with Stripes
you just get nice JSON back from any API call by adding “pretty=true” to the request URL. This has proven to be invaluable while debugging. One important caveat is that to protect against CSRF attacks you will want to make sure that every single one of your API endpoints handles GET requests properly. Since Stripe does not really differentiate between GET and POST, you might accidentally allow people to make changes to your DB using a GET method. We just limit the allowable methods via an annotation and an interceptor. Stripe is OK for REST API development; more modern frameworks like Dropwizard do make some things a bit easier though (btw, Dropwizard+Guice has a lot of the same feel as Stripe for development - though Stripe’s templating system is still pretty darned powerful and I haven’t really found an equivalent). /Janne On 28 Feb 2015, at 14:56 , Juan Pablo Santos Rodríguez juanpablo.san...@gmail.com wrote: Hi, we've been in the same situation, and we've used the same double approach described by Remi: facing public, CMS-heavy sites using REST-like services provided by Stripes, whereas transactional applications are invoking CMS's services via its REST services. The only downside with this approach is that modern js frameworks are more prepared to use true/full/complete/you-name-it REST services (= a post on an URL is not the same as a GET), which is complex to achieve if using Stripes, as you'd have to make your ActionBeans aware of the http verb (maybe extending @URLBinding, @HandleEvent, etc. maybe with a new @Verb), and write your ActionBeanResolver, so it can understand all the previous. We felt we were going to modify too much Stripes internals, so we chose instead to make calls to some URLs managed by Stripes' apps which return some JSON. Btw, we'd love to hear if someone has tried any other approach to serve true REST services with Stripes. Lastly, another approach you could use is to try portofino ( http://portofino.manydesigns.com/). It has CMS capabilities, it's Stripes-based, has user/roles, different kind of support service. The downsides: it's not widely known (we came across it looking for a CRUD generator). Note that we haven't used it on any real project yet, so we don't really know how it behaves, you'll have to try it for yourself and see if it fits your needs. hth, juan pablo On Sat, Feb 28, 2015 at 12:36 PM, VANKEISBELCK Remi r...@rvkb.com wrote: Btw, I've done something similar on a small app : we allow the site owner to change some of the pages using MCE or something. We also allow to upload images and reference them in those pages. It does the job for us and for what it's cost, didn't take long to hack. But it's pretty ugly, and we quickly fell into pretty complex layout issues and the like. The regular html tags (and the WYSIWYG over them) ain't powerful as what you'll find in some CMSs with templating etc. In short, the home-brew solution works for very simple pages in terms of formatting, or maybe for only fragments of a page that is laid out by an actual web designer :) Cheers Rémi 2015-02-28 12:27 GMT+01:00 VANKEISBELCK Remi r...@rvkb.com: Hi, Interesting question :) I guess a fundamental indicator is the complexity of the CMS vs your own code. I mean, will the public facing website include only a small part of customization (a few new forms here and there, a few pages...) and most of the hits will be actually handled by the CMS ? Or is it the inverse ? Are your Stripes pages the main focus, and expose more features than the CMS ? Rewriting a full-blown CMS ain't easy, but I guess rewriting your app isn't either :P Apart from your 3 options, have you considered client-side, mashup-style integration ? I mean, I guess most of those CMSs provide ways to integrate 3rd party stuff within their UI, via plugins or the like. It depends on the architecture (authentication, cross-domain etc) but maybe you can integrate your heterogeneous apps via widgets that you put in your CMS and that access your Stripes services. I don't know Wordpress, but I'm pretty sure it has such capability. It certainly provides REST APIs that you can call from the browser in order to get the data you need from the CMS. Now you only need your Stripes app to do the same : expose REST-like services so that you can mix cross-apps widgets in the same page(s). Like display a GUI that is backed by a Stripes app inside a Wordpress page. Quick googling, and, as expected, it's plugin-based at its core : http://codex.wordpress.org/Writing_a_Plugin Ok, it's php, but it can definitely invoke your Stripes stuff, either directly from your Wordpress instance in php (server-to-server), or via Cross-Domain JS (browser-to-server). The second option involves only very little php : your plugin only has to include the JS you need from the Stripes app, and let it do the magic... You can also mix the two
Re: [Stripes-users] CMS Integration with Stripes
Btw, I've done something similar on a small app : we allow the site owner to change some of the pages using MCE or something. We also allow to upload images and reference them in those pages. It does the job for us and for what it's cost, didn't take long to hack. But it's pretty ugly, and we quickly fell into pretty complex layout issues and the like. The regular html tags (and the WYSIWYG over them) ain't powerful as what you'll find in some CMSs with templating etc. In short, the home-brew solution works for very simple pages in terms of formatting, or maybe for only fragments of a page that is laid out by an actual web designer :) Cheers Rémi 2015-02-28 12:27 GMT+01:00 VANKEISBELCK Remi r...@rvkb.com: Hi, Interesting question :) I guess a fundamental indicator is the complexity of the CMS vs your own code. I mean, will the public facing website include only a small part of customization (a few new forms here and there, a few pages...) and most of the hits will be actually handled by the CMS ? Or is it the inverse ? Are your Stripes pages the main focus, and expose more features than the CMS ? Rewriting a full-blown CMS ain't easy, but I guess rewriting your app isn't either :P Apart from your 3 options, have you considered client-side, mashup-style integration ? I mean, I guess most of those CMSs provide ways to integrate 3rd party stuff within their UI, via plugins or the like. It depends on the architecture (authentication, cross-domain etc) but maybe you can integrate your heterogeneous apps via widgets that you put in your CMS and that access your Stripes services. I don't know Wordpress, but I'm pretty sure it has such capability. It certainly provides REST APIs that you can call from the browser in order to get the data you need from the CMS. Now you only need your Stripes app to do the same : expose REST-like services so that you can mix cross-apps widgets in the same page(s). Like display a GUI that is backed by a Stripes app inside a Wordpress page. Quick googling, and, as expected, it's plugin-based at its core : http://codex.wordpress.org/Writing_a_Plugin Ok, it's php, but it can definitely invoke your Stripes stuff, either directly from your Wordpress instance in php (server-to-server), or via Cross-Domain JS (browser-to-server). The second option involves only very little php : your plugin only has to include the JS you need from the Stripes app, and let it do the magic... You can also mix the two websites in some circumstances. Say you now have a Shop link in the CMS nav bar : this link can point to a Stripes app, provided you manage authentication. Tell us how it goes ! Cheers Rémi 2015-02-28 11:08 GMT+01:00 Paul Carter-Brown paul.carter-br...@smilecoms.com: Hi, We have been using Stripes for the last 5 years and love the framework. The sites we have used it on are all transactional (think CRM) with back-end integration to other systems for customer profile management, account management etc. We also have a fairly static public facing web site using wordpress CMS that was created by our marketing agency. We now have a need to add a lot more transactional functionality to the public facing site for customers to buy goods and services, manage their accounts etc and the marketing team want to keep their ability to manage and change content on the site as they see fit without code/JSP changes. We now have to make a call on these possible options: 1) Try and use PHP/Wordpress to do what we are so good at doing in Stripes. We are a Java shop and have lots of boiler plate code and framework around Stripes so thinking of now doing this all over again in PHP is scary 2) Use a completely new Java web framework with a CMS and then find a way of adding our back end integration etc into that web framework. Thinking here of things like Drupal, HippoCMS, dotCMS etc 3) Find a CMS with a tag library or similar that can be used on Stripes JSP's to pull in content served from the CMS to supplement whats being resented by the JSP. We then get to use Stripes and have all the integration done already (e.g. binding into domain models). We also get the benefit of giving marketing areas of the site where they are free to change images, text etc etc in a CMS with approval processes and ability to publish changes without any need for redeploys etc I really really want to find a good CMS for option (3). I'm sure my requirement is not unique (power of Stripes for transactional web sites but with a CMS for marketing to update parts of the site they control). Anyone out there with any suggestions? Thanks so much This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/home/email-disclaimer/ http://www.smilecoms.com/disclaimer -- Dive into the World of Parallel Programming The Go Parallel Website
Re: [Stripes-users] CMS Integration with Stripes
Hi, Interesting question :) I guess a fundamental indicator is the complexity of the CMS vs your own code. I mean, will the public facing website include only a small part of customization (a few new forms here and there, a few pages...) and most of the hits will be actually handled by the CMS ? Or is it the inverse ? Are your Stripes pages the main focus, and expose more features than the CMS ? Rewriting a full-blown CMS ain't easy, but I guess rewriting your app isn't either :P Apart from your 3 options, have you considered client-side, mashup-style integration ? I mean, I guess most of those CMSs provide ways to integrate 3rd party stuff within their UI, via plugins or the like. It depends on the architecture (authentication, cross-domain etc) but maybe you can integrate your heterogeneous apps via widgets that you put in your CMS and that access your Stripes services. I don't know Wordpress, but I'm pretty sure it has such capability. It certainly provides REST APIs that you can call from the browser in order to get the data you need from the CMS. Now you only need your Stripes app to do the same : expose REST-like services so that you can mix cross-apps widgets in the same page(s). Like display a GUI that is backed by a Stripes app inside a Wordpress page. Quick googling, and, as expected, it's plugin-based at its core : http://codex.wordpress.org/Writing_a_Plugin Ok, it's php, but it can definitely invoke your Stripes stuff, either directly from your Wordpress instance in php (server-to-server), or via Cross-Domain JS (browser-to-server). The second option involves only very little php : your plugin only has to include the JS you need from the Stripes app, and let it do the magic... You can also mix the two websites in some circumstances. Say you now have a Shop link in the CMS nav bar : this link can point to a Stripes app, provided you manage authentication. Tell us how it goes ! Cheers Rémi 2015-02-28 11:08 GMT+01:00 Paul Carter-Brown paul.carter-br...@smilecoms.com: Hi, We have been using Stripes for the last 5 years and love the framework. The sites we have used it on are all transactional (think CRM) with back-end integration to other systems for customer profile management, account management etc. We also have a fairly static public facing web site using wordpress CMS that was created by our marketing agency. We now have a need to add a lot more transactional functionality to the public facing site for customers to buy goods and services, manage their accounts etc and the marketing team want to keep their ability to manage and change content on the site as they see fit without code/JSP changes. We now have to make a call on these possible options: 1) Try and use PHP/Wordpress to do what we are so good at doing in Stripes. We are a Java shop and have lots of boiler plate code and framework around Stripes so thinking of now doing this all over again in PHP is scary 2) Use a completely new Java web framework with a CMS and then find a way of adding our back end integration etc into that web framework. Thinking here of things like Drupal, HippoCMS, dotCMS etc 3) Find a CMS with a tag library or similar that can be used on Stripes JSP's to pull in content served from the CMS to supplement whats being resented by the JSP. We then get to use Stripes and have all the integration done already (e.g. binding into domain models). We also get the benefit of giving marketing areas of the site where they are free to change images, text etc etc in a CMS with approval processes and ability to publish changes without any need for redeploys etc I really really want to find a good CMS for option (3). I'm sure my requirement is not unique (power of Stripes for transactional web sites but with a CMS for marketing to update parts of the site they control). Anyone out there with any suggestions? Thanks so much This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/home/email-disclaimer/ http://www.smilecoms.com/disclaimer -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from
Re: [Stripes-users] Problem with Stripes:param
Glad it works. Look at the sources : it probably forces request/response encoding by calling : http://docs.oracle.com/javaee/6/api/javax/servlet/ServletRequest.html#setCharacterEncoding(java.lang.String) Cheers Rémi 2015-02-27 13:15 GMT+01:00 Nahid Seidi nahid.se...@gmail.com: Thank you everyone for your answers. I added the following in web.xml and it works now! But it's also weird to me how Spring MVC affects on encoding! filter filter-nameCharacterEncodingFilter/filter-name filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueUTF-8/param-value /init-param /filter filter-mapping filter-nameCharacterEncodingFilter/filter-name url-pattern/*/url-pattern /filter-mapping /Nahid On Fri, Feb 27, 2015 at 11:52 AM, Nahid Seidi nahid.se...@gmail.com wrote: Hi Gérald I'm using Resin. I guess I need to find out how to do the configuration you sent in resin. /Nahid On Friday, February 27, 2015, Gérald Quintana gerald.quint...@gmail.com wrote: Hello, If you're using Tomcat: - Such a filter is provided by Tomcat: https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/SetCharacterEncodingFilter.html - Or you can force Tomcat to use UTF-8 at the Connector level: Connector port=8080 *URIEncoding=UTF-8*/ Gérald 2015-02-27 11:07 GMT+01:00 VANKEISBELCK Remi r...@rvkb.com: Hi, I'd say Nestor is right. You app server is probably using platform locale. You probably want this kind of filter : https://github.com/pojosontheweb/woko/blob/develop/core/src/main/java/woko/util/SetCharacterEncodingFilter.java And configure it to use utf-8. Cheers Rémi 2015-02-27 9:42 GMT+01:00 Nahid Seidi nahid.se...@gmail.com: Rick, I already tried the encoding tag, but it doesn't work. As I said, I don't think the problem is with encoding because as you see in the first jsp I get 'fname' form an actionbean and then send that to another one. Since 'fname' is shown correctly in first jsp but not in second jsp so I don't think it is about encoding. I wonder if there is another way to pass parameters (fname, lname) to the other jsp using something other than stripes:param ? On Fri, Feb 27, 2015 at 1:11 AM, Rick Grashel rgras...@gmail.com wrote: Nahid, I've never had a problem with encoding the contents of a parameter. Try again with this at the very top of your JSP or the very top of your stripes template: %@ page contentType=text/html; charset=UTF-8 % Thanks. -- Rick On Thu, Feb 26, 2015 at 5:27 PM, Nahid Seidi nahid.se...@gmail.com wrote: Hi I am sending some variables from stripes:param to another actionbean in order to show them in another jsp file. The problem is that if a variable has non-english characters like (ä,ö,...) stripes:param encode them to some wired format. I used ecoding tags in my jsp but doesn't work. Since stripes:param is inside a stripes:link, could it be something with stripes:link? For example if 'fname' in first jsp has a character like 'ö' stripes converts it to some other characters when it shows it in second jsp! I don't think it's about encoding, because the characters are shown correctly in first jsp but when I pass them using stripes:param they're changed somehow! first jsp stripes:link beanclass=se.theducation.course.ui.action.student.StudentEditExcelAction event=loadStudent stripes:param name=fname value=${array.getStudent().getFirstName() } / stripes:param name=lname value=${array.getStudent().getLastName() } / edit/stripes:link StudentEditExcelAction.java @UrlBinding(/Student/editExcel.action)public class StudentEditExcelAction implements ActionBean { private String fname;private String lname; @DefaultHandler@DontValidatepublic Resolution edit() { return forward(editExcel);} @DontValidatepublic Resolution loadStudent() { System.out.println(utbildare: + school); //TODO delete this later return forward(editExcel);} second jsp table class=solid style=margin-top: 5px; padding: 5px; width:900px tr class=solid td class=solid tags:labeled label=Firstname:br / stripes:text name=fname/ /tags:labeled /td td class=solid tags:labeled label=Lastname:br / stripes:text name=lname/ /tags:labeled /td /tr/table -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Stripes-users mailing
Re: [Stripes-users] Problem with Stripes:param
Nahid, The servlet filter makes your app portable without any server config required. I'd keep the filter if I were you. That's why it's included in almost every framework out there. We could add this as a core functionality into Stripes dispatching : it's easy, and quite the recurrent feature. Cheers Rémi 2015-02-27 14:10 GMT+01:00 Nahid Seidi nahid.se...@gmail.com: Rick, You're right! It works without doing any filter mapped. Thanks! /Nahid On Fri, Feb 27, 2015 at 1:48 PM, Rick Grashel rgras...@gmail.com wrote: Nahid, Ah, good find by everyone that your server isn't in UTF-8. If you are using Resin, just put this in your resin configuration file: character-encodingutf-8/character-encoding That should fix the issue without the need for a filter. -- Rick On Fri, Feb 27, 2015 at 6:15 AM, Nahid Seidi nahid.se...@gmail.com wrote: Thank you everyone for your answers. I added the following in web.xml and it works now! But it's also weird to me how Spring MVC affects on encoding! filter filter-nameCharacterEncodingFilter/filter-name filter-classorg.springframework.web.filter.CharacterEncodingFilter/filter-class init-param param-nameencoding/param-name param-valueUTF-8/param-value /init-param /filter filter-mapping filter-nameCharacterEncodingFilter/filter-name url-pattern/*/url-pattern /filter-mapping /Nahid On Fri, Feb 27, 2015 at 11:52 AM, Nahid Seidi nahid.se...@gmail.com wrote: Hi Gérald I'm using Resin. I guess I need to find out how to do the configuration you sent in resin. /Nahid On Friday, February 27, 2015, Gérald Quintana gerald.quint...@gmail.com wrote: Hello, If you're using Tomcat: - Such a filter is provided by Tomcat: https://tomcat.apache.org/tomcat-7.0-doc/api/org/apache/catalina/filters/SetCharacterEncodingFilter.html - Or you can force Tomcat to use UTF-8 at the Connector level: Connector port=8080 *URIEncoding=UTF-8*/ Gérald 2015-02-27 11:07 GMT+01:00 VANKEISBELCK Remi r...@rvkb.com: Hi, I'd say Nestor is right. You app server is probably using platform locale. You probably want this kind of filter : https://github.com/pojosontheweb/woko/blob/develop/core/src/main/java/woko/util/SetCharacterEncodingFilter.java And configure it to use utf-8. Cheers Rémi 2015-02-27 9:42 GMT+01:00 Nahid Seidi nahid.se...@gmail.com: Rick, I already tried the encoding tag, but it doesn't work. As I said, I don't think the problem is with encoding because as you see in the first jsp I get 'fname' form an actionbean and then send that to another one. Since 'fname' is shown correctly in first jsp but not in second jsp so I don't think it is about encoding. I wonder if there is another way to pass parameters (fname, lname) to the other jsp using something other than stripes:param ? On Fri, Feb 27, 2015 at 1:11 AM, Rick Grashel rgras...@gmail.com wrote: Nahid, I've never had a problem with encoding the contents of a parameter. Try again with this at the very top of your JSP or the very top of your stripes template: %@ page contentType=text/html; charset=UTF-8 % Thanks. -- Rick On Thu, Feb 26, 2015 at 5:27 PM, Nahid Seidi nahid.se...@gmail.com wrote: Hi I am sending some variables from stripes:param to another actionbean in order to show them in another jsp file. The problem is that if a variable has non-english characters like (ä,ö,...) stripes:param encode them to some wired format. I used ecoding tags in my jsp but doesn't work. Since stripes:param is inside a stripes:link, could it be something with stripes:link? For example if 'fname' in first jsp has a character like 'ö' stripes converts it to some other characters when it shows it in second jsp! I don't think it's about encoding, because the characters are shown correctly in first jsp but when I pass them using stripes:param they're changed somehow! first jsp stripes:link beanclass=se.theducation.course.ui.action.student.StudentEditExcelAction event=loadStudent stripes:param name=fname value=${array.getStudent().getFirstName() } / stripes:param name=lname value=${array.getStudent().getLastName() } / edit/stripes:link StudentEditExcelAction.java @UrlBinding(/Student/editExcel.action)public class StudentEditExcelAction implements ActionBean { private String fname;private String lname; @DefaultHandler@DontValidatepublic Resolution edit() { return forward(editExcel);} @DontValidatepublic Resolution loadStudent() { System.out.println(utbildare: + school); //TODO delete this later return forward(editExcel);} second jsp table class=solid style=margin-top: 5px; padding: 5px; width:900px tr class=solid td class=solid tags:labeled label=Firstname:br / stripes:text name=fname/ /tags:labeled /td td class=solid tags:labeled label=Lastname:br
Re: [Stripes-users] Problem with Stripes:param
Hi, I'd say Nestor is right. You app server is probably using platform locale. You probably want this kind of filter : https://github.com/pojosontheweb/woko/blob/develop/core/src/main/java/woko/util/SetCharacterEncodingFilter.java And configure it to use utf-8. Cheers Rémi 2015-02-27 9:42 GMT+01:00 Nahid Seidi nahid.se...@gmail.com: Rick, I already tried the encoding tag, but it doesn't work. As I said, I don't think the problem is with encoding because as you see in the first jsp I get 'fname' form an actionbean and then send that to another one. Since 'fname' is shown correctly in first jsp but not in second jsp so I don't think it is about encoding. I wonder if there is another way to pass parameters (fname, lname) to the other jsp using something other than stripes:param ? On Fri, Feb 27, 2015 at 1:11 AM, Rick Grashel rgras...@gmail.com wrote: Nahid, I've never had a problem with encoding the contents of a parameter. Try again with this at the very top of your JSP or the very top of your stripes template: %@ page contentType=text/html; charset=UTF-8 % Thanks. -- Rick On Thu, Feb 26, 2015 at 5:27 PM, Nahid Seidi nahid.se...@gmail.com wrote: Hi I am sending some variables from stripes:param to another actionbean in order to show them in another jsp file. The problem is that if a variable has non-english characters like (ä,ö,...) stripes:param encode them to some wired format. I used ecoding tags in my jsp but doesn't work. Since stripes:param is inside a stripes:link, could it be something with stripes:link? For example if 'fname' in first jsp has a character like 'ö' stripes converts it to some other characters when it shows it in second jsp! I don't think it's about encoding, because the characters are shown correctly in first jsp but when I pass them using stripes:param they're changed somehow! first jsp stripes:link beanclass=se.theducation.course.ui.action.student.StudentEditExcelAction event=loadStudent stripes:param name=fname value=${array.getStudent().getFirstName() } / stripes:param name=lname value=${array.getStudent().getLastName() } / edit/stripes:link StudentEditExcelAction.java @UrlBinding(/Student/editExcel.action)public class StudentEditExcelAction implements ActionBean { private String fname;private String lname; @DefaultHandler@DontValidatepublic Resolution edit() { return forward(editExcel);} @DontValidatepublic Resolution loadStudent() { System.out.println(utbildare: + school); //TODO delete this later return forward(editExcel);} second jsp table class=solid style=margin-top: 5px; padding: 5px; width:900px tr class=solid td class=solid tags:labeled label=Firstname:br / stripes:text name=fname/ /tags:labeled /td td class=solid tags:labeled label=Lastname:br / stripes:text name=lname/ /tags:labeled /td /tr/table -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Dive into the World
Re: [Stripes-users] Preserving unbound values on save
Hi, Stripes doesn't set bean properties to null if no parameter is provided. The value is left unchanged. The fields would be nulled-out if you pass an empty request param : http://.../my.action?myField= So if you load the object with values, and if nothing is bound, then your POJO contains the values that you've pulled out from the DB... Cheers Rémi 2014-11-27 1:30 GMT+01:00 Dave Roberge drobe...@bluetarp.com: William Krick krick@... writes: This has to be a common problem. Ideally, I'd like to have something where unbound members of the customer object are just left with their original values. Short of maintaining two separate Customer objects, one for the screen and one for the database and juggling data back and forth between the two, is there a way to deal with this situation? Hey, I think this is what you're looking for, http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/strip es/action/StrictBinding.html -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server from Actuate! Instantly Supercharge Your Business Reports and Dashboards with Interactivity, Sharing, Native Excel Exports, App Integration more Get technology previously reserved for billion-dollar corporations, FREE http://pubads.g.doubleclick.net/gampad/clk?id=157005751iu=/4140/ostg.clktrk___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Remove HTML from user input
Hi, I guess you can validate whatever you want by providing your own ActionBeanPropertyBinder : net.sourceforge.stripes.controller.ActionBeanPropertyBinder I think it can be done very easily by overriding a single method in there, maybe : net.sourceforge.stripes.controller.DefaultActionBeanPropertyBinder#bind(net.sourceforge.stripes.action.ActionBean, java.lang.String, java.lang.Object) If the value are is a String, then check for XSS, and sanitize the String before setting the bean prop if needed. When you output anything in JSP, you should be safe using jstl's c:out : it escapes Xml by default. Cheers Rémi 2014-10-14 22:53 GMT+02:00 Adam Stokar ajsto...@gmail.com: Hi everyone, Does Stripes have an easy way to remove HTML from user input to prevent XSS attacks? I've googled with no success. Thanks, -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes Wiki, JIRA, and Build have moved!
Hi folks, The javadocs and sources are deployed into the maven repo when we release a stable version. Rick I wrote a small app that does just what you say : it pulls the javadoc jars from central, explodes them and makes them available through an url... I'm gonna try to find it. Cheers Rémi 2014-10-07 22:50 GMT+02:00 Rusty Wright rusty.wri...@gmail.com: It looks like the javadoc is in the maven repo; I have maven set up to download the sources and javadoc and it got both when I updated my pom to 1.5.8. On Tue, Oct 7, 2014 at 1:38 PM, Rick Grashel rgras...@gmail.com wrote: Thanks for this. I'm going to take a look at seeing how we can also explode the Javadoc and have it easily linked somewhere. Doing this by hand every time we build seems to be a waste. -- Rick On Tue, Oct 7, 2014 at 3:06 PM, Rusty Wright rusty.wri...@gmail.com wrote: The javadoc link points to the 1.5.7 javadoc. I used the javadoc generator that's in eclipse to generate the following 1.5.8 javadocs. http://www.datafile.com/d/TkRRME5qZ3pNUT0F9 On Tue, Oct 7, 2014 at 12:39 PM, Rick Grashel rgras...@gmail.com wrote: Thanks, Rusty. I did update the release information on the new Wiki to reflect the current release. That was one of the stale pieces of information that I saw. Thanks. -- Rick On Tue, Oct 7, 2014 at 2:06 PM, Rusty Wright rusty.wri...@gmail.com wrote: Very nice; a big thanks to you. Question: did the previous site say that 1.5.8 had been released? I only remember 1.5.7 mentioned on it. On Mon, Oct 6, 2014 at 4:15 PM, Rick Grashel rgras...@gmail.com wrote: Stripes Users, ... -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White
Re: [Stripes-users] Stripes Wiki, JIRA, and Build have moved!
Thanks ! Was about time :) Cheers Rémi 2014-10-07 3:28 GMT+02:00 Ben Gunter bgun...@cpons.com: Indeed, this was pretty much all Rick's doing. Thanks for the effort! On Mon, Oct 6, 2014 at 7:50 PM, Samuel Santos sama...@gmail.com wrote: Awesome job Rick! Thank you for all the time and effort you put into this. -- Samuel Santos http://www.samaxes.com/ On Tue, Oct 7, 2014 at 12:15 AM, Rick Grashel rgras...@gmail.com wrote: Stripes Users, I wanted to send a note out to everyone on the mailing list to inform you that due to some issues with our hosting provider, we have moved the Stripes JIRA, Confluence, and Jenkins sites for Stripes. Github has and will remain unchanged. Ben has repointed the DNS and it should be updated for everyone in the next couple of hours. Stripes JIRA and Confluence are now hosted free of charge by Atlassian using their OnDemand cloud service with a Free Open Source license. This takes us to the latest version of both JIRA and Confluence. We have migrated everything the best that we can. There is a minor issue where attachments on JIRA issues did not come over, but I will be trying to bring those over in the coming days. The wiki pages have had to be recreated one-by-one as the version of Confluence that Stripes was on is too old to provide a stable migration path. As a result, we did lose the history and original author attribution of those pages. If you were an author of one of those Wiki pages, I encourage you to sign up to the new Wiki, edit those pages, and give yourself credit! If you had a prior registered account on the old Stripes Wiki/JIRA, when you go to the new site and sign up using the *same* email address as before, it should link your old account without creating a duplicate account. The Wiki/Confluence site is located at the normal URL (http://stripesframework.org). There are hot links from the new Wiki to Stripes JIRA, Github, Jenkins, Javadoc, and IRC. The Stripes builds have been moved Cloudbees who is (thankfully) providing free Jenkins build facilities for Stripes under their FOSS license. This migration has uncovered a lot of staleness in the Stripes wiki, and over the coming weeks, we will be working to renovate some of that. If anybody is interested in making a Wiki contribution, please let me know. There can never be too many contributors. If anybody has questions, feel free to post them here or come to #stripes. Thanks all! -- Rick (RickG on IRC) -- Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes, Google Maps and KML
Hi, You don't need to overwrite stream(), just pass your string to StreamingResolution's constructor (or a reader or input stream)... Now for your google-specific problem, I have no idea. Cheers Rémi 2014-09-27 23:36 GMT+02:00 Heather and Jon Turgeon tashiba40_evergr...@hotmail.com: Hi all, my Stripes based mapping site is coming along nicely. (running on AWS) I do have a question if anyone has used a Stripes action to be the source of a KML for Google maps? So far I have the code written and the KML being created in an action but have been unable to get the placemarks to show up on the map (no placemarks are created). Here is the Javascript I use //Load the markers var kmlLayer = new google.maps.KmlLayer({ url: '../marker/KMLMarker.action' }); kmlLayer.setMap(gemap); here is the end of the Stripes action, I am using the kmlframework library for creating the kml from hibernate objects return new StreamingResolution(text/kml) { public void stream(HttpServletResponse response) throws Exception { response.getWriter().write(kml.toString()); } }; Jon -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311iu=/4140/ostg.clktrk___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] [Stripes-dev] 1.5.8 released
There's a JIRA list of all resolved issues for this milestone : http://www.stripesframework.org/jira/secure/IssueNavigator.jspa?reset=truejqlQuery=project+%3D+STS+AND+fixVersion+%3D+%22Release+1.5.8%22+AND+status+%3D+Resolved+ORDER+BY+priority+DESCmode=hide Cheers Rémi 2014-07-07 22:05 GMT+02:00 Larry Meadors larry.mead...@gmail.com: Is there a change list somewhere? On Mon, Jul 7, 2014 at 1:49 PM, VANKEISBELCK Remi r...@rvkb.com wrote: Hi folks, After months of intense suspense, we have finally released 1.5.8 ! Yikes ! Changes have been pushed to 1.5.x (pom versions, release tag). The jar is already available in sonatype, and should be sync-ed with maven central in a few hours. Enjoy ! Cheers Rémi, on behalf of the team PS : The website and sf.net downloads have NOT been updated. We welcome contributors for that painful things... -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft ___ Stripes-development mailing list stripes-developm...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-development -- Open source business process management suite built on Java and Eclipse Turn processes into business applications with Bonita BPM Community Edition Quickly connect people, data, and systems into organized workflows Winner of BOSSIE, CODIE, OW2 and Gartner awards http://p.sf.net/sfu/Bonitasoft___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes 1.5.8
Hi Alessio, Stripers, Yeah we've been trying to resolve a few pending issues, and we're close to an 1.5.8. You can already try the 1.5.8-SNAPSHOT version in case you wanna make user the upgrade doesn't introduce regressions. There ain't no official release date though : releasing to maven is easy, but the full monty is another story (publishing to sf.net, regenerating the docs and updating the website, etc.), that's why it may take a little time to prepare all this. I'll send a separate email about 1.5.7-classloaderfix right now. Cheers Rémi 2014-04-29 9:32 GMT+02:00 Alessio Stalla alessio.sta...@manydesigns.com: Hi! I saw that a few tracked issues have been resolved lately and only a couple remain to be addressed in 1.5.8, so I'm starting to wonder: is there a plan for a release? Also, I see that a new artifact has been published to Maven Central (1.5.7-classloaderfix), what is that? Should we update our dependencies? Regards, Alessio -- *Alessio Stalla* | Software Architect M: +39 340 7824743 | T: +39 010 566441 | F: +39 010 8900455 alessio.sta...@manydesigns.com | www.manydesigns.com MANYDESIGNS s.r.l. Via G. D'Annunzio, 2/51 | 16121 Genova (GE) | Italy -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Vulnerability in Stripes
Hi all, Fellow Stripers have recently pointed out a pretty scary security flaw in Stripes. Thanks a lot to them for the reports, we all owe you guys ! In short, it's about using Data Binding to manipulate the application's ClassLoader, and allows an attacker to execute random code on the server, or DoS it. Pretty bad stuff to say the least... It's been discovered first in Struts, and applies to Stripes too. It affects all released versions. Some info : http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2014-0094 If you use @StrictBinding+@Validate everywhere (which you should do anyway, classLoader manipulation or not), then you're safe : binding to getClass().getClassLoader() will be denied. If you don't, then you don't expose your data only : you have this classLoader manipulation problem too. Ben has fixed this bug for 1.5.8-SNAPSHOT and 1.6.0-SNAPSHOT, so future releases will be safe. https://github.com/StripesFramework/stripes/commit/b4c043ce50f3f032abc47878cf70019db0675c7a We have released a hotfix over 1.5.7 : http://repo1.maven.org/maven2/net/sourceforge/stripes/stripes/1.5.7-classloaderfix/ dependency groupIdnet.sourceforge.stripes/groupId artifactIdstripes/artifactId version1.5.7-classloaderfix/version /dependency It's just a 1.5.7 rebuilt with Ben's fix for the classLoader issue. It is a private, implementation fix (no API changed), so there should be no regressions. We encourage everybody to upgrade ASAP. Cheers Rémi - on behalf of the dev. team. -- Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE Instantly run your Selenium tests across 300+ browser/OS combos. Get unparalleled scalability from the best Selenium testing platform available. Simple to use. Nothing to install. Get started now for free. http://p.sf.net/sfu/SauceLabs___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] URL bindings not always resolved
Hi Grzegorz, Sorry for the delay. Do you mean the braces etc end up in the action attribute of the form tag ? Does this happen randomly in a running application ? Cheers Rémi 2014-03-09 21:23 GMT+01:00 Grzegorz Krugły g...@karko.net: I hate bumping, but I'm really stuck with this one. Nothing obvious even though I've debugged a lot. Perhaps someone has an insight for the inner workings of UrlBindings and has an idea what might cause those {$event} and {params} to leak to the final HTML... W dniu 02.03.2014 12:30, Grzegorz Krugły pisze: I have a strange problem. I have an action with URL binding like this: @UrlBinding(/admin/userGroups/{$event}/{userGroup}) public class AdminUserGroupAction extends AbstractDashboardAction { and I have a JSP form like this: s:form beanclass=pl.msi.el.action.AdminUserGroupAction class=form-horizontal In other words - it's as simple as it can be. Most of the time it works fine. But once in a while strange thing happens -- in the HTML that goes to the browser, form's action is not /admin/userGroups, but... /admin/userGroups/{$event}/{userGroup} URL binding tokens get passed to HTML! Has any of You encountered such problem? What could I do? Trying to debug Stripes code, but am not that fluent in it. Best regards, Grzegorz -- Subversion Kills Productivity. Get off Subversion Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] URL bindings not always resolved
I've had a peek at the sources. When using FormTag, the action attribute it computed by (in short) replacing the placeholders in the @UrlBinding. The binding prototype is used and the base url is built, including clean-URL params if any : net.sourceforge.stripes.util.UrlBuilder#getBaseURL I have no idea why the placeholders (UrlBindingParameter instances in the components list) don't get replaced in your case. Thinking out loud : - are the parameters (the ones that you need in your query) present in the FORM ? - do you have validation constraints ? In order to help debugging, you can try to step in UrlBuilder. What I'd do is either : 1/ toss a conditional breakpoint in net/sourceforge/stripes/util/UrlBuilder.java:543, that breaks when the url variable contains a brace for example or 2/ patch the source by adding stuff like : if (url.contains({)) { throw new RuntimeException(shit happens); } and break on the throw new... line. This way, you'll have the whole environment, stack, variables, and logs. Of course, turn stripes logs to DEBUG before you do this. One note though : I fail to understand how the {$event} param can be used in a form's action. I mean, it is not known until the user presses a submit, which happens *after* the action attribute gets generated... Cheers Rémi 2014-03-10 11:45 GMT+01:00 Grzegorz Krugły g...@karko.net: No, there's nothing fancy in the code, the request goes to ActionBean and it returns ForwardResolution to JSP. W dniu 10.03.2014 11:43, Marcus Kraßmann pisze: Maybe it happens when you call the JSP directly while it works when being called by an action bean? Am 10.03.2014 11:36 schrieb =?UTF-8?Q?Grzegorz_Krug=C5=82y?= g...@karko.net: -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] URL bindings not always resolved
Interesting, this means that defaultValue is set so index in net/sourceforge/stripes/controller/UrlBindingParameter.java There are 3 affectations of this variable : - 2 in net.sourceforge.stripes.controller.UrlBindingParameter#getDefaultValue - 1 in the constructor net.sourceforge.stripes.controller.UrlBindingParameter#UrlBindingParameter(java.lang.Class? extends net.sourceforge.stripes.action.ActionBean, java.lang.String, java.lang.String, java.lang.String) Could you break in there ? The defaultValue should be null. My guess is that you have index instead. Then the stack trace should tell how how it got there. I'm on Stripes' IRC for about an hour if you wanna join, would be easier to debug together... Cheers Rémi 2014-03-10 14:16 GMT+01:00 Grzegorz Krugły g...@karko.net: I've tried debugging UrlBuilder now and have the direct cause of my problems caught. In UrlBuilder:472 there's a line if (baseUrl.equals(binding.toString())) { In my code baseUrl is /organization/{$event}/{schoolId}/{param1} and binding.toString() is /organization/{$event=index}/{schoolId}/{param1} Note the extra =index after {$event It causes the line 473 (baseUrl = binding.getPath();) to be skipped and after check at line 477 (if (binding.getPath().length() baseUrl.length()) {) the baseUrl with { and }s is returned. But if I hit refresh in the browser, the next time I debug the same code for the same page, baseUrl also has that $event=index part and everything works ok. W dniu 10.03.2014 13:16, VANKEISBELCK Remi pisze: I've had a peek at the sources. When using FormTag, the action attribute it computed by (in short) replacing the placeholders in the @UrlBinding. The binding prototype is used and the base url is built, including clean-URL params if any : net.sourceforge.stripes.util.UrlBuilder#getBaseURL I have no idea why the placeholders (UrlBindingParameter instances in the components list) don't get replaced in your case. Thinking out loud : - are the parameters (the ones that you need in your query) present in the FORM ? - do you have validation constraints ? In order to help debugging, you can try to step in UrlBuilder. What I'd do is either : 1/ toss a conditional breakpoint in net/sourceforge/stripes/util/UrlBuilder.java:543, that breaks when the url variable contains a brace for example or 2/ patch the source by adding stuff like : if (url.contains({)) { throw new RuntimeException(shit happens); } and break on the throw new... line. This way, you'll have the whole environment, stack, variables, and logs. Of course, turn stripes logs to DEBUG before you do this. One note though : I fail to understand how the {$event} param can be used in a form's action. I mean, it is not known until the user presses a submit, which happens *after* the action attribute gets generated... Cheers Rémi 2014-03-10 11:45 GMT+01:00 Grzegorz Krugły g...@karko.net: No, there's nothing fancy in the code, the request goes to ActionBean and it returns ForwardResolution to JSP. W dniu 10.03.2014 11:43, Marcus Kraßmann pisze: Maybe it happens when you call the JSP directly while it works when being called by an action bean? Am 10.03.2014 11:36 schrieb =?UTF-8?Q?Grzegorz_Krug=C5=82y?= g...@karko.net: -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today!http://p.sf.net/sfu/13534_NeoTech ___ Stripes-users mailing listStripes-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] URL bindings not always resolved
BTW what version of Stripes are you using ? Where did you grab the sources ? I noticed differences in line numbers between yours and mine... Cheers Rémi 2014-03-10 17:48 GMT+01:00 VANKEISBELCK Remi r...@rvkb.com: Interesting, this means that defaultValue is set so index in net/sourceforge/stripes/controller/UrlBindingParameter.java There are 3 affectations of this variable : - 2 in net.sourceforge.stripes.controller.UrlBindingParameter#getDefaultValue - 1 in the constructor net.sourceforge.stripes.controller.UrlBindingParameter#UrlBindingParameter(java.lang.Class? extends net.sourceforge.stripes.action.ActionBean, java.lang.String, java.lang.String, java.lang.String) Could you break in there ? The defaultValue should be null. My guess is that you have index instead. Then the stack trace should tell how how it got there. I'm on Stripes' IRC for about an hour if you wanna join, would be easier to debug together... Cheers Rémi 2014-03-10 14:16 GMT+01:00 Grzegorz Krugły g...@karko.net: I've tried debugging UrlBuilder now and have the direct cause of my problems caught. In UrlBuilder:472 there's a line if (baseUrl.equals(binding.toString())) { In my code baseUrl is /organization/{$event}/{schoolId}/{param1} and binding.toString() is /organization/{$event=index}/{schoolId}/{param1} Note the extra =index after {$event It causes the line 473 (baseUrl = binding.getPath();) to be skipped and after check at line 477 (if (binding.getPath().length() baseUrl.length()) {) the baseUrl with { and }s is returned. But if I hit refresh in the browser, the next time I debug the same code for the same page, baseUrl also has that $event=index part and everything works ok. W dniu 10.03.2014 13:16, VANKEISBELCK Remi pisze: I've had a peek at the sources. When using FormTag, the action attribute it computed by (in short) replacing the placeholders in the @UrlBinding. The binding prototype is used and the base url is built, including clean-URL params if any : net.sourceforge.stripes.util.UrlBuilder#getBaseURL I have no idea why the placeholders (UrlBindingParameter instances in the components list) don't get replaced in your case. Thinking out loud : - are the parameters (the ones that you need in your query) present in the FORM ? - do you have validation constraints ? In order to help debugging, you can try to step in UrlBuilder. What I'd do is either : 1/ toss a conditional breakpoint in net/sourceforge/stripes/util/UrlBuilder.java:543, that breaks when the url variable contains a brace for example or 2/ patch the source by adding stuff like : if (url.contains({)) { throw new RuntimeException(shit happens); } and break on the throw new... line. This way, you'll have the whole environment, stack, variables, and logs. Of course, turn stripes logs to DEBUG before you do this. One note though : I fail to understand how the {$event} param can be used in a form's action. I mean, it is not known until the user presses a submit, which happens *after* the action attribute gets generated... Cheers Rémi 2014-03-10 11:45 GMT+01:00 Grzegorz Krugły g...@karko.net: No, there's nothing fancy in the code, the request goes to ActionBean and it returns ForwardResolution to JSP. W dniu 10.03.2014 11:43, Marcus Kraßmann pisze: Maybe it happens when you call the JSP directly while it works when being called by an action bean? Am 10.03.2014 11:36 schrieb =?UTF-8?Q?Grzegorz_Krug=C5=82y?= g...@karko.net: -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/13534_NeoTech ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today!http://p.sf.net/sfu/13534_NeoTech ___ Stripes-users mailing listStripes-users@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn Graph Databases - Download FREE O'Reilly Book Graph Databases is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your
Re: [Stripes-users] Error executing stripes quickstart archetype
Hi Dan, The archetype ain't in maven central : http://search.maven.org/#search%7Cga%7C1%7Cstripes-archetype-quickstart According to the wikihttp://www.stripesframework.org/display/stripes/Maven2+Archetype+for+Stripes, there's a repo to use for this artefact, but it doesn't look like a m2 repo at all (only a sf download). I would suggest rebuilding locally : checkout the code and run mvn clean install. This will install the archetype to your local repo, and you should then be able to use it. HTH Rémi 2013/11/4 Dan Kaplan d...@mirthcorp.com I also get a different error when I try the command from the wiki on this page: http://www.stripesframework.org/display/stripes/Maven2+Archetype+for+Stripes $ mvn archetype:create -DarchetypeArtifactId=stripes-archetype-quickstart -DarchetypeGroupId=net.sourceforge -DarchetypeVersion=1.0 -DgroupId=myGroup -DartifactId=stripesTest -DarchetypeRepository= http://sourceforge.net/projects/mvnstripes/files/stripes-quickstart-1.0/1.0 [INFO] Scanning for projects... [INFO] [INFO] [INFO] Building MirthResultsBrancher 1.0-SNAPSHOT [INFO] [INFO] [INFO] --- maven-archetype-plugin:2.2:create (default-cli) @ MirthResultsBrancher --- [WARNING] This goal is deprecated. Please use mvn archetype:generate instead [INFO] Defaulting package to group ID: myGroup [INFO] [INFO] BUILD FAILURE [INFO] [INFO] Total time: 1.110s [INFO] Finished at: Mon Nov 04 10:55:30 PST 2013 [INFO] Final Memory: 11M/309M [INFO] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:create (default-cli) on project MirthResultsBrancher: Error creating from archetype: org.apache.maven.archetype.downloader.DownloadNotFoundException: Requested net.sourceforge:stripes-archetype-quickstart:jar:1.0 download does not exist. Failure to find net.sourceforge:stripes-archetype-quickstart:jar:1.0 in http://repo.corp.mirthcorp.com/repository/libs-release was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced [ERROR] [ERROR] Try downloading the file manually from the project website. [ERROR] [ERROR] Then, install it using the command: [ERROR] mvn install:install-file -DgroupId=net.sourceforge -DartifactId=stripes-archetype-quickstart -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file [ERROR] [ERROR] Alternatively, if you host your own repository you can deploy the file there: [ERROR] mvn deploy:deploy-file -DgroupId=net.sourceforge -DartifactId=stripes-archetype-quickstart -Dversion=1.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id] [ERROR] [ERROR] [ERROR] net.sourceforge:stripes-archetype-quickstart:jar:1.0 [ERROR] [ERROR] from the specified remote repositories: [ERROR] central (http://repo.corp.mirthcorp.com/repository/libs-release, releases=true, snapshots=false), [ERROR] snapshots (http://repo.corp.mirthcorp.com/repository/libs-snapshot, releases=true, snapshots=true) [ERROR] - [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException On Mon, Nov 4, 2013 at 10:54 AM, Dan Kaplan d...@mirthcorp.com wrote: Here's my command line (sorry it's long, it's from my ide): C:\Program Files\Java\jdk1.6.0_34\bin\java -Xms256m -XX:MaxPermSize=1024m -Xmx1024m -Dmaven.home=C:\apache-maven-3.0.4 -Dclassworlds.conf=C:\apache-maven-3.0.4\bin\m2.conf -Dfile.encoding=windows-1250 -classpath C:\apache-maven-3.0.4\boot\plexus-classworlds-2.4.jar org.codehaus.classworlds.Launcher --fail-fast --strict-checksums -DinteractiveMode=false -DgroupId=com.mirth.results.mirthresultsbrancher -DartifactId=MirthResultsBrancher -Dversion=1.0-SNAPSHOT -DarchetypeGroupId=net.sourceforge -DarchetypeArtifactId=stripes-archetype-quickstart -DarchetypeVersion=1.0 -DarchetypeRepository= http://sourceforge.net/projects/mvnstripes/files/stripes-quickstart-1.0/1.0org.apache.maven.plugins:maven-archetype-plugin:RELEASE:generate This is the error: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:2.2:generate (default-cli) on project standalone-pom: The desired archetype does not exist (net.sourceforge:stripes-archetype-quickstart:1.0) - [Help 1] -- Thanks, Dan -- Thanks, Dan CONFIDENTIALITY NOTICE: The information contained
Re: [Stripes-users] Testing Multipart Form and FileBean with MockRoundtrip
Hi Brandon, Maybe write your own ActionBeanPropertyBinder for those tests ? One that sets the FileBean even if nothing is posted, depending on your testing context ? Looks a bit heavyweight but I can't think of anything else yet... Cheers Remi 2013/8/14 Brandon Goodin brandon.goo...@gmail.com I am in a situation where I need to write a unit test for a stripes action and the action supports a multipart form with a required file upload. I don't see how it is possible to use the MockRoundtrip and test file uploads with FileBean. What is the proper way to test Actions that back a multipart-form with files being passed in the request? Pseudo-code of my action: public class MyAction ... { @Validate(required = true) private FileBean file; public Resolution upload() { ... } public void setFile(FileBean file) { this.file = file; } } For now I have decided to move the required=true off of the file property and simply manually validate in the body of the upload handler. This allows me to manually set the FileBean on the Action in my unit test before I call the mockRoundTrip.execute(upload); Please let me know if I'm missing something obvious. Thanks, Brandon Goodin -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Get 100% visibility into Java/.NET code with AppDynamics Lite! It's a free troubleshooting tool designed for production. Get down to code-level detail for bottlenecks, with 2% overhead. Download for free and get started troubleshooting in minutes. http://pubads.g.doubleclick.net/gampad/clk?id=48897031iu=/4140/ostg.clktrk___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Stripes Sample in WAS Liberty
Hi folks, A colleague found this : https://www.ibmdw.net/wasdev/repo/repo_samples_osi_stripesv157integration/ Not sure integration is appropriate for deploying a war, and really not sure why one would need an app-server specific sample for that, but it's always cool to see Stripes mentioned Cheers Remi -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Inject bean in overriden locale picker
Hi Rob, You can also use the Spring APIs directly and skip the annotation and SpringHelper... I mean, calling beanFactory.getBean(myBean) doesn't hurt if you do it only there. You can access the servletContext at init time : http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/localization/DefaultLocalePicker.html#init(net.sourceforge.stripes.config.Configuration) So store a ref to your ApplicationContext (WebApplicationContext if I remember well, it's been a while with Spring), and invoke getBean() when necessary... Cheers Remi 2013/6/13 Freddy Daoud xf2...@fastmail.fm If you have the Stripes book, there are more details about this in the Dependency Injection with Spring section. In summary, you have to subclass the Stripes default locale picker factory, call the superclass method to create the object, and use SpringHelper.injectBeans( ) on the object before returning it. Cheers, Freddy On Thu, Jun 13, 2013, at 07:24 AM, Rob GB wrote: Hi all, I created my own LocalePicker implementation, I just created a new class and mapped it in web.xml: !-- Override the default localepicker class -- init-param param-nameLocalePicker.Class/param-name param-valuecom.my.own.LocalePicker/param-value /init-param it works, however I have Spring integrated in my app, so I need to inject a Spring bean, I tried this: public class LocalePicker extends DefaultLocalePicker { MyBean myBean; @SpringBean(myBean) protected void setMyBean(MyBean mybean) { this.myBean = myBean; } It's not working, the myBean bean is properly created by Spring but I cannot inject it in my overriden default locale picker. Kindly advice, thanks. ///RGB --- --- This SF.net email is sponsored by Windows: Build for Windows Store. [1]http://p.sf.net/sfu/windows-dev2dev ___ Stripes-users mailing list [2]Stripes-users@lists.sourceforge.net [3]https://lists.sourceforge.net/lists/listinfo/stripes-users References 1. http://p.sf.net/sfu/windows-dev2dev 2. mailto:Stripes-users@lists.sourceforge.net 3. https://lists.sourceforge.net/lists/listinfo/stripes-users -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] change status code of forward resolution
I guess that's what you need : http://stripes.sourceforge.net/docs/current/javadoc/net/sourceforge/stripes/action/ErrorResolution.html HTH Rémi 2013/6/4 Chris Cheshire cheshira...@gmail.com I am doing some location aware pages for a website where they are available only to specific countries. When they aren't available I'd like to forward to my restricted.jsp page with the status code set to forbidden (403). How do I go about setting the status code? Thanks Chris -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- How ServiceNow helps IT people transform IT departments: 1. A cloud service to automate IT design, transition and operations 2. Dashboards that offer high-level views of enterprise services 3. A single system of record for all IT processes http://p.sf.net/sfu/servicenow-d2d-j___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] TypeConverters and the declare type.
Hi Robert, If the declared type is 2013/3/16 Robert Nicholson robert.nichol...@gmail.com I'm still new to stripes but last week I had an issue where it wasn't using the correct type convertor on a binding. So I have a hibernate object that has an attribute represented as a varchar in the database and it's java type is a String However I wanted to filter based on a type of Enum. The code I saw seemed to go looking at the declared type of the attribute in order to figure out what kind of type converter should apply and so instead of end up with an Enum converter it arrives at a String converter. How can you override this behavior? My final solution was to do away with the Enum completely which means I had to display the value as Y N instead of True False -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] TypeConverters and the declare type.
Hi Robert, If the declared type is String the Stripes will bind to a String. If you wanna use an enum in the bean you can just do that. What do you mean by filter ? Cheers Remi 2013/3/16 VANKEISBELCK Remi r...@rvkb.com Hi Robert, If the declared type is 2013/3/16 Robert Nicholson robert.nichol...@gmail.com I'm still new to stripes but last week I had an issue where it wasn't using the correct type convertor on a binding. So I have a hibernate object that has an attribute represented as a varchar in the database and it's java type is a String However I wanted to filter based on a type of Enum. The code I saw seemed to go looking at the declared type of the attribute in order to figure out what kind of type converter should apply and so instead of end up with an Enum converter it arrives at a String converter. How can you override this behavior? My final solution was to do away with the Enum completely which means I had to display the value as Y N instead of True False -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes UrlBinding - Parameter disappears on submit
Yeah, or use method=GET in the form ? Clean URLs don't really make sense for POST requests anyway... Cheers Remi 2012/8/30 Nathan Maves nathan.ma...@gmail.com I think you should be using stripes:link and not the form tag. On Wed, Aug 29, 2012 at 8:52 PM, Derrick Chua derr...@gateairfares.com wrote: I use URL bindings on all my actionbeans and some of them requires a parameter, e.g. /admin/users/123. Taking this URL as an example, in my actionbean I am able to get the parameter 123 and display user information fine. The same page allows changes to user information and this is where the problem comes in. On submitting the updated user information, the URL becomes /admin/users. This is a problem because calling context.getRequest().getRequestURL() returns me /admin/users instead of /admin/users/123. I reckon this to be due to the way the tag is written in the jsp: stripes:form beanclass=com.name.ui.web.stripes.action.admin.UserActionBean.../stripes:form which resolves to form action=/admin/users method=post.../form The corresponding actionbean is coded and annotated as such: @UrlBinding(/admin/users/{userId}) public class UserActionBean{ private long userId; public long getUserId(){return userId;} public void setUserId(long userId){this.userId=userId;} } Has anyone encountered the same problem and managed to solve it? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] problem with validation
I haven't checked out deeply, but I guess those fields starting upper-cased ain't no good. Stripes relies on JavaBean conventions : the field name should start lower-cased, so that getters/setters actually represent the name of the field : private String myField; public String getMyField(); public void setMyField(String myField); Two options : 1/ stick to the convention, and rename TahunTerbit to tahunTerbit (and all other fields) 2/ move your @Validate annotation to the getter (getTahunTerbit) Of course, 1/ is most recommended. It's common practice to start field names lower case. HTH Remi 2012/8/17 Frans fasisi2...@yahoo.com Hello, I am trying to put validation to form fields. Here is the link to the .java file : (https://dl.dropbox.com/u/16178250/Stripes/CatalogActionBean.java) Here is the link to the StripesResources.properties : (https://dl.dropbox.com/u/16178250/Stripes/StripesResources.properties) The problems are: 1. minvalue and maxvalue for TahunTerbit are not working. I submit the form with value less then 1000 but didn't get error message 2. I always get error message when I submit invalid number for TahunTerbit like '12q' 3. I submit the form without set a value for NamaPengarang field but didn't get error message. Why the minvalue and maxvalue do not working? Why I always get error message for TahunTerbit? Why I never get error message when NamaPengarang is empty? Thank you -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Mapping Root of Web App to an Action using Dynamic Mappings
Hi Christian, Can't you just write an index.jsp file that forwards to your main action ? Cheers Remi 2012/5/15 Cristian C ottersl...@gmail.com Grzegorz, Have you seen http://www.tuckey.org/urlrewrite/ It does pretty much what your filter does and much more. My problem is that even with that, I Can't map / If I add a / I get startup errors.. It seems that once the app is initialized it tries to retrieve /,.. I really don't understand why yet but it causes a stack overflow. I can successfully map anything else to any stripes .action, but I can't map to any Dynamic mappings though. I mapped index.html to category.action. I also figured the problem with the welcome-file thing. It's appending the welcome file to all Dynamic Mappings/clean URL's.. so if I have /category/1 with the welcome file I get /category/1 + whatever the welcome file is. like /category/1index.html So I'm still totally out of ideas how to map / to an action mapped to @UrlBinding.. Only @UrlBinding(/) worked but it invokes the bean unwantedly.. I wonder if this is a bug?.. On Tue, May 15, 2012 at 4:01 PM, Grzegorz Krugły g...@karko.net wrote: store -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] URL not bound to actionbean in Tomcat6
Hi Dawson, Do you have a full stack trace ? Cheers Remi 2012/5/15 Dawson Mossman daws...@lashpoint.com We're currently using the Stripes framework on an active production application - lately we've been getting errors saying Caused by: net.sourceforge.stripes.exception.ActionBeanNotFoundException: Could not locate an ActionBean that is bound to the URL. This seems to be happening when Tomcat 6 is loading new threads to service requests. The strange thing is that the URL that the problem references does not exist and I have no idea where it's trying to load it from. We've verified all files and done text searches on the server and there are no references to the URL or the action bean. Can you tell me: 1 - What events trigger Stripes to bind all URL's that are configured to their action beans? I know this happens when an app is deployed, but does it also occur during a thread load or pooling in Tomcat? I know that the requested (target) URL is not the URL that's causing the problem, so there must be something else triggering this besides the URL in the browser. 2 - Do you have any idea where it would be getting the invalid URL from if it is not specified in any ActionBean classes? The url it's trying to bind to an action bean is an old one that existed several months ago, but is no longer in the code. Is this cached somewhere within Tomcat? Thanks! -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes, Twitter bootstrap validation errors
Hi Rolf, You can easily wrap this into a custom JSP tag if you want to stay DRY... Cheers Remi 2012/3/26 Rolf r.su...@minihouse.eu alexis BOISSONNAT alexis.boissonnat@... writes: Hi Rolf, You can try something like that : div class=control-group ${empty(actionBean.context.validationErrors[YourInputName]) ? '' : 'error'} Which will add the 'error' class if any error occurs on YourInputName. Cheers, Alex. Hey Alex, Your suggestion works great, even though it is a bit verbose and repetitive. Thanks a lot! Greets Rolf -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] auto
Hi Joaquin, What exactly are you thinking about ? Widget-only tools like http://metawidget.org/ or a full stack a la rails ? Cheers Remi 2012/3/9 Joaquin Valdez joaquinfval...@gmail.com UI generation? Is there such a thing for Stripes? Joaquin Valdez joaquinfval...@gmail.com -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] auto
Yeah they've been busy apparently ! Last time I checked it wasn't that advanced. Nope I haven't really used that myself, I only took it for a spin quite a while ago, just to have a look... They don't seem to integrate with the Stripes taglib. One could write the necessary adaptors : metawidget is all about this, it basically grabs the more metadata it can from your environment (domain models etc) and spits out GUIs magically for the target platform. I remember concluding it was a very interesting project but too complex for what I need everyday. I mean, generating GUIs is a graal many have tried to find, but in my own experience it's impossible to abstract a User Interface completely : you will definitly need to put your hands in the dirt eventually. There's no practical meta model for describing User Interfaces as far as I know. And anyways I'm always (even morethat usually) skeptical when something has the word meta in it :) Still, these tools can help a lot in terative development, they allow to build faster on top of something solid. The only drawnback is when the framework gets into your way and makes it harder to do what you want. Metawidget is probably heavy stuff if you only target Stripes. It would shine in a multi-platform environment where you need GUIs that run in Swing, in a webapp etc. But this type of approach, as far as I know, has always failed as well... Write once run anywhere ain't happening yet in the GUI world... Cheers Remi 2012/3/9 Grzegorz Krugły g...@karko.net Wow, this metawidget stuff looks really nice. Remi, do you have any experience using it together with Stripes? W dniu 09.03.2012 10:17, VANKEISBELCK Remi pisze: Hi Joaquin, What exactly are you thinking about ? Widget-only tools like http://metawidget.org/ or a full stack a la rails ? -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] auto
I was thinking of write once (or more exactly *specify* once) and run anywhere : Java, iPhone, Android, Web, Fash, you-name-it. There ain't even no such thing as CSS in Swing :P 2012/3/9 Samuel Santos sama...@gmail.com Hi all, Write once run anywhere ain't happening yet in the GUI world... I disagree. We have been using Media Queries, part of the so called Responsive Design, and have been quite successful with it. There is no GUI generated magically, just plain normal CSS at work. http://mediaqueri.es/ has some great examples of sites using it. Cheers, -- Samuel Santos http://www.samaxes.com/ 2012/3/9 VANKEISBELCK Remi r...@rvkb.com Yeah they've been busy apparently ! Last time I checked it wasn't that advanced. Nope I haven't really used that myself, I only took it for a spin quite a while ago, just to have a look... They don't seem to integrate with the Stripes taglib. One could write the necessary adaptors : metawidget is all about this, it basically grabs the more metadata it can from your environment (domain models etc) and spits out GUIs magically for the target platform. I remember concluding it was a very interesting project but too complex for what I need everyday. I mean, generating GUIs is a graal many have tried to find, but in my own experience it's impossible to abstract a User Interface completely : you will definitly need to put your hands in the dirt eventually. There's no practical meta model for describing User Interfaces as far as I know. And anyways I'm always (even morethat usually) skeptical when something has the word meta in it :) Still, these tools can help a lot in terative development, they allow to build faster on top of something solid. The only drawnback is when the framework gets into your way and makes it harder to do what you want. Metawidget is probably heavy stuff if you only target Stripes. It would shine in a multi-platform environment where you need GUIs that run in Swing, in a webapp etc. But this type of approach, as far as I know, has always failed as well... Write once run anywhere ain't happening yet in the GUI world... Cheers Remi 2012/3/9 Grzegorz Krugły g...@karko.net Wow, this metawidget stuff looks really nice. Remi, do you have any experience using it together with Stripes? W dniu 09.03.2012 10:17, VANKEISBELCK Remi pisze: Hi Joaquin, What exactly are you thinking about ? Widget-only tools like http://metawidget.org/ or a full stack a la rails ? -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] Fwd: auto
Sorry sent it to Samuel only... -- Forwarded message -- From: VANKEISBELCK Remi r...@rvkb.com Date: 2012/3/9 Subject: Re: [Stripes-users] auto To: Samuel Santos sama...@gmail.com I disagree :) Joaquim, if you want, have a look at Woko : v1.x : http://pojosontheweb.wikispaces.com/ (no longer maintained) v2.0 : https://github.com/vankeisb/woko2/wiki (will soon be relased, we're in beta) It's a home-made framework that I've been building with friends through the years and that is getting quite cool. It's full stack, with persistence (JPA), user profiling, UI generation, RPC and more. I didn't want to make an official announcement before we ship 2.0 (I will : Woko is definitly built on Stripes), but I invite you to take the framework for a spin if you want : https://github.com/vankeisb/woko2/wiki/Tutorial It still requires polishing (we're on it) but it's usable. Don't hesitate to contact us : https://lists.sourceforge.net/lists/listinfo/woko-devel Cheers Remi 2012/3/9 Samuel Santos sama...@gmail.com Hi Joaquim, Stripes does not have such thing. Cheers, -- Samuel Santos http://www.samaxes.com/ On Fri, Mar 9, 2012 at 2:49 PM, Joaquin Valdez joaquinfval...@gmail.comwrote: Hi Remi! I was thinking more along the lines of a full stack thing that worked with Stripes. Joaquin On Mar 9, 2012, at 1:17 AM, VANKEISBELCK Remi wrote: Hi Joaquin, What exactly are you thinking about ? Widget-only tools like http://metawidget.org/ or a full stack a la rails ? Cheers Remi 2012/3/9 Joaquin Valdez joaquinfval...@gmail.com UI generation? Is there such a thing for Stripes? Joaquin Valdez joaquinfval...@gmail.com -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users Joaquin Valdez joaquinfval...@gmail.com 541-690-8593 -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] ActionBean - JSP communication
Hi Thomas, As you've understood, Stripes has no intermediate object between controller and view, as you can find in SpringMVC (ModelAndView), or apparently the PHP framework you mention. You just handle it your way, all you have is the action bean. For simple cases, I guess that ${actionBean.property} is enough. See the Calculator example. In the end, we all end up with intermediate objects, we often even expose domain objects directly to the views. You don't extract the properties of your domain model into each action bean, instead you reference the domain objects direcly in your JSPs : ${actionBean.myDomainObject.myProp} So in case you feel complexity's getting beyond the acceptable limit, create a POJO that holds the state you need in your views. That's just good design I think (object were meant to be modular they said :P). It could (read should) also encapsulate some of the logic you apparenly have in the Resolutions at the moment, making your application independant of any third pary framework, easily testable, etc etc. In the end, action beans should contain the less code as possible, they're only a bridge between the web and your own POJOs. Anyway, one thing is sure : the use of request attributes doesn't really help, as you still don't know what request attrs are set by which event handler. Go for the POJO :) Note that it won't solve the what property can I use in this view ? problem : you still have to ensure that properties you access in your views are ready, and this can depend on the event handler used. AFAIK only good engineering can save you there, as there's no strong way I know that can enforce that. Cheers Remi 2011/6/20 Thomas Menke stripe...@cipher-code.de Hi, coming from the PHP world I am starting to get practice with Stripes. And I wonder how to best communicate between JSP and my ActionBean. In PHP I liked to use smarty. There one just saves all the data the template needs into a large HashMap und the template will work with this map, after the lifetime of what was comparable to the ActionBean already exceeded its lifetime. I noticed that I can get the same behaviour with JSP by using getContext().getRequest().setAttribute(name, someObject); That works very well, but I doesn't feel like I am supposed to do this. Am I? Is this a suitable approach? Or are there good reasons to keep hands away from this? The other way is obviously to have some getter-methods on my ActionBean that I call from the JSP file. That is what I used most of the time. But sometime I want to calculate values for the JSP in my event handler. Thus I have to save them in a property of the ActionBean and introduce a getter method for them. That works well for small ActionBeans, but with a rising number of event handlers within one action bean I easily loose the overview which property I introduced for which event handler. Another approach that I have seen is creating a POJO for each and every jsp page with all properties for that JSP page. Then this object is saved as a property of the actionBean and it is worked with from JSP (additionally this may save a little memory because only the properties that are actually needed by the current JSP need to be allocated). What would you say is best practice and why? Thank you, Thomas -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Strange introspection issue after upgrade to 1.5.2
Hi John, In order to narrow down the search, have you tried the 1.5.2 webapp in your previous app server etc. ? That way you could know if Stripes is the problem, or if it's your app server... Cheers Remi 2011/5/4 Newman, John W newma...@d3onc.com No sir, just the core jar .. we’re not really doing anything too wild.. if anything the object hierarchy we have is a bit weird due to jaxb generation. But these same classes have always worked just fine. Now after 1.5.2 it works fine .. for a while then something happens to disturb it. net.sourceforge.stripes.util.bean.PropertyExpressionEvaluation #fillInTypeInformation() one minute says java.lang.Short Same class, same field, next minute says java.lang.Serializable. We are not doing any crazy class reloading on the fly or anything like that. I know bean introspection is cached somewhere, but as far as I know there is no background thread going on updating those results as they should never change. Our class hierarchy is a bit wild like I said. public class TheBindingTarget extends AbstractCompositeKeyEntity { private Short id; // initially this is detected as Short, at some point it changes to Serializable. public Short getID() { return this.ID; } public void setID(Short id) { this.ID = id; } // other fields, not important } public abstract class AbstractCompositeKeyEntity extends AbstractEntityShort { // overrides for equals and hashcode for a 3 part business key (ID, version, revision) } public abstract class AbstractEntityPK extends Serializable implements EntityPK { // equals and hashcode for 1 part key, ID } public interface EntityPK extends Serializable extends Serializable { PK getID(); void setID(PK id); } The uppercase of “ID” comes from jaxb generated classes, which come from someone else’s xsd that I cannot control. I don’t think the case is an issue however. Given the nature of that hierarchy with generics and all that, I can understand how the “get type” code could be slightly thrown off for this case given the complexity going on in there. However, it should be giving the same result every time – not changing from one minute to the next right? -John *From:* Samuel Santos [mailto:sama...@gmail.com] *Sent:* Wednesday, May 04, 2011 11:35 AM *To:* Stripes Users List *Subject:* Re: [Stripes-users] Strange introspection issue after upgrade to 1.5.2 Hi John, Do you use any Stripes extension/plugin? Cheers, -- Samuel Santos http://www.samaxes.com/ On Wed, May 4, 2011 at 3:24 PM, Newman, John W newma...@d3onc.com wrote: All, We’ve been using jdk5 / jboss4.22 / stripes 1.5 in production, stable for a long time now. We’ve decided it’s about time to do some upgrades to jdk6 / jboss 5. The classpath scanner in stripes 1.5 does not work on jboss 5, which was fixed in 1.5.2 as a result of http://www.stripesframework.org/jira/browse/STS-655 Ok so in addition to jdk / jboss upgrade, we have to upgrade stripes.jar. Not a big deal. Everything has gone smoothly, except for one remaining issue that is about as bizarre as it gets. The application starts up and runs fine. But, if you leave it sit idle for a period of time, say ~30 minutes, sometimes, the bean introspection results will somehow change. This doesn’t make a whole lot of sense to me, but it’s what we’re seeing. After startup, DefaultActionBeanPropertyBinder says this one field is of type java.lang.Short (which it is), it will take a value and bind into that no problem. You can click around all you want and everything is good. Now, ~30 minutes of idle time go by, all of a sudden DefaultActionBeanPropertyBinder now decides to say this same field is of type java.lang.Serializable, foolishly tries to do new Serializable(“value”); and fails. I can’t explain why that result would change over time. Might we be running into a regression that came from the changes in http://www.stripesframework.org/jira/browse/STS-664 also in 1.5.2 ? That’s the only thing I’m seeing related to introspection. Because this is such a weird issue, I’m not even sure if it’s stripes related. We are working on narrowing it down and continuing to research, but I thought I’d ask here first. Unfortunately I can’t run 1.5 in jboss5, but we are trying 1.5.2 in jboss4 right now (I suspect this will still show the issue). Is there any reasonable explanation for that change causing the result to say “java.lang.Short” one minute, and “java.lang.Serializable” the next? Has anyone else ran into this? Thanks in advance for any ideas. -John -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of
Re: [Stripes-users] plugin strategies?
Hi Will, folks, That said, I don't agree with the plugins concept at all. To be honest, I also think a clean dependency mechanism + some centralized docs would be enough. Anyway, it's a nice to have, as it allows beginners to have no ramp up. Simply list plugins, install them, it adds the deps, classes and updates your web.xml. Even if many Stripers won't probably use it once they are used to the framerwork, consider it a selling feature. If those are included then, regardless of original intent, users will think that these are first class citizens of Stripes, and that the there is some obligation for the maintainer of Stripes core to maintain these as well. Well, everything is subjective, but clearly some of the extensions will be first class citizens. Think about what's already in the core and will be moved (e.g. Spring integration). Now, I've never said that ALL extensions should be included to the main repo and built along with the framework. I think every extension, once it gets popular, stable etc., turns into a good candidate for integration into the offficial extensions of the framework. There's also the issue of code segregation, IP rights, and commit access. Yep, but on the other hand it ensures that all parts are consistent when new versions are released, that they have the same license, and that they are managed by the same group of developers. Last, it could drag new coders into the framework. And again, it doesn't mean that evey extension has to be there, just the ones that have been approved by the community. You can still write your separate, third party extension if you want, and distribute it the way you want. In short, think about how life would be if Spring's codebase contained only core container, and everything else (JDBC, JMS, ...) was scattered around the web... Different builds, different policies of maven sync, different websites... admin drag you said ? :P That's the way all projects handle scalability of the codebase : they split stuff into modules. I guess Stripes is now at that point, and it's a good sign. There's no reason to repaint the whole thing or re-engineer it from the ground up [...] Not sure you talk about the modularization of the build here. If you do, c'mon... the build already exists, there's nothing to do. I'd say half a day work, not a class file touched, only a few moves... From the ground up ??? There's always stuff to do. Leverage the processes in place [...] That's exactly what I'm trying to do :) Cheers Remi 2011/4/20 Will Hartung redro...@sbcglobal.net I'm not going to copy the entire thread, and I'm not responding to any one in particular. Not being a maven fan, even I can agree with the conversion to Maven. The primary reason is that Maven has become a de facto portable project meta data that all of the IDEs support well, and makes IDE integration reasonably simple. The secondary reason is that someone has gracefully volunteered to undertake the entire process finishing and rounding out the process, and once complete, the ongoing maintenance should be minor and simple to keep up, at least until Maven 4 comes out and they break backward compatibility Yet Again. That said, I don't agree with the plugins concept at all. Stripes is already pretty plugin friendly and whatever burden there is in terms of creating an add on to Stripes is likely minor compared to the work on the add on functionality itself. I don't think folks are saying yea, I'd like to add that to Stripes, but it's just Too Hard. Implementing an interface and adding a line or two to web.xml -- not really arduous. Even I have done it, and if you know anything about my history with Stripes, that's saying something. I see no motivation to make Stripes a plugin framework with some default modules. It's that already, effectively. It's just that this concept doesn't boil to the top when it comes to implementing Stripes. It pretty much works out of the box with minimal configuration. That's a feature. In contrast to something like Spring or JBoss, which is all modules of all kinds and all generic metadata that you have to master to get Hello World running. It's a mostly terrible experience, especially for a new person. I also don't agree with moving the popular Stripes Stuff in to the Stripes source tree. If those are included then, regardless of original intent, users will think that these are first class citizens of Stripes, and that the there is some obligation for the maintainer of Stripes core to maintain these as well. Basically that makes this free code for stripes, but it's free as in free like a puppy. Ben has enough to do just to keep up with bug fixes and such without adding traffic and questions and clutter to the core system stuff that he's not going to be responsible for. There's also the issue of code segregation, IP rights, and commit access. Since each module would, ostensibly, have a different owner and it's easy to
Re: [Stripes-users] plugin strategies?
2011/4/20 Will Hartung redro...@sbcglobal.net My only concern is that the community can decide whatever it wants, but most of the time its Ben who gets to do the work. And voting to get more puppies for Ben to take care of isn't really fair to him. That's why I resist the inclusion of some of the existing external pieces in to the responsibility of the current maintainer. Well, I get your point, even if it's a little off topic I think. You raise an issue, but it already exists. Having the official extensions in the codebase won't change the fundamental problem (Ben commiting 99% of the code). And again, I never said that *everything* has to end up in a common source control. I just think that some of the extensions (parts that are in the core and need externalization - e.g. Spring integration, or other stuff likes StripesSecurity) have their place there. Now for new extensions, stuff that is marginal etc, a separate project is fine for me. That's just how it should be. It's admin drag on the end users/developers, but not the Stripes dev team. Does it make Stripes harder to use? Definitly. Some folks I know recently spent half a day setting up Stripes/Hibernate/Security. IMHO, that's 3 and a half hours too much ! This should be as simple as adding a dep to your pom (or if you push it like Morten does, to type a command or two). And that's what approved extensions mean to me : stuff that solves a common problem and has been approved by the community. From then, I see no problem in shipping these extensions along the framework (again, like everybody does). As you mentioned if there is some core mechanism (either in the runtime or in the build) that makes integration of 3rd party modules easier and more consistent, AND those changes are straightforward and suitable for a 1.x release, then that may well be a good plan. That makes Stripes more puppy friendly but without the need to actually take them home. That's exactly my point. As usual, you said it with better words :P Cheers Remi -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] plugin strategies?
into the master branch); 3. Allow developers to create plugins / extensions under Stripes organization or fork their plugins. However, I'm not sure that we should do any change before Stripes 1.6. I miss ObjectPostProcessor so much that I rather prefer to release 1.6 first and then make the changes. What do you think? Cheers, -- Samuel Santos http://www.samaxes.com/ On Mon, Apr 18, 2011 at 10:47 PM, VANKEISBELCK Remi r...@rvkb.comwrote: Hey Ben, First things first, what about : 1/ full maven build (yeah, drop ant for good), with refactoring of the source folders etc. 2/ integrate all extensions to the main build (as submodules) - Stripersist / Stripes security for starters 3/ ask plugin devs to submit doc for their plugins, to be integrated to the main wiki I know you're not a maven freak, but really, 2 separate builds is awkward, and having a standard build would help a lot for third party integration. I really think a small source layout refactoring and dropping all the build.xml stuff wouldn't hurt. I'm ok to do this on 1.5.x and trunk whenever you want. Cheers Remi 2011/4/18 Ben Gunter gunter...@gmail.com I just chimed in on the LinkedIn discussion, though there's not much to my response. Basically, I'd like to see a clear plan for what you want to do. Then we can discuss how to execute the plan. On Thu, Apr 14, 2011 at 9:01 PM, Morten Matras morten.mat...@gmail.com wrote: Hi George In the Stripesframework linked in group there is an ongoing discussion regarding this topic. There seems to be a consensus regarding your ideas. Currently we're waiting for Ben / Tim to give their opinion before stepping forward with some action. Ben? Thanks Morten 2011/4/14 George Clark gc1...@gmail.com Hi all, I enjoy Stripes in my personal time. Unfortunately, at the office we're using Grails. I'm wondering if any of you have thought about or implemented a grails-type plugin solution in your dev environments? There are a few things I enjoy about Grails and one of them is their plugin strategy. It can be messy at times but I feel we've leveraged it well and it's become pretty valuable. An example might be something off-the-shelf like an Acegi authentication plugin. It can be installed through maven, and it's controllers, configuration and WEB-INF resources are merged into the main application. But I suppose the real benefit is if you're in charge of five or six applications in different repositories and want to share more than just taglibs. For instance, we have a system that consumes events from running applications and makes decisions to notify people of said events. We've built a plugin that provides beans to create such events, controllers to act as an interface to the queued data, and controllers that provide views to allow humans to inspect the app directly complete with images, css and javascript. It appears as a complete application structure: controllers/views/jars/assests, etc. Any person creating a new webapp merely adds event-monitoring-plugin in their pom and now they've met the corporate web interface for monitoring and reporting. Occasionally the plugin is upgraded and we can simply change the value in the pom and rebuild the application. I'm feeling like if we were doing this is stripes I would be copying these resources into every application and they would live within that applications resources. I suppose I could do something at build time where I unzip a package over-top of main application code which adds controllers and adds resources to WEB-INF. Maybe I could also make it smart enough to modify the ActionResolver.Packages list. Or, maybe I just need to think about this differently altogether! What kinds of processes/solutions do you use when wanting to share this kind of code? Thanks! George -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Morten Matras Consultant Blob Communication ApS Svendsagervej 42 DK-5240 Odense NØ P: (+45) 36 96 07 06 W: www.blobcom.com E: morten.mat...@gmail.com -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs
Re: [Stripes-users] plugin strategies?
Hey Ben, First things first, what about : 1/ full maven build (yeah, drop ant for good), with refactoring of the source folders etc. 2/ integrate all de facto standard extensions to the main build (as submodules) - Stripersist / Stripes security for starters 3/ ask plugin devs to submit doc for their plugins, to be integrated to the main wiki I know you're not a maven freak, but really, 2 separate builds is awkward, and having a standard build would help a lot for third party integration. I really think a small source layout refactoring and dropping all the build.xml stuff wouldn't hurt. I'm ok to do this on 1.5.x and trunk whenever you want. Cheers Remi 2011/4/18 Ben Gunter gunter...@gmail.com I just chimed in on the LinkedIn discussion, though there's not much to my response. Basically, I'd like to see a clear plan for what you want to do. Then we can discuss how to execute the plan. On Thu, Apr 14, 2011 at 9:01 PM, Morten Matras morten.mat...@gmail.comwrote: Hi George In the Stripesframework linked in group there is an ongoing discussion regarding this topic. There seems to be a consensus regarding your ideas. Currently we're waiting for Ben / Tim to give their opinion before stepping forward with some action. Ben? Thanks Morten 2011/4/14 George Clark gc1...@gmail.com Hi all, I enjoy Stripes in my personal time. Unfortunately, at the office we're using Grails. I'm wondering if any of you have thought about or implemented a grails-type plugin solution in your dev environments? There are a few things I enjoy about Grails and one of them is their plugin strategy. It can be messy at times but I feel we've leveraged it well and it's become pretty valuable. An example might be something off-the-shelf like an Acegi authentication plugin. It can be installed through maven, and it's controllers, configuration and WEB-INF resources are merged into the main application. But I suppose the real benefit is if you're in charge of five or six applications in different repositories and want to share more than just taglibs. For instance, we have a system that consumes events from running applications and makes decisions to notify people of said events. We've built a plugin that provides beans to create such events, controllers to act as an interface to the queued data, and controllers that provide views to allow humans to inspect the app directly complete with images, css and javascript. It appears as a complete application structure: controllers/views/jars/assests, etc. Any person creating a new webapp merely adds event-monitoring-plugin in their pom and now they've met the corporate web interface for monitoring and reporting. Occasionally the plugin is upgraded and we can simply change the value in the pom and rebuild the application. I'm feeling like if we were doing this is stripes I would be copying these resources into every application and they would live within that applications resources. I suppose I could do something at build time where I unzip a package over-top of main application code which adds controllers and adds resources to WEB-INF. Maybe I could also make it smart enough to modify the ActionResolver.Packages list. Or, maybe I just need to think about this differently altogether! What kinds of processes/solutions do you use when wanting to share this kind of code? Thanks! George -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Morten Matras Consultant Blob Communication ApS Svendsagervej 42 DK-5240 Odense NØ P: (+45) 36 96 07 06 W: www.blobcom.com E: morten.mat...@gmail.com -- Benefiting from Server Virtualization: Beyond Initial Workload Consolidation -- Increasing the use of server virtualization is a top priority.Virtualization can reduce costs, simplify management, and improve application availability and disaster protection. Learn more about boosting the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Benefiting from Server Virtualization:
Re: [Stripes-users] Time for TimeZones and Sharing!
Hi folks, I'd even go further : make EVERYTHING request-scoped. Not only TypeConverters, but also ActionBean resolution and Validation. If you look at the current ActionBeanResolver, it's all static. One should be able to write dynamic resolvers if he wants to. The whole path thing in ActionResolver makes it very clumsy at the moment. Same goes for ValidationMetadataProvider. After all, everything that occurs in Stripes should occur when serving a request, therefore the request (or action bean conctext) should be available everywhere. Cheers Remi - ThreadLocal-based RequestInterceptor is what I'm doing for now, but clearly, it sucks. 2011/3/20 Will Hartung redro...@sbcglobal.net TimeZones! TimeZones suck! Working on a project that's deployed on GAE. GAE only works on UTC. That's the default TimeZone, and everything done within the running image is done at UTC. Specifically, Date parsing and display default to UTC. This is not so good when you're doing a local app, in my case PST/PDT. I chatted with the gang on IRC about ways around this and how to work with it. Through various attempts I settled on using a custom TypeConverter and Formatter for dates hard code to my time zone. (I'll pause while Ben mops up whatever beverage he has just spewed over his expensive computer equipment and his antique mahogany desk overlooking the tranquil rustic harbor from his hillside, panoramic window). The change was simple, but it brought up other issues. Basically, this technique works great, if you're limited to a single time zone. But not so much if you want a flexible time zone (like say a user setting). The problem centers around the fact that the TypeConverters and Formatters have no context whatsoever. They have no access to the StripesContext or the Session or anything else. The s:text tag also has no way to specify a time zone, and the Formatters have no way to have a TZ passed to them even if we added a parameter to s:text. Also, the TZ on s:text would only affect rendering, not parsing, so it's inelegant at best anyway. So, simply, I'd like to suggest in Stripes 2.0 that the formatters and type converters be given some kind of access to the current request. Then they can leverage the Session or some other piece of information tied to the request itself. We can hack around this currently with something like a ThreadLocal, but that's something I think is kind of distasteful. I suggest it for S2.0 simply because I don't think it could be done without breaking all of the current TCs and Formatters, and that shouldn't be done in a 1.x release. A touch rude. We could maintain the old TCs and Formatters and create an extended TC and Formatter and dispatch internally, but that's kind of nasty in a these have been deprecated forever why are they still here kind of way. But that's a different discussion. I guess we could instead add a WantsContext interface and if we see that, then call a setContext method on the TC/Formatter. That way new TCs can broadcast that they want it, and old TCs work just peachy. Perhaps that's not so nasty bad that we could do that right now (I haven't looked at how much of the StripesContext is available at this phase of the processing, I'm just blindly assuming it's handy). Anyway, fuel for the fire. Share and Enjoy! Regards, Will Hartung -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Index Properties + Null Values
Even more : if you know in advance that you have 7 props, then why using a list, and not 7 distinct properties ? Cheers Remi 2011/3/15 Poitras Christian christian.poit...@ircm.qc.ca Maybe a better solution is to provide default values as empty/null strings in the action bean's property. So if your property look like private ListString messages; Try adding an initialisation method like @Before(stages=LifecycleStage.BindingAndValidation) public void populateDefaultMessages() { messages = new ArrayListString(); for (int i = 0; i 7; i++) { messages.add(); } } In your JSP, use indexed input fields like stripes:textarea name=messages[1]/ Remember that empty textarea will be replaced by null (default behaviour). But I think you will still have an array of 7 elements. Christian -Message d'origine- De : Iwao AVE! [mailto:haraw...@gmail.com] Envoyé : March-15-11 3:09 AM À : Stripes Users List Objet : Re: [Stripes-users] Index Properties + Null Values Hi, TypeConverter is for converting each value. You need to write a custom ActionBeanPropertyBinder. I wouldn't call it an easy way, but take a look at the default implementation (DefaultActionBeanPropertyBinder) and see if you could extend/override the default behavior. Regards, Iwao 2011/3/15 samuel baudouin osenseij...@gmail.com: Hi Adam! I would try converters : simply implement TypeConverterString and bind it to the entities you are trying to retrieve. I'd be interested to know how it worked! Cheers, Sam On Tue, Mar 15, 2011 at 2:29 PM, Adam Stokar ajsto...@gmail.com wrote: Thanks for the quick response Iwao. Seems like the binding is what I am talking about then. Is there an easy way to override the default behavior? On Tue, Mar 15, 2011 at 1:59 AM, Iwao AVE! haraw...@gmail.com wrote: Hi Adam, Try specifying the index of each textarea explicitly. Mon: stripes:textarea name=messages[0] / Tue: stripes:textarea name=messages[1] / Wed: stripes:textarea name=messages[2] / ... FYI, all 7 values are submitted by the browser unless the form element is disabled. The difference is how these values are bound by Stripes. Hope this helps, Iwao 2011/3/15 Adam Stokar ajsto...@gmail.com: Hi All, I am trying to submit a form with for a user's weekly hours. At the top of the form, there is a textarea for each day of the week to type a message. The message is optional. My intention is to submit the form and get 7 values, 1 for each textarea, regardless of whether the textarea is blank or not. Currently, if i have a message on Mon, Tues, and Thurs, I am only seeing 3 Strings in my ActionBean since Wed, Fri, Sat and Sun are all null when submitted. Is there a way to guarantee I submit 7 String values regardless of if the textarea have a message or not? Thanks in advance, Adam -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] ValidateNestedProperties on more than one level
Hi Samuel, Apparently, you're right : @ValidateNestedProperties references @Validate, not @ValidateNestedProperties again... If this can help you, I have a workaround. I'm using a custom NestedValidationMetadataProvider in Woko, that allows you to write validation annotations inside your POJOs, and have Stripes use them. Stuff like this : class MyAction implements ActionBean { ... @ValidateNestedProperties([]) MyClass myProp ... } and class MyClass { @Validate(required=true) String foo } The basic idea is that when an action bean property's marked with an empty @ValidateNestedProperties, the NestedMetadataValidationProvider recurses into the property and applies it's validation info. With the example above, request parameter 'myProp.foo' has to be provided. Of course, the provider can recurse to any depth, which means you can even write this : class MyClass { @ValidateNestedProperties([]) MyOtherClass other } class MyOtherClass { @Validate(...) String bar } Last, the metadata provider will favor the run-time type of the property. You can even write this : class MyAction implements ActionBean { ... @ValidateNestedProperties([]) Object prop } Then the validation metadata provider will (if prop ain't null of course) get the runtime type of the instance referenced by 'prop' and introspect for validation errors. I tend to think this behavior should be standard in Stripes. Yeah, I know, you shouldn't have dependencies of your Domain Model on Stripes, it's bd... But I often have collaborators to my actions that are not part of the domain model. They're UI objects. And I don't always know the runtime type of the action's properties (hey, inheritance...). So I'd like to annotate whatever class I want with @Validate, and if it's reachable by the action bean at request processing time, then have Stripes validate everything. Feels natural, doesn't it ? Last, this nested validation metadata provider allows for better factorization the validation logic : you can delegate to action collaborators, and the validation rules will depend on the objects referenced by your action bean. Anyway, in case you're interested : https://github.com/vankeisb/woko2/blob/master/stripes-plugins/src/main/java/woko/actions/nestedvalidation/NestedValidationMetadataProvider.java I'd be happy to have the community feedback on this btw... HTH Cheers Remi 2011/3/10 samuel baudouin osenseij...@gmail.com Hi all! I was wondering : is it possible to do nested validation to more than one level? Lets say I want to validate the name of an Account contained in a WebModel, for instance : getWebModel().getAccount().getName() I know the annotation @ValidateNestedProperties makes it possible to validate one level , but apparently it is impossible to go deeper... I think i ll fall back to validation methods but that would have been nice, no? Any idea? Cheers -- Samuel Baudouin -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] ValidateNestedProperties on more than one level
but what? Regards, Sam On Thu, Mar 10, 2011 at 7:08 PM, VANKEISBELCK Remi r...@rvkb.com wrote: Hi Samuel, Apparently, you're right : @ValidateNestedProperties references @Validate, not @ValidateNestedProperties again... If this can help you, I have a workaround. I'm using a custom NestedValidationMetadataProvider in Woko, that allows you to write validation annotations inside your POJOs, and have Stripes use them. Stuff like this : class MyAction implements ActionBean { ... @ValidateNestedProperties([]) MyClass myProp ... } and class MyClass { @Validate(required=true) String foo } The basic idea is that when an action bean property's marked with an empty @ValidateNestedProperties, the NestedMetadataValidationProvider recurses into the property and applies it's validation info. With the example above, request parameter 'myProp.foo' has to be provided. Of course, the provider can recurse to any depth, which means you can even write this : class MyClass { @ValidateNestedProperties([]) MyOtherClass other } class MyOtherClass { @Validate(...) String bar } Last, the metadata provider will favor the run-time type of the property. You can even write this : class MyAction implements ActionBean { ... @ValidateNestedProperties([]) Object prop } Then the validation metadata provider will (if prop ain't null of course) get the runtime type of the instance referenced by 'prop' and introspect for validation errors. I tend to think this behavior should be standard in Stripes. Yeah, I know, you shouldn't have dependencies of your Domain Model on Stripes, it's bd... But I often have collaborators to my actions that are not part of the domain model. They're UI objects. And I don't always know the runtime type of the action's properties (hey, inheritance...). So I'd like to annotate whatever class I want with @Validate, and if it's reachable by the action bean at request processing time, then have Stripes validate everything. Feels natural, doesn't it ? Last, this nested validation metadata provider allows for better factorization the validation logic : you can delegate to action collaborators, and the validation rules will depend on the objects referenced by your action bean. Anyway, in case you're interested : https://github.com/vankeisb/woko2/blob/master/stripes-plugins/src/main/java/woko/actions/nestedvalidation/NestedValidationMetadataProvider.java I'd be happy to have the community feedback on this btw... HTH Cheers Remi 2011/3/10 samuel baudouin osenseij...@gmail.com Hi all! I was wondering : is it possible to do nested validation to more than one level? Lets say I want to validate the name of an Account contained in a WebModel, for instance : getWebModel().getAccount().getName() I know the annotation @ValidateNestedProperties makes it possible to validate one level , but apparently it is impossible to go deeper... I think i ll fall back to validation methods but that would have been nice, no? Any idea? Cheers -- Samuel Baudouin -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Samuel Baudouin -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] ValidateNestedProperties on more than one level
Even easier :) Still, doesn't address the dynamic aspect of the problem. Cheers Remi 2011/3/10 samuel baudouin osenseij...@gmail.com Remi, thanks for those precisions! But it seems like Stripes beats us again! Ben, thanks for that! Sometimes the most obvious is not what we think about in the first place! Cheers all, Sam On Thu, Mar 10, 2011 at 9:36 PM, Ben Gunter gunter...@gmail.com wrote: Properties can be nested as deeply as you need them to be. Nested field names are separated by dots. For your example, you'd use: @ValidateNestedProperties(@Validate(field=account.name, ...)) private WebModel webModel; -Ben On Thu, Mar 10, 2011 at 5:48 AM, samuel baudouin osenseij...@gmail.com wrote: Hi all! I was wondering : is it possible to do nested validation to more than one level? Lets say I want to validate the name of an Account contained in a WebModel, for instance : getWebModel().getAccount().getName() I know the annotation @ValidateNestedProperties makes it possible to validate one level , but apparently it is impossible to go deeper... I think i ll fall back to validation methods but that would have been nice, no? Any idea? Cheers -- Samuel Baudouin -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Samuel Baudouin -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] re quest/response scoping
Hi folks, This has already been discussed on the mailing list (not so long ago). The debate is open, and ultimately it's a personal preference : some prefer method parameters a la Spring, others favor properties. I think there is no answer here : both methods have their pros and cons, and will drive the design of your actions. In all honesty (and in my humble opinion of course, and yes I'm bias :P ), the Spring way looks theoretically better, but in practise Stripes wins hands down. Just because you have one class less to write (the model). In Stripes the model (from Spring) is the bean. This makes the controller/view duet very smooth : class MyAction ... { MyObject myObject Resolution doIt() { return new ForwardResolution(/WEB-INF/jsp/doIt.jsp } } doIt.jsp : p${actionBean.myObject.xyz}/p I fail to see how it could be more clear and concise. Spring has an additional indirection here that, IMO, ain't KISS at all ! Now when it comes to complex actions (with many event handlers and bound props), it can become tedious (hard to share validation rules, properties etc). But a common good practise in Stripes is just to divide and conqueer : split your beans into smaller ones. If they get too big, you probably have a design problem (just like for regular POJOs). I think the current design in Stripes is good, but we could also imagine to have parameters instead of props (or both) enabled. And let the user choose, depending on the situation. Feel free to send a patch :) Cheers Remi 2011/3/3 Jeppe Cramon je...@cramon.dk Hi Tony I agree IF Stripes would allow you to supply parameters for Action Methods, like Spring MVC or JERSEY (REST), that would mean a good cleanup and better encapsulation. /Jeppe *It is difficult to get a man to understand something when his salary depends upon him not understanding it.” - Upton Sinclair* On 03/03/2011, at 10.53, Tony Drago wrote: Nikolaos Giannopoulos wrote: Encapsulation in OO IMHO pertains to the class as a whole not the method level. If you want to encapsulate at the method level then your going to have a hard time not allowing someone to access and affect other attributes of the class (e.g. other attributes) as even if you mark attributes as private any method of the class can alter it. Perhaps you might be used to defining classes that should ideally be further refactored into multiple classes. Not sure - but if you could provide some more complex examples then we could examine specifics and dispense with theory or generalized statements (from my side as well) ;-) Thanks for the response. You asked for a specific example, so here you go. An action bean which creates and deletes users. IMO, these two actions belong to the same bean, but in the case of add we need all the User properties, but in the case of delete we only need the id. In Spring the controller would look like this: // ANNOTATIONS OMITTED FOR BREVITY class MyController { public String deleteUser(Integer userId) { userService.deleteUser(userId); return redirect:/listUsers; } public ModelAndView addUser(User user) { userService.addUser(user); return new ModelAndView(/showUser, user); } } In Stripes the action would look like this: // ANNOTATIONS, GETTERS AND SETTERS OMITTED FOR BREVITY class MyActionBean extends BaseActionBean { private Integer userId; private User user; Resolution deleteUser() { userService.deleteUser(userId); return new RedirectResolution(/listUsers.jsp); } Resolution addUser() { userService.addUser(user); return new ForwardResolution(/showUser.jsp); } } From a readability point of view I much prefer the Spring MVC code because I can tell without looking at the method body, what parameters are used by each handler/event. In the case of Stripes, I have to read the body of each method to figure out whether userId/User are used as request parameters or view model by each event. I feel like the Stripes approach is poorly encapsulated because - public getters/setters must be defined for userId and User, but these should only be accessible to the event handler that needs them - the view model produced by a handler also must have public getters/setters, but this model should really only be visible to the view (JSP) - there is no way to prevent one handler/view from attempting to access parameters or view data intended only for use by another handler in the same bean Again, I'm not attempting to prove that SpringMVC is better than Stripes, the question of interest is whether Stripes encourages bad practice from an OO point-of-view? (Incidentally, a nice side-effect of SpringMVC's approach is that there's no need to write boilerplate getters/setters for the request parameters, though I guess I could eliminate these by writing my Stripes action beans in Groovy) -- View
Re: [Stripes-users] Spring + Mockito
Hi Marcus, Not sure I understand what you're trying to do... Why do you have to wrap the mock ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Stripes Users, Currently I want to test an action bean. It gets a Spring bean (service class) injected via the @SpringBean annotation. Now I want this service to be mocked with Mockito. My current solution works like this: I have an interface LoginService and a real implementation LoginServiceImpl annotated with @Service annotation. In my test classpath, I also have an implementation called MockitoLoginService which uses the decorator pattern. It has the following static (!) field: public static final LoginService mock = mock(LoginService.class); The login method derived from the interface looks like this: public User login(String username, String password) throws LoginException { return mock.login(username, password); } This enables me to configure the mocked service from my unit test by configuring the mock constant: when(MockitoLoginService.mock.login(anyString(), anyString())).thenReturn(new User()); Why did I make the field static? Well, when executing LoginActionBean with MockRoundtrip, a new Spring context is created. If mock was an instance field, it would also be newly created for the action bean, so I cannot configure the mock object of the MockitoLoginService that was injected into my unit test. By using a static field, this problem is solved. Now the bad thing: By using this static field, I lose all thread safety that the real implementation provides. Test cases must be executed one after another - not really what I want. What I really want is that Stripes uses the same Spring context as the unit tests, or vice versa. I already use some Spring test annotations and implement ApplicationContextAware in my unit tests. This way, I have access to the used Spring context. But when configuring and starting the StripesFilter, a new WebApplicationContext is created and used. This one exists side by side to the context used by the unit tests. Has anyone an idea how to let use Stripes the same Spring context that us ised while executing the unit tests? Best regards, Marcus -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Spring + Mockito
Yeah your first attempt makes much more sense than this static field :) One thing though, what do you mean by injecting into JUnit ? From what I understood, you want to configure the mock object *prior* to performing a mock round trip, don't you ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Remi, Thanks for your reply. Actually I have to wrap it because MockRoundtrip uses another Spring ApplicationContext than JUnit itself. Fact is that if I inject LoginService into JUnit (which is configured to be a singleton instance of MockitoLoginService), then it is another instance than the one that is injected into my action bean. Surely I could write a simple mock object that behaves the way I want without Mockito. But by using Mockito, I can configure my test stubs very easily without writing much code. At least in theory. If that still does not help to clearify my problem: My first try was to declare a Mockito stub as Spring bean by declaring this in my applicationContext.xml: bean id=loginService class=org.mockito.Mockito factory-method=mock scope=singleton constructor-arg value=service.LoginService / /bean This _should_ work fine, but is doesn't. The service is created twice, once when starting up my JUnit tests, and the second time when the StripesFilter is initialized in my test fixture. So if I configure a mocked LoginService in JUnit, I configure another object than the one used by MockRoundtrip. Hope that this helps to understand the issue. I know that this is quite advanced stuff. I just hope that someone else hat at least a similar issue and knows a fine solution for the two Spring contexts problem :-) Best regards, Marcus - Ursprüngliche Mail - Von: VANKEISBELCK Remi r...@rvkb.com An: Stripes Users List stripes-users@lists.sourceforge.net CC: Marcus Kraßmann m...@syn-online.de Gesendet: Dienstag, 22. Februar 2011 13:38:36 Betreff: Re: [Stripes-users] Spring + Mockito Hi Marcus, Not sure I understand what you're trying to do... Why do you have to wrap the mock ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Stripes Users, Currently I want to test an action bean. It gets a Spring bean (service class) injected via the @SpringBean annotation. Now I want this service to be mocked with Mockito. My current solution works like this: I have an interface LoginService and a real implementation LoginServiceImpl annotated with @Service annotation. In my test classpath, I also have an implementation called MockitoLoginService which uses the decorator pattern. It has the following static (!) field: public static final LoginService mock = mock(LoginService.class); The login method derived from the interface looks like this: public User login(String username, String password) throws LoginException { return mock.login(username, password); } This enables me to configure the mocked service from my unit test by configuring the mock constant: when(MockitoLoginService.mock.login(anyString(), anyString())).thenReturn(new User()); Why did I make the field static? Well, when executing LoginActionBean with MockRoundtrip, a new Spring context is created. If mock was an instance field, it would also be newly created for the action bean, so I cannot configure the mock object of the MockitoLoginService that was injected into my unit test. By using a static field, this problem is solved. Now the bad thing: By using this static field, I lose all thread safety that the real implementation provides. Test cases must be executed one after another - not really what I want. What I really want is that Stripes uses the same Spring context as the unit tests, or vice versa. I already use some Spring test annotations and implement ApplicationContextAware in my unit tests. This way, I have access to the used Spring context. But when configuring and starting the StripesFilter, a new WebApplicationContext is created and used. This one exists side by side to the context used by the unit tests. Has anyone an idea how to let use Stripes the same Spring context that us ised while executing the unit tests? Best regards, Marcus -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. Free Software Download: http://p.sf.net/sfu/splunk-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk
Re: [Stripes-users] Spring + Mockito
Btw, what about : // create the Spring context for our test ApplicationContext appCtx = createSpringAppCtx() // play with the mockito bean LoginService ls = (LoginService)appCtx.getBean(...) ... // create a mock servlet context, without the Spring context loader MockServletContext ctx = createMockServletContextWithoutSpring() // add Spring to the servlet context ctx.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEX_ATTRIBUTE) // and now do the roundtrip MockRoundtrip trip = new MockRoundtrip(ctx, MyAction.class) trip.xyz() ? Cheers Remi 2011/2/22 VANKEISBELCK Remi r...@rvkb.com Yeah your first attempt makes much more sense than this static field :) One thing though, what do you mean by injecting into JUnit ? From what I understood, you want to configure the mock object *prior* to performing a mock round trip, don't you ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Remi, Thanks for your reply. Actually I have to wrap it because MockRoundtrip uses another Spring ApplicationContext than JUnit itself. Fact is that if I inject LoginService into JUnit (which is configured to be a singleton instance of MockitoLoginService), then it is another instance than the one that is injected into my action bean. Surely I could write a simple mock object that behaves the way I want without Mockito. But by using Mockito, I can configure my test stubs very easily without writing much code. At least in theory. If that still does not help to clearify my problem: My first try was to declare a Mockito stub as Spring bean by declaring this in my applicationContext.xml: bean id=loginService class=org.mockito.Mockito factory-method=mock scope=singleton constructor-arg value=service.LoginService / /bean This _should_ work fine, but is doesn't. The service is created twice, once when starting up my JUnit tests, and the second time when the StripesFilter is initialized in my test fixture. So if I configure a mocked LoginService in JUnit, I configure another object than the one used by MockRoundtrip. Hope that this helps to understand the issue. I know that this is quite advanced stuff. I just hope that someone else hat at least a similar issue and knows a fine solution for the two Spring contexts problem :-) Best regards, Marcus - Ursprüngliche Mail - Von: VANKEISBELCK Remi r...@rvkb.com An: Stripes Users List stripes-users@lists.sourceforge.net CC: Marcus Kraßmann m...@syn-online.de Gesendet: Dienstag, 22. Februar 2011 13:38:36 Betreff: Re: [Stripes-users] Spring + Mockito Hi Marcus, Not sure I understand what you're trying to do... Why do you have to wrap the mock ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Stripes Users, Currently I want to test an action bean. It gets a Spring bean (service class) injected via the @SpringBean annotation. Now I want this service to be mocked with Mockito. My current solution works like this: I have an interface LoginService and a real implementation LoginServiceImpl annotated with @Service annotation. In my test classpath, I also have an implementation called MockitoLoginService which uses the decorator pattern. It has the following static (!) field: public static final LoginService mock = mock(LoginService.class); The login method derived from the interface looks like this: public User login(String username, String password) throws LoginException { return mock.login(username, password); } This enables me to configure the mocked service from my unit test by configuring the mock constant: when(MockitoLoginService.mock.login(anyString(), anyString())).thenReturn(new User()); Why did I make the field static? Well, when executing LoginActionBean with MockRoundtrip, a new Spring context is created. If mock was an instance field, it would also be newly created for the action bean, so I cannot configure the mock object of the MockitoLoginService that was injected into my unit test. By using a static field, this problem is solved. Now the bad thing: By using this static field, I lose all thread safety that the real implementation provides. Test cases must be executed one after another - not really what I want. What I really want is that Stripes uses the same Spring context as the unit tests, or vice versa. I already use some Spring test annotations and implement ApplicationContextAware in my unit tests. This way, I have access to the used Spring context. But when configuring and starting the StripesFilter, a new WebApplicationContext is created and used. This one exists side by side to the context used by the unit tests. Has anyone an idea how to let use Stripes the same Spring context that us ised while executing the unit tests? Best regards, Marcus -- Index, Search Analyze Logs and other IT data in Real-Time with Splunk
Re: [Stripes-users] Solved: Spring + Mockito
I had no idea you could do this kind of Spring/JUnit integration. Looks cool. It probably has a way to tell it to use some supplied ApplicationContext though, instead of creating one itself... Like injecting the bean factory itself (??? :P) Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Well, my test case looks like this: @RunWith(SpringJUnit4ClassRunner.class) @TestExecutionListeners( { DependencyInjectionTestExecutionListener.class, DirtiesContextTestExecutionListener.class}) @ContextConfiguration(locations = classpath:test-context.xml) public class LogoutActionBeanTest { @Autowired private LoginService loginService; @Test public void validCredentials() throws Exception { MockHttpSession session = new MockHttpSession(CTX); when(loginService.login(anyString(), anyString())).thenReturn(new User()); MockRoundtrip trip = new MockRoundtrip(CTX, LoginActionBean.class, session); trip.setParameter(username, username); trip.setParameter(password, testpass); trip.execute(login); assertNotNull(session.getAttribute(user)); } } Here I let Spring fill in the mocked LoginService. This is what I called inject into JUnit. Now the solution: Instead of using @Autowired to get an instance of my mocked bean, I created the following method in my test fixture: protected T T getBean(String beanname, ClassT clazz) { return WebApplicationContextUtils.getWebApplicationContext(CTX).getBean(beanname, clazz); } This way I can retrieve the Spring bean instance used by Stripes, within my unit test. Not a perfect solution as there are still two Spring contexts, but it is good enough :-) Best regards, Marcus - Ursprüngliche Mail - Von: VANKEISBELCK Remi r...@rvkb.com An: Stripes Users List stripes-users@lists.sourceforge.net CC: Marcus Kraßmann m...@syn-online.de Gesendet: Dienstag, 22. Februar 2011 14:33:02 Betreff: Re: [Stripes-users] Spring + Mockito Yeah your first attempt makes much more sense than this static field :) One thing though, what do you mean by injecting into JUnit ? From what I understood, you want to configure the mock object *prior* to performing a mock round trip, don't you ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Remi, Thanks for your reply. Actually I have to wrap it because MockRoundtrip uses another Spring ApplicationContext than JUnit itself. Fact is that if I inject LoginService into JUnit (which is configured to be a singleton instance of MockitoLoginService), then it is another instance than the one that is injected into my action bean. Surely I could write a simple mock object that behaves the way I want without Mockito. But by using Mockito, I can configure my test stubs very easily without writing much code. At least in theory. If that still does not help to clearify my problem: My first try was to declare a Mockito stub as Spring bean by declaring this in my applicationContext.xml: bean id=loginService class=org.mockito.Mockito factory-method=mock scope=singleton constructor-arg value=service.LoginService / /bean This _should_ work fine, but is doesn't. The service is created twice, once when starting up my JUnit tests, and the second time when the StripesFilter is initialized in my test fixture. So if I configure a mocked LoginService in JUnit, I configure another object than the one used by MockRoundtrip. Hope that this helps to understand the issue. I know that this is quite advanced stuff. I just hope that someone else hat at least a similar issue and knows a fine solution for the two Spring contexts problem :-) Best regards, Marcus - Ursprüngliche Mail - Von: VANKEISBELCK Remi r...@rvkb.com An: Stripes Users List stripes-users@lists.sourceforge.net CC: Marcus Kraßmann m...@syn-online.de Gesendet: Dienstag, 22. Februar 2011 13:38:36 Betreff: Re: [Stripes-users] Spring + Mockito Hi Marcus, Not sure I understand what you're trying to do... Why do you have to wrap the mock ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Stripes Users, Currently I want to test an action bean. It gets a Spring bean (service class) injected via the @SpringBean annotation. Now I want this service to be mocked with Mockito. My current solution works like this: I have an interface LoginService and a real implementation LoginServiceImpl annotated with @Service annotation. In my test classpath, I also have an implementation called MockitoLoginService which uses the decorator pattern. It has the following static (!) field: public static final LoginService mock = mock(LoginService.class); The login method derived from the interface looks like this: public User login(String username, String password) throws LoginException { return mock.login(username, password); } This enables me to configure the mocked service from my unit test
Re: [Stripes-users] Spring + Mockito
H, then do it the other way maybe ? Let Stripes create a real WebApplicationContext (in MockServletContext, using Spring's loader) and use it before you roundtrip : // create stripes mock context (loads spring via context listener) MockServletContext ctx = createMockServletContextWithSpring() // get hold of the mocked service WebApplicationContext springCtx = WebApplicationContext.getWebApplicationContext(ctx) LoginService mockitoLoginService = (LoginService)springCtx.getBean(...) mockitoLoginService.xyz() ... // And later, perform the roundtrip (will inject the mock service)... MockRoundtrip trip = new MockRoundtrip(ctx, MyAction.class) ... Ok, it doesn't solve your problem, rather it's a workaround. Still, I find it more concise and simple than all those annotations : you see what's done reading the code, there's no magic :P Anyway, good luck :) Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Remi, ctx.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEX_ATTRIBUTE, springContext) I also had this idea some weeks ago. I cannot surely remember the reason why I dropped it, but I think that I was not able to convert the ApplicationContext used by JUnit to a WebApplicationContext that is needed for the whole servlet thing. So your approach fails IIRC. Maybe someday I will review the whole thing and find a way to make your approach work. That would be the best way: Using the Spring test context in Stripes. Best wishes, Marcus - Ursprüngliche Mail - Von: VANKEISBELCK Remi r...@rvkb.com An: Stripes Users List stripes-users@lists.sourceforge.net CC: Marcus Kraßmann m...@syn-online.de Gesendet: Dienstag, 22. Februar 2011 14:44:04 Betreff: Re: [Stripes-users] Spring + Mockito Btw, what about : // create the Spring context for our test ApplicationContext appCtx = createSpringAppCtx() // play with the mockito bean LoginService ls = (LoginService)appCtx.getBean(...) ... // create a mock servlet context, without the Spring context loader MockServletContext ctx = createMockServletContextWithoutSpring() // add Spring to the servlet context ctx.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEX_ATTRIBUTE) // and now do the roundtrip MockRoundtrip trip = new MockRoundtrip(ctx, MyAction.class) trip.xyz() ? Cheers Remi 2011/2/22 VANKEISBELCK Remi r...@rvkb.com Yeah your first attempt makes much more sense than this static field :) One thing though, what do you mean by injecting into JUnit ? From what I understood, you want to configure the mock object *prior* to performing a mock round trip, don't you ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Remi, Thanks for your reply. Actually I have to wrap it because MockRoundtrip uses another Spring ApplicationContext than JUnit itself. Fact is that if I inject LoginService into JUnit (which is configured to be a singleton instance of MockitoLoginService), then it is another instance than the one that is injected into my action bean. Surely I could write a simple mock object that behaves the way I want without Mockito. But by using Mockito, I can configure my test stubs very easily without writing much code. At least in theory. If that still does not help to clearify my problem: My first try was to declare a Mockito stub as Spring bean by declaring this in my applicationContext.xml: bean id=loginService class=org.mockito.Mockito factory-method=mock scope=singleton constructor-arg value=service.LoginService / /bean This _should_ work fine, but is doesn't. The service is created twice, once when starting up my JUnit tests, and the second time when the StripesFilter is initialized in my test fixture. So if I configure a mocked LoginService in JUnit, I configure another object than the one used by MockRoundtrip. Hope that this helps to understand the issue. I know that this is quite advanced stuff. I just hope that someone else hat at least a similar issue and knows a fine solution for the two Spring contexts problem :-) Best regards, Marcus - Ursprüngliche Mail - Von: VANKEISBELCK Remi r...@rvkb.com An: Stripes Users List stripes-users@lists.sourceforge.net CC: Marcus Kraßmann m...@syn-online.de Gesendet: Dienstag, 22. Februar 2011 13:38:36 Betreff: Re: [Stripes-users] Spring + Mockito Hi Marcus, Not sure I understand what you're trying to do... Why do you have to wrap the mock ? Cheers Remi 2011/2/22 Marcus Kraßmann m...@syn-online.de Hi Stripes Users, Currently I want to test an action bean. It gets a Spring bean (service class) injected via the @SpringBean annotation. Now I want this service to be mocked with Mockito. My current solution works like this: I have an interface LoginService and a real implementation LoginServiceImpl annotated with @Service annotation. In my test classpath, I also have an implementation called MockitoLoginService which uses
Re: [Stripes-users] Still seeing ConcurrentModificationException
Hi folks, Just had a look, the stack seems to show some code that ain't in Stripes (at least not in the 1.5.x branch at the time I write this email). Found this in the stack trace : net.sourceforge.stripes.controller.NameBasedActionResolverHelper.rescanFor (NameBasedActionResolverHelper.java:217) My guess is that you're using a modified action resolver (probably from JRebel) which attempts to reload the beans while incoming requests trigger bean class lookups at the same time. Hence the concurrent modification exception : request handling thread is iterating over UrlBindingFactory's classCache map at the same time JRebel's action resolver changes the map content. Stripes is supposed to scan for action beans once and only once, before being ready to handle requests, so using unsynchronized maps interlally in UrlBindingFactory is good design. Otoh, it doesn't offer thread-safe action reload. To fix the problem, we could synchronize access to the maps, or use ConcurrentHashMap. Yee (or anybody willing to see this fixed), you can demo the problem by writing a unit test that accesses UrlBindingFactory concurrently (via several threads). Then, you can fix by synchronizing where appropriate. Last, we need to see what's the performance penalty. IMHO this ain't a critical bug at all : stop using your browser while JRebel does the reload and you won't have any exception, and anyway JRebel ain't no production software as far as I know, so it's only a minor hassle. Still, if you want to give it a shot : this would be a better design that allow to write really reloadable action resolvers :P Cheers Remi 2011/2/11 samuel baudouin osenseij...@gmail.com Hi all, Yee From your stack and your code, it seems that the problem comes from one of the Stripes class... When this exception occurs is it always at the same point? Is the stack always the same? While I never encountered the problem, here is a way that could help you : You could use a load tester program such as JMeter (don't forget to make it share the session across the different virtual users). It would probably not reproduce the problem but would certainly make your life easy when testing with/without the different components. On your IDE, you could then set up an exception breakpoint on that ConcurrentModificationException and when raised pause the whole JVM (ie pause all the threads -- see breakpoint properties in Eclipse). From here, you can see where the different threads are at, and hopefully see where the double modifications is done. You would probably need to have the sources of Stripes and JRebel attached to your project (not in your project but just as a source lookup for Eclipse) in order to browse to the different classes. I know this is a bit of a bazooka to kill a fly, but this kind of random exception could be particularly tricky to pin point. If you have the time, the necessity, and most importantly not found a work around, this is how you could go... Regards, Sam On Fri, Feb 11, 2011 at 3:37 AM, Samuel Santos sama...@gmail.com wrote: Hi Yee and Nikolaos, We do not use JRebel and have come across the same issue several times, so it's surely a Stripes issue. While we get the exception logged, it's transparent to the client, the application does not crash and the client never sees an error. This issue is very rare and only happens when you open multiple tabs at once as Yee pointed out. -- Samuel Santos http://www.samaxes.com/ On Thu, Feb 10, 2011 at 3:00 PM, Nikolaos Giannopoulos nikol...@brightminds.org wrote: Yee, Well then... turn off JRebel and attempt to reproduce the bug... if you can't then it isn't Stripes. Right? I know its tempting to keep JRebel engaged all the time and I recall the time I hit a bug in JRebel and thought it was one in Stripes... it took me a long time to consider simply turning off JRebel... but if you already suspect JRebel then flip it off and attempt to reproduce. --Nikolaos Yee wrote: Hi Nokolaos, The bug has already been reported to JRebel. Stripes plugin for JRebel was created by third party, so it could take a while for it to be fixed. My concern here is to ascertain whether ConcurrentModificationException error is a bug in Stripes - or caused by the bug in JRebel. Cheers, Yee -- The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE: Pinpoint memory and threading errors before they happen. Find and fix more than 250 security defects in the development cycle. Locate bottlenecks in serial and parallel code that limit performance. http://p.sf.net/sfu/intel-dev2devfeb ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Still seeing ConcurrentModificationException
Hi Nikolaos, folks, Ah, the reloadable Action Resolver, I knew it. I guess they have the same issues with hibernate, spring, and all these stateful frameworks. Must be quite a challenge to have a fully reloadable JEE app these days !! Statefulness... Anyway, I agree that trying to sync just for that is quite useless, and risky. I've learnt that threading is always more complex that you think... Maybe it should just be part of the JRebel/Stripes docs ? I mean, I don't use JRebel myself (nor any other reloadable action resolver btw, even if the idea is quite cool - who said hot-deployed groovy beans ???) so I'm not concerned, but apparently it caused a few headaches to some of you ! Cheers Remi 2011/2/12 Nikolaos Giannopoulos nikol...@brightminds.org Remi, Your assessment is quite detailed and appears to be very thorough on multiple levels. Yes. JRebel adds it own class and many months ago I had a wild time tracing an issue when the UrlBindingFactory singleton code was converted to using an instance variable. Indeed this class exists in the JRebel Stripes plug-in. In addition, you are also correct JRebel is not to be used in Production so this issue then becomes less critical and affects development environments (which doesn't mean it isn't huge it just means you won't be affected in production). And as far as multiple threads are concerned... that could explain why we don't see it as we use TestNG and disable parallel threads... not because we want to but because we had some issues with singletons in unit tests in the past. As such, making a change to Stripes to increase synchronization is NOT something that can be justified IMO. But that is my 2 cents ;-) Great assessment! --Nikolaos VANKEISBELCK Remi wrote: Hi folks, Just had a look, the stack seems to show some code that ain't in Stripes (at least not in the 1.5.x branch at the time I write this email). Found this in the stack trace : net.sourceforge.stripes.controller.NameBasedActionResolverHelper.rescanFor (NameBasedActionResolverHelper.java:217) My guess is that you're using a modified action resolver (probably from JRebel) which attempts to reload the beans while incoming requests trigger bean class lookups at the same time. Hence the concurrent modification exception : request handling thread is iterating over UrlBindingFactory's classCache map at the same time JRebel's action resolver changes the map content. Stripes is supposed to scan for action beans once and only once, before being ready to handle requests, so using unsynchronized maps interlally in UrlBindingFactory is good design. Otoh, it doesn't offer thread-safe action reload. To fix the problem, we could synchronize access to the maps, or use ConcurrentHashMap. Yee (or anybody willing to see this fixed), you can demo the problem by writing a unit test that accesses UrlBindingFactory concurrently (via several threads). Then, you can fix by synchronizing where appropriate. Last, we need to see what's the performance penalty. IMHO this ain't a critical bug at all : stop using your browser while JRebel does the reload and you won't have any exception, and anyway JRebel ain't no production software as far as I know, so it's only a minor hassle. Still, if you want to give it a shot : this would be a better design that allow to write really reloadable action resolvers :P Cheers Remi 2011/2/11 samuel baudouin osenseij...@gmail.com Hi all, Yee From your stack and your code, it seems that the problem comes from one of the Stripes class... When this exception occurs is it always at the same point? Is the stack always the same? While I never encountered the problem, here is a way that could help you : You could use a load tester program such as JMeter (don't forget to make it share the session across the different virtual users). It would probably not reproduce the problem but would certainly make your life easy when testing with/without the different components. On your IDE, you could then set up an exception breakpoint on that ConcurrentModificationException and when raised pause the whole JVM (ie pause all the threads -- see breakpoint properties in Eclipse). From here, you can see where the different threads are at, and hopefully see where the double modifications is done. You would probably need to have the sources of Stripes and JRebel attached to your project (not in your project but just as a source lookup for Eclipse) in order to browse to the different classes. I know this is a bit of a bazooka to kill a fly, but this kind of random exception could be particularly tricky to pin point. If you have the time, the necessity, and most importantly not found a work around, this is how you could go... Regards, Sam On Fri, Feb 11, 2011 at 3:37 AM, Samuel Santos sama...@gmail.com wrote: Hi Yee and Nikolaos, We do not use JRebel and have come across the same issue
Re: [Stripes-users] View component inclusion
Hi, Correct if I'm wrong, you have action beans that generate page fragments (as HTML I guess), that you want to be able to invoke over HTTP (AJAX update), and also as parts of a more global page ? If yes, I guess that what you need is just a regular action that generates the fragment : it'll respond to HTTP requests, and you can server-side include it in any JSP using jsp:include : @UrlBinding(/myPartial.action) class MyAction implements ActionBean { String prop1; // and other props @DefaultHandler Resolution display() { return new ForwardResolution(/WEB-INF/my-partial-html.jsp); } } Via HTTP (outputs the fragment only) : http://.../myapp/myPartial.action?prop1=foobar Inside a .jsp : html ... divjsp:include page=/myPartial.action//div ... /html HTH Cheers Remi 2011/1/4 Jonathan jesuisjonat...@gmx.fr Hello. Yes you're right its a kind of useActionBean but as written in the best practices wiki page (http://www.stripesframework.org/display/stripes/Best+Practices) Prefer pre-actions over stripes:useActionBean ... /. What I want to do is to include the pre-action forward resolution in a jsp. If I do that with the useActionBeanTag (s:useActionBean beanclass=test.TestUseActionBean event=view executeResolution=true alwaysExecuteEvent=true var=myAb/ with TestUseActionBean handler returning a ForwardResolution to test-uab.jsp) it avoids the main jsp rendering and only show the test-uab.jsp -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] View component inclusion
Not sure I understand. You say you can't do this : my.jsp : html jsp:include page=/partial.action/ jsp:include page=/partial.action/ /html ? I think I've done this already... strange. As you say, Stripes does bind stuff to the request, but each include is isolated (it behaves like a full the request/response cycle). So unless your main controller action (the one handling the incoming http request) is the same as the one you include in the view (that would be quite weird :P), and you access this main controller after inclusions (like ${actionBean.xyz}), I can't see an issue here. Am I missing something ? Cheers Remi 2011/1/4 Jonathan jesuisjonat...@gmx.fr This seems to be the solution to first order, but Stripes keeps some informations in the request (the action bean, the name of the event) that prevents this method to function (event name conflict in some cases, impossible to make multiple inclusions of same action bean since it's cached). Based on feedback from the mailing list I think there is no right way to do that. I think the use of the JSTL tag c:import/ is the closest answer to what I'm looking to do. An other solution : implementing a special include tag that wrap request to avoid conflicts between parameters and attributes of the main request and those of the include request. Thank you all for your help -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] View component inclusion
Yeah sure, but it can be solved easily by storing the variable before inclusion, ans using this in the main page. You should have no problems inside the fragments, as Stripes will override the request atrribute when executing the included event. I was more wondering if the jsp:include didn't behave as expected when including a Stripes action. I'm sure I've done this already without any problem... Cheers Remi 2011/1/4 Ben Gunter gunter...@gmail.com I think what Jonathan is saying is correct, though I've never personally been troubled by it. Stripes stuffs the current ActionBean -- the one that is handling the request -- into request scope under the key actionBean. (Of course you know that.) So if you're in a JSP that was forwarded from an ActionBean and you jsp:include a request to a different ActionBean, then ${actionBean} before the include is different from ${actionBean} after the include. -Ben On Tue, Jan 4, 2011 at 8:39 AM, VANKEISBELCK Remi r...@rvkb.com wrote: Not sure I understand. You say you can't do this : my.jsp : html jsp:include page=/partial.action/ jsp:include page=/partial.action/ /html ? I think I've done this already... strange. As you say, Stripes does bind stuff to the request, but each include is isolated (it behaves like a full the request/response cycle). So unless your main controller action (the one handling the incoming http request) is the same as the one you include in the view (that would be quite weird :P), and you access this main controller after inclusions (like ${actionBean.xyz}), I can't see an issue here. Am I missing something ? Cheers Remi 2011/1/4 Jonathan jesuisjonat...@gmx.fr This seems to be the solution to first order, but Stripes keeps some informations in the request (the action bean, the name of the event) that prevents this method to function (event name conflict in some cases, impossible to make multiple inclusions of same action bean since it's cached). Based on feedback from the mailing list I think there is no right way to do that. I think the use of the JSTL tag c:import/ is the closest answer to what I'm looking to do. An other solution : implementing a special include tag that wrap request to avoid conflicts between parameters and attributes of the main request and those of the include request. Thank you all for your help -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] View component inclusion
And btw the various actions are also stored using the class name if I remember well... so you can find your beans in the request scope when you have more than one. Cheers Remi 2011/1/4 VANKEISBELCK Remi r...@rvkb.com Yeah sure, but it can be solved easily by storing the variable before inclusion, ans using this in the main page. You should have no problems inside the fragments, as Stripes will override the request atrribute when executing the included event. I was more wondering if the jsp:include didn't behave as expected when including a Stripes action. I'm sure I've done this already without any problem... Cheers Remi 2011/1/4 Ben Gunter gunter...@gmail.com I think what Jonathan is saying is correct, though I've never personally been troubled by it. Stripes stuffs the current ActionBean -- the one that is handling the request -- into request scope under the key actionBean. (Of course you know that.) So if you're in a JSP that was forwarded from an ActionBean and you jsp:include a request to a different ActionBean, then ${actionBean} before the include is different from ${actionBean} after the include. -Ben On Tue, Jan 4, 2011 at 8:39 AM, VANKEISBELCK Remi r...@rvkb.com wrote: Not sure I understand. You say you can't do this : my.jsp : html jsp:include page=/partial.action/ jsp:include page=/partial.action/ /html ? I think I've done this already... strange. As you say, Stripes does bind stuff to the request, but each include is isolated (it behaves like a full the request/response cycle). So unless your main controller action (the one handling the incoming http request) is the same as the one you include in the view (that would be quite weird :P), and you access this main controller after inclusions (like ${actionBean.xyz}), I can't see an issue here. Am I missing something ? Cheers Remi 2011/1/4 Jonathan jesuisjonat...@gmx.fr This seems to be the solution to first order, but Stripes keeps some informations in the request (the action bean, the name of the event) that prevents this method to function (event name conflict in some cases, impossible to make multiple inclusions of same action bean since it's cached). Based on feedback from the mailing list I think there is no right way to do that. I think the use of the JSTL tag c:import/ is the closest answer to what I'm looking to do. An other solution : implementing a special include tag that wrap request to avoid conflicts between parameters and attributes of the main request and those of the include request. Thank you all for your help -- Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes and Groovy
Hi folks, Well, it's more an intro to Groovy than a real Groovy/Stripes integration... I think that back in the days someone had written a real ActionBeanResolver for Groovy, using GroovyClassLoader, that allowed hot class reload etc. It really leveraged some of the groovy features, not just allowed to write beans in another language (that finally compiles to Java bytecode). Otoh, as Stripes heavily relies on static type info to do the binding etc, using Groovy with Stripes doesn't totally pay off. Of course, you'll have all the sugar of Groovy (and don't make me wrong, I use it a lot and love it), but you'll be limited to the static world because of Stripe's nature. If you want more dynamic stuff to happen, you'll probably have to write your own property binder and a few other things... I already did some work on this (using dynamic obejcts - no classes - and NoSQLs in the back end). The idea was driven by CouchDb : when I saw this I really was impressed, those guys have invented a really different way to tackle webapps (with CouchApp etc). I even ended up with a MapPropertyBinder that binds request params on... maps :) This causes several, very high level issues (binding, validation, etc), but is definitly interesting. I don't really know if Stripes would fit well in this scenario. If anyone has ideas on the subject, I'd be happy to hear them ! Cheers Remi 2010/12/21 Freddy Daoud xf2...@fastmail.fm Hi Søren, I found the article in my archives and posted it here: http://www.fdaoud.com/groovy.html Cheers, Freddy On Tue, 21 Dec 2010 11:02:02 +0100, Søren Pedersen specons...@gmail.com said: Hi guys I have read something about using Stripes and Groovy together and have seen some references around the web, but I can't seem to find a How-to somewhere. There is a reference to an article on DZone by Freddy, but it points to nowhere. Can anybody help? -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes and Groovy
Hi Yes I understand : I hate to write Java code, so I'm Groovy-ing whenever I can as well :) If you use maven, you have almost nothing to do in order to integrate groovy compilation : there's the gmaven plugin that does it all. It hooks in the maven lifecycle to do the mixed java/groovy compilation for you. I'm using it a lot, works great overall. You just need to define the dep to groovy and configure gmaven plugin, like this : https://github.com/vankeisb/woko2/blob/master/pom.xml Cheers Remi 2010/12/21 Søren Pedersen specons...@gmail.com Hi Freddy and Remi Thanks alot for the article, Freddy. Will try it out :) I am looking into this to see if we can use the syntactically sugar from Groovy. I understand what you are saying, Remi and I guess there might be more to it than just compile the action bean with Groovy. But anyway, we will play with it a little and see what happens. Thanks alot Cheers Søren Den 21/12/2010 13.16 skrev VANKEISBELCK Remi r...@rvkb.com: Hi folks, Well, it's more an intro to Groovy than a real Groovy/Stripes integration... I think that back in the days someone had written a real ActionBeanResolver for Groovy, using GroovyClassLoader, that allowed hot class reload etc. It really leveraged some of the groovy features, not just allowed to write beans in another language (that finally compiles to Java bytecode). Otoh, as Stripes heavily relies on static type info to do the binding etc, using Groovy with Stripes doesn't totally pay off. Of course, you'll have all the sugar of Groovy (and don't make me wrong, I use it a lot and love it), but you'll be limited to the static world because of Stripe's nature. If you want more dynamic stuff to happen, you'll probably have to write your own property binder and a few other things... I already did some work on this (using dynamic obejcts - no classes - and NoSQLs in the back end). The idea was driven by CouchDb : when I saw this I really was impressed, those guys have invented a really different way to tackle webapps (with CouchApp etc). I even ended up with a MapPropertyBinder that binds request params on... maps :) This causes several, very high level issues (binding, validation, etc), but is definitly interesting. I don't really know if Stripes would fit well in this scenario. If anyone has ideas on the subject, I'd be happy to hear them ! Cheers Remi 2010/12/21 Freddy Daoud xf2...@fastmail.fm Hi Søren, I found the article in my archives and posted it here: http://www.fdaoud.com/gr... -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Preventing multiple form submission
Hi there, I think this has been already discussed in the past on this list. Several solutions have been discussed, mainly using a token mechanism + interceptor. I don't have time yet to dig for info, but for sure this is something I'd like to have as a core feature if possible. This is clearly a recurrent issue. Cheers Remi 2010/11/16 Pakin arui...@gmail.com Hi Nikolaos, have you used the transaction token mechanism in Struts? A similar mechanism should solve your problem. It would be really easy to implement. If you don't know what I am talking about, let me know and I will explain further. Cheers, Angel. Nikolaos Giannopoulos wrote: Hi, Just wondering how others elegantly solve this situation: 1) User is editing a form and fills it out and clicks submit button 2) Form gets successfully processed on the server however before a response is returned the user hits the stop button, their internet connection drops, etc... 4) User clicks on submit again and tries to re-submit the same information(*) Now, this would be trivial if there was a unique piece of information in the content being posted however lets assume someone posting some blog / news content wherein there is really no unique info (e.g. although it may be rare there is nothing wrong with 2 people say posting the same content with the same title). I was thinking to tag the users session with the last successfully submitted Stripes _sourcePage field and direct the user to the view handler if they are trying to do an edit and the _sourcePagematches. Thoughts??? --Nikolaos -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- View this message in context: http://old.nabble.com/Preventing-multiple-form-submission-tp30229773p30233802.html Sent from the stripes-users mailing list archive at Nabble.com. -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Maven convention
Thanks for the offering mate ! The Stripes mvn build is almost good now. There's just this ugly test module (as you could see it yourself), but apart from that most of it works perfect. I mean, we gen the taglib descriptors etc, sign the jars etc... There are a few glitches, but overall, it works fine. We're just waiting for Ben's green light before a directory structure refactoring, and it'll be perfect... He won't be long now : he managed to change all the version numbers etc yesterday, deploy to central (yes yes !!)... I think he's beginning his love affair with maven, but he won't say it yet :P Cheers Remi 2010/11/10 Nathan Maves nathan.ma...@gmail.com For what it is worth I can personally tell you that we (MyBatis.org) team are working hard to achieve this same goal. We now have around 6 sub maven project along with the core maven project. It has really helped us deliver faster and more stable releases. It has also allowed us to engage more people from the community to help with development. I would love to see the Stripes community follow suit. Just last week I was trying to find where the unit tests for Stripes were located. To my surprise they are not in the core module. I also just spent a few minutes trying to find the maven page on the website, which I have found in the past, and I can't seem to find it again. I would love to see something as simple as http://code.google.com/p/mybatis/wiki/DocMavenTutorial. For those that are still using Ant you really just need to give it a try. I honestly have never seen someone who gives maven a try for their build process ever go back to Ant. For a product who believes in convention over configuration I really think it is a perfect fit for Stripes. I am offering up any help or advice that you may need from myself or the MyBatis team. Nathan On Wed, Nov 10, 2010 at 7:05 AM, Joaquin Valdez joaquinfval...@gmail.com wrote: Thanks Ben! On Nov 10, 2010, at 5:54 AM, Ben Gunter wrote: Thanks. That's exactly what I did, and it must have worked! http://repo2.maven.org/maven2/net/sourceforge/stripes/stripes/1.5.4/ On Wed, Nov 10, 2010 at 5:35 AM, VANKEISBELCK Remi r...@rvkb.com wrote: Not sure it's not too late, but anyway... The gpg thing is in the maven build if I remember well, there's a maven plugin for that. You just need pgp on the build machine, with a pubkey that you have distributed on the PGP network... then mvn clean deploy -Prelease if I'm right : this pushes everything on sonatype's repo. Then, on sonatype, just close the staging request and release. Cheers Remi 2010/11/10 Ben Gunter gunter...@gmail.com I'm working on releasing 1.5.4 now, but I can't promise I'll get it done tonight. There's some stuff involved I've never done, like GPG signing the artifacts and getting them synced to central through Sonatype. If I screw something up, the release will be delayed. -Ben On Sun, Nov 7, 2010 at 9:09 PM, Nikolaos Giannopoulos nikol...@brightminds.org wrote: Samuel, I am very much in favour of Maven on any project to the point that I have been very vocal about Stripes and Maven support. However, I would agree with Ben that for 1.5.4 that we just keep things as they are. In fact, I think 1.5.4 has stewed long enough and should be officially released as we are approaching a year since the release of 1.5.3. As I have mentioned a number of times perception is key in software IMHO and a release of 1.5.4 trumps internal project changes - at least for me. Speaking of which: Ben: Any idea when 1.5.4 will be released? It contains a lot of key fixes and it has baked long enough? No??? --Nikolaos Samuel Santos wrote: Ben, Consider this as an excuse to optimize our code structure ;) Cheers, -- Samuel Santos http://www.samaxes.com/ On Fri, Nov 5, 2010 at 2:04 PM, Ben Gunter gunter...@gmail.com wrote: This is something we can consider after the release of 1.5.4. I didn't feel the need to add a Maven build in the first place, and I surely don't like the idea of having to move stuff all around to accommodate it so there will be resistance. -Ben On Sun, Oct 31, 2010 at 11:17 AM, VANKEISBELCK Remi r...@rvkb.com wrote: Hi Nathan, In order to keep the current tooling (ant, ide settings, scripts, etc) working, and to get the first maven build working smoothly without being intrusive, it has been agreed that nothing had to be changed. Now that it works, I already talked about some refactoring of the folders to allow less config in poms, and more importantly, to allow tests to be in the same module than the core code. For the moment, due to the folder layout that was imposed, I had to create a specific module for the unit tests. This means that the core module is built (and deployed if you do mvn deploy) even when tests fail. It only has to compile to get installed
Re: [Stripes-users] [Stripes-dev] Stripes 1.5.4 released
Thanks dude ! Cheers Remi 2010/11/10 Ben Gunter gunter...@gmail.com It's available from Sourceforge now, and it should sync to Maven central soon. Here's a list of changes since 1.5.3: http://stripesframework.org/jira/browse/STS?report=com.atlassian.jira.plugin.system.project:changelog-panel -Ben -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-development mailing list stripes-developm...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-development -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Maven convention
Not sure it's not too late, but anyway... The gpg thing is in the maven build if I remember well, there's a maven plugin for that. You just need pgp on the build machine, with a pubkey that you have distributed on the PGP network... then mvn clean deploy -Prelease if I'm right : this pushes everything on sonatype's repo. Then, on sonatype, just close the staging request and release. Cheers Remi 2010/11/10 Ben Gunter gunter...@gmail.com I'm working on releasing 1.5.4 now, but I can't promise I'll get it done tonight. There's some stuff involved I've never done, like GPG signing the artifacts and getting them synced to central through Sonatype. If I screw something up, the release will be delayed. -Ben On Sun, Nov 7, 2010 at 9:09 PM, Nikolaos Giannopoulos nikol...@brightminds.org wrote: Samuel, I am very much in favour of Maven on any project to the point that I have been very vocal about Stripes and Maven support. However, I would agree with Ben that for 1.5.4 that we just keep things as they are. In fact, I think 1.5.4 has stewed long enough and should be officially released as we are approaching a year since the release of 1.5.3. As I have mentioned a number of times perception is key in software IMHO and a release of 1.5.4 trumps internal project changes - at least for me. Speaking of which: Ben: Any idea when 1.5.4 will be released? It contains a lot of key fixes and it has baked long enough? No??? --Nikolaos Samuel Santos wrote: Ben, Consider this as an excuse to optimize our code structure ;) Cheers, -- Samuel Santos http://www.samaxes.com/ On Fri, Nov 5, 2010 at 2:04 PM, Ben Gunter gunter...@gmail.com wrote: This is something we can consider after the release of 1.5.4. I didn't feel the need to add a Maven build in the first place, and I surely don't like the idea of having to move stuff all around to accommodate it so there will be resistance. -Ben On Sun, Oct 31, 2010 at 11:17 AM, VANKEISBELCK Remi r...@rvkb.comwrote: Hi Nathan, In order to keep the current tooling (ant, ide settings, scripts, etc) working, and to get the first maven build working smoothly without being intrusive, it has been agreed that nothing had to be changed. Now that it works, I already talked about some refactoring of the folders to allow less config in poms, and more importantly, to allow tests to be in the same module than the core code. For the moment, due to the folder layout that was imposed, I had to create a specific module for the unit tests. This means that the core module is built (and deployed if you do mvn deploy) even when tests fail. It only has to compile to get installed/deployed into maven repos. That sucks (not that word again...) a lot, and IMHO is the main reason to so some small refactorings. Ben ? Have you thought about it a little ? Would you mind if I do some small surgery in 1.5.x and trunk so that we have the tests in the core module ? Cheers Remi 2010/10/31 Nathan Maves nathan.ma...@gmail.com Just curious if anyone has thought to migrate the current layout of the stripes code to use more Maven conventions? Nathan -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best
Re: [Stripes-users] [JIRA] Created: (STS-779) Release 1.5.4 (also to Maven Repo)]
Let's go. It's been too long already. And if this layout thing actually turns out to be a disaster, well, we'll fix and re-release. The release process (apart from the whole website/news etc) is really straightforward with maven now, I don't see no showstopper. If anyone thinks we should wait, please speak up ! Cheers Remi 2010/11/9 Nikolaos Giannopoulos nikol...@brightminds.org Thought those on the use mailing list might want to voice their opinion(s). --Nikolaos Original Message Subject: [Stripes-dev] [JIRA] Created: (STS-779) Release 1.5.4 (also to Maven Repo) Date: Mon, 8 Nov 2010 19:52:13 -0600 (CST) From: Nikolaos (JIRA) j...@stripesframework.orgj...@stripesframework.org Reply-To: Stripes Development List stripes-developm...@lists.sourceforge.netstripes-developm...@lists.sourceforge.net To: stripes-developm...@lists.sourceforge.net Release 1.5.4 (also to Maven Repo) -- Key: STS-779 URL: http://www.stripesframework.org/jira/browse/STS-779 Project: Stripes Issue Type: Task Affects Versions: Release 1.5.4 Reporter: Nikolaos Ben Gunter wrote on 10/5/2010: The layout tags in 1.5.3 and earlier buffer virtually everything in memory before dumping it all out at once. I've modified the tags to stream directly to output instead, but it required a major overhaul so I'd like to have it tested thoroughly before I release 1.5.4. From the perspective of the Stripes developer, layouts should work almost exactly the same. snip I have lots of crazy test cases that work great. I just wanted people to drop in a snapshot where they're running 1.5.3 and make sure everything still works. The issues that I personally had w/ nested layouts in 1.5.4 Snapshot have been resolved with this fix. I believe in asides others have echoed this sentiment. Can we now move forward to officially release 1.5.4 (also to Maven Repo) We can always delay this release but to what end? There will always be another release to pack in more fixes or features. Who in the Stripes community agrees / disagrees? --Nikolaos -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://www.stripesframework.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now!http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-development mailing liststripes-developm...@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/stripes-development -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] [JIRA] Created: (STS-779) Release 1.5.4 (also to Maven Repo)]
Hi, The question is about the nested layouts feature that Ben included weeks ago. Remember ? He even asked for testing at that time... Not sure I remember you whining people sending anything concrete, like test cases. At least no such thing got commited in our webtests... anyway. I have been talking with Ben about it and he said that according to him the nested layouts feature is ready unless someone has a problem with it. Since no one has a problem, and since it was the feature we waited for in order to release, I suggested to go for it. We're not gonna spend months with this stuff. Many people is waiting for 1.5.4 to be officially released. If you're not, well, just stick to 1.5.3. Also, many people have tried out the 1.5.4-SNAPSHOT version. So I don't think there's any reason to panic here... Now for the if it has a problem we'll release again : that's what every software does, isn't it ? I mean, there are bugs, we fix them, we release... Moreover, now that releasing into maven central is a one-command operation or almost, I don't see the problem. Even a critical issue (which doesn't seem to be the case for now) would not really serious : just rollback and keep 1.5.3 in the meantime we fix the bug. Don't make me wrong : I don't say it's classy to release with a blocker. But it ain't classy to wait forever either, and again, 1.5.4 has already been out for a while as a SNAPSHOT so it should be tested the best we can... Sometimes, you just need balls :P Anyway, unless you guys have a problem with the layouts thing, I don't see why you complain. No layout problem found ? Well, let's go. That was my point. Cheers Remi 2010/11/9 gshegosh g...@karko.net W dniu 09.11.2010 22:29, Nikolaos Giannopoulos pisze: What is the issue you have with the 1.5.4 release going live? Personally I have no issue with 1.5.4 release going live since it works splendidly for me on Glassfish 3 even with my quirky CMS stuff based on layouts. What I have disagree with is the approach that Remi seems to be supporting: And if this layout thing actually turns out to be a disaster, well, we'll fix and re-release. In my opinion, either the feature is working, or it's out of the release. I'm not current with the state of layout tags modifications, if they are confirmed to be working, let 1.5.4 be released; I based my previous post on that single sentence which could suggest they are NOT fully confirmed to be working. -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] CryptoUtils standalone
Hi Keith, Sorry for the late reply. What exactly are you trying to reuse ? I'm just trying to understand. Stripes is supposed to handle the Web MVC part : if your application's logic is written in its tier, then it should not depend on Stripes. Your action beans usually just invoke your biz logic, that should be written in an independent module. If you depend directly on CryptoUtils, then your best option is probably to fork that one single class for your standalone app and re-implement the methods you use so that they don't call StripesFilter. Using MockRoundtrip in a standalone app seems odd. Last, if you have a refactoring proposal for the class (to make the crypto feature independant of Stripes) that's worth it, we'll surely consider the option. Cheers Remi 2010/11/4 Keith khyl...@bge.ie Hi, We have a stripes web application. We now wish to re-use some of the functionality of the web application in a standalone java program without re-writing the code. The problem we are facing is that the web-application uses the CryptoUtils class to encrypt/ decript some values. When this is run from a standalone program we get the error below. Is it possible to use the CryptoUtil in standalone mode, perhaps by Mocking certain objects, or injecting a Configuration instance. Cheers, Keith ERROR: net.sourceforge.stripes.controller.StripesFilter - net.sourceforge.stripes.exception.StripesRuntimeException: Something is trying to access the current Stripes configuration but the current request was never routed through the StripesFilter! As a result the appropriate Configuration object cannot be located. Please take a look at the exact URL in your browser's address bar and ensure that any requests to that URL will be filtered through the StripesFilter according to the filter mappings in your web.xml. at net.sourceforge.stripes.controller.StripesFilter.getConfiguration (StripesFilter.java:161) at net.sourceforge.stripes.util.CryptoUtil.decrypt(CryptoUtil.java:181) ... -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Maven convention
Hi Nathan, In order to keep the current tooling (ant, ide settings, scripts, etc) working, and to get the first maven build working smoothly without being intrusive, it has been agreed that nothing had to be changed. Now that it works, I already talked about some refactoring of the folders to allow less config in poms, and more importantly, to allow tests to be in the same module than the core code. For the moment, due to the folder layout that was imposed, I had to create a specific module for the unit tests. This means that the core module is built (and deployed if you do mvn deploy) even when tests fail. It only has to compile to get installed/deployed into maven repos. That sucks (not that word again...) a lot, and IMHO is the main reason to so some small refactorings. Ben ? Have you thought about it a little ? Would you mind if I do some small surgery in 1.5.x and trunk so that we have the tests in the core module ? Cheers Remi 2010/10/31 Nathan Maves nathan.ma...@gmail.com Just curious if anyone has thought to migrate the current layout of the stripes code to use more Maven conventions? Nathan -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Source forge description: It's stripey and itdoesn't suck
Stripes: because other frameworks sucks Cheers Remi - what ? -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Source forge description: It's stripey and itdoesn't suck
Yeah, love that one. Cheers Remi 2010/10/29 Stone, Timothy tst...@barclaycardus.com Been passively following this thread… and I just want to defend the use of the word “suck.” While seemingly “unprofessional” it is not without precedent: the Macintosh text editor BBEdit uses “It doesn’t suck.” Why not twist Freddy’s title a bit: “Stripes: because Java web development doesn’t have to suck.” Regards, Tim *From:* VANKEISBELCK Remi [mailto:r...@rvkb.com] *Sent:* Friday, October 29, 2010 12:49 PM *To:* Stripes Users List *Subject:* Re: [Stripes-users] Source forge description: It's stripey and itdoesn't suck Stripes: because other frameworks sucks Cheers Remi - what ? ___ Barclays www.barclaycardus.com ___ This e-mail and any files transmitted with it may contain confidential and/or proprietary information. It is intended solely for the use of the individual or entity who is the intended recipient. Unauthorized use of this information is prohibited. If you have received this in error, please contact the sender by replying to this message and delete this material from any system it may be on. -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Source forge description: It's stripey and it doesn't suck
Souvenirs, souvenirs... To be honest I someimes miss those endless threads on TSS, was quite funny over there at the time. Now it's just advertisement and ohter bullshit. Cheers Remi - and Rolf... 2010/10/28 Freddy Daoud xf2...@fastmail.fm On the source forge page of Stripes I see the text: Source forge description: It's stripey and it doesn't suck I don't know what 'stripey' is, but I think 'suck' is really inappropriate language for a serious product as The Stripes Framework... http://sourceforge.net/projects/stripes/ Back in 2005, TheServerSide was the forum for many a web framework animated flame war. People were finally realizing that Struts was asking way too much work from the developer and doing way too little work for the developer in return--others knew it all along-- and Tim Fennell's intelligent and insightful comments were signed with a link to Stripes and the caption: Because web development doesn't have to suck. This caught my eye because it was a bold statement. Now, 2010 closing out, TSS is still the (a) site for animated flame wars, Struts has been replaced by JSF which is just as bad, but it takes a Spring vs Java EE thread; just your run-of-the-mill here's my new framework post doesn't make people waste their time anymore. Stripes has matured and perhaps, Karen, you are right, we shouldn't use 'suck' in our tagline. So, after all the brou-ha-ha-ha-ha of getting Stripes back into action, let's hear suggestions for a new, catchy, witty, smart, attractive tagline. Don't ask for mine, I've already used it for a book title ;) Cheers, Freddy -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] Stripes and GWT
Hi, You don't need to declare a mapping for the Stripes dispatcher servlet : DMF embeds its own. Since DMF only responds to pseudo 404, I think that you only need the GWT servlet mapped in web.xml (and DMF, mapped to /* of course). This way, if a request maps gwt then it'll be handled by the GWT servlet, otherwise if it matches an action url binding, then DMF will handle it. Cheers Remi 2010/10/26 Oscar Westra van Holthe - Kind os...@westravanholthe.nl On 25-10-2010 at 12:01, farouk alhassan wrote: Can the DynamicMappingFilter not be mapped to the DispatcherServlet like this? filter-mapping filter-nameDynamicMappingFilter/filter-name servlet-nameDispatcherServlet/servlet-name dispatcherREQUEST/dispatcher /filter-mapping It can, but this is really just a no-op. The DynamicMappingFilter only does something when the unfiltered request returns a 404 error. And when that happens, it already lets the DispatcherServlet handle the request. So in this setup, you can just as well leave it out. servlet-mapping servlet-nameGWTServlet/servlet-name url-pattern/gwt/url-pattern /servlet-mapping servlet-mapping servlet-nameDispatcherServlet/servlet-name url-pattern/*/url-pattern /servlet-mapping Am not an expert in Servlet API so this may not be correct Although correct, this does have the effect of mapping everything except /gwt to Stripes. If that is intended, setup the DynamicMappingFilter to filter /* and remove the DispatcherServlet as it's already used implicitly. If you want the two separate URL spaces, remove the DynamicMappingFilter and map the DispatcherServlet to /stripes instead. Oscar -- ,-_ Oscar Westra van Holthe - Kind http://www.xs4all.nl/~kindop/http://www.xs4all.nl/%7Ekindop/ /() ) (__ ( If we don't believe in freedom of expression for people we despise, =/ () we don't believe in it at all. -- Noam Chomsky -BEGIN PGP SIGNATURE- iEYEARECAAYFAkzHGPsACgkQLDKOJAl7tOITVwCfZC2dGLnsTjoJ2vpwqjJ0I5ir lXIAoMFAT3IvQdR/aAvt/lOUro+Y1mB4 =ujGq -END PGP SIGNATURE- -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
Re: [Stripes-users] CleanUrl bug from 1.5.1+ when using MockRoundtrip
Yes, please do. Thanks Remi 2010/10/26 Nathan Maves nathan.ma...@gmail.com Should I put in a JIRA for this issue? On Wed, Oct 20, 2010 at 10:15 AM, VANKEISBELCK Remi r...@rvkb.com wrote: Hi Nathan, Just had a quick look to your test. Refactored to : http://pastebin.com/02nY8aWF The two test methods that use a string url for the binding work fine. The one using the beanclass doesn't work... As a workaround for now, you can use stringified urls in your tests. I'll try to understand what's going on as soon as I have a moment. Cheers Remi 2010/10/20 Nathan Maves nathan.ma...@gmail.com Sure thing Remi. The following example fails because the id is null. Nathan ACTION package com.foo.stripes; import net.sourceforge.stripes.action.ActionBean; import net.sourceforge.stripes.action.ActionBeanContext; import net.sourceforge.stripes.action.DefaultHandler; import net.sourceforge.stripes.action.Resolution; import net.sourceforge.stripes.action.UrlBinding; @UrlBinding(/foo/{$event}/{id}) public class TestAction implements ActionBean { ActionBeanContext context; Integer id; @DefaultHandler public Resolution bar() { return null; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Override public void setContext(ActionBeanContext context) { this.context = context; } @Override public ActionBeanContext getContext() { return this.context; } } TEST package com.foo.stripes; import java.util.HashMap; import java.util.Map; import net.sourceforge.stripes.controller.DispatcherServlet; import net.sourceforge.stripes.controller.StripesFilter; import net.sourceforge.stripes.mock.MockRoundtrip; import net.sourceforge.stripes.mock.MockServletContext; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class ParameterTestAction { MockServletContext context; @Before public void setup() { context = new MockServletContext(test); // Add the Stripes Filter MapString,String filterParams = new HashMapString,String(); filterParams.put(ActionResolver.Packages, com.foo.stripes); context.addFilter(StripesFilter.class, StripesFilter, filterParams); // Add the Stripes Dispatcher context.setServlet(DispatcherServlet.class, StripesDispatcher, null); } @Test public void testParameter() throws Exception { final Integer id = 2; MockRoundtrip trip = new MockRoundtrip(context, TestAction.class); trip.setParameter(id, id.toString()); trip.execute(); TestAction action = trip.getActionBean(TestAction.class); assertEquals(id, action.getId()); } } On Wed, Oct 20, 2010 at 2:56 AM, VANKEISBELCK Remi r...@rvkb.com wrote: Haven't looked yet, but the log might be normal. Could you post a test case that reproduces your bug ? This way I'll have a closer look if you want. Cheers Remi 2010/10/20 Nathan Maves nathan.ma...@gmail.com Just tested this with logging on 1.5.3. It looks like there is an issue with the {$event} binding but I am not sure that is really an issue or not. Let me know if there is anything else I can do on my end to help out. Here is the log for 1.5.3 INFO 2010-10-19 21:46:10,991 net.sourceforge.stripes.util.Log.info (): Stripes Initialization Complete. Version: 1.5.3, Build: 1.5.3 DEBUG 2010-10-19 21:46:11,844 net.sourceforge.stripes.util.Log.debug(): LocalePicker selected locale: en_US DEBUG 2010-10-19 21:46:11,844 net.sourceforge.stripes.util.Log.debug(): LocalePicker did not pick a character encoding, using default: UTF-8 DEBUG 2010-10-19 21:46:11,848 net.sourceforge.stripes.util.Log.debug(): Matched /admin/product/{$event}/{product.id} to /admin/product/{$event}/{product.id} INFO 2010-10-19 21:46:11,858 net.sourceforge.stripes.util.Log.info (): Expression validation will be performed using: net.sourceforge.stripes.validation.expression.Jsp20ExpressionExecutor DEBUG 2010-10-19 21:46:11,859 net.sourceforge.stripes.util.Log.debug(): Transitioning to lifecycle stage RequestInit DEBUG 2010-10-19 21:46:11,862 net.sourceforge.stripes.util.Log.debug(): Transitioning to lifecycle stage ActionBeanResolution DEBUG 2010-10-19 21:46:11,863 net.sourceforge.stripes.util.Log.debug(): Matched /admin/product/{$event}/{product.id} to /admin/product/{$event}/{product.id} DEBUG 2010-10-19 21:46:11,866 net.sourceforge.stripes.util.Log.debug(): Matched /admin/product/{$event}/{product.id} to /admin/product/{$event}/{product.id} DEBUG 2010-10-19 21:46:11,871
Re: [Stripes-users] CleanUrl bug from 1.5.1+ when using MockRoundtrip
Hi Nathan, Just had a quick look to your test. Refactored to : http://pastebin.com/02nY8aWF The two test methods that use a string url for the binding work fine. The one using the beanclass doesn't work... As a workaround for now, you can use stringified urls in your tests. I'll try to understand what's going on as soon as I have a moment. Cheers Remi 2010/10/20 Nathan Maves nathan.ma...@gmail.com Sure thing Remi. The following example fails because the id is null. Nathan ACTION package com.foo.stripes; import net.sourceforge.stripes.action.ActionBean; import net.sourceforge.stripes.action.ActionBeanContext; import net.sourceforge.stripes.action.DefaultHandler; import net.sourceforge.stripes.action.Resolution; import net.sourceforge.stripes.action.UrlBinding; @UrlBinding(/foo/{$event}/{id}) public class TestAction implements ActionBean { ActionBeanContext context; Integer id; @DefaultHandler public Resolution bar() { return null; } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } @Override public void setContext(ActionBeanContext context) { this.context = context; } @Override public ActionBeanContext getContext() { return this.context; } } TEST package com.foo.stripes; import java.util.HashMap; import java.util.Map; import net.sourceforge.stripes.controller.DispatcherServlet; import net.sourceforge.stripes.controller.StripesFilter; import net.sourceforge.stripes.mock.MockRoundtrip; import net.sourceforge.stripes.mock.MockServletContext; import org.junit.Before; import org.junit.Test; import static org.junit.Assert.*; public class ParameterTestAction { MockServletContext context; @Before public void setup() { context = new MockServletContext(test); // Add the Stripes Filter MapString,String filterParams = new HashMapString,String(); filterParams.put(ActionResolver.Packages, com.foo.stripes); context.addFilter(StripesFilter.class, StripesFilter, filterParams); // Add the Stripes Dispatcher context.setServlet(DispatcherServlet.class, StripesDispatcher, null); } @Test public void testParameter() throws Exception { final Integer id = 2; MockRoundtrip trip = new MockRoundtrip(context, TestAction.class); trip.setParameter(id, id.toString()); trip.execute(); TestAction action = trip.getActionBean(TestAction.class); assertEquals(id, action.getId()); } } On Wed, Oct 20, 2010 at 2:56 AM, VANKEISBELCK Remi r...@rvkb.com wrote: Haven't looked yet, but the log might be normal. Could you post a test case that reproduces your bug ? This way I'll have a closer look if you want. Cheers Remi 2010/10/20 Nathan Maves nathan.ma...@gmail.com Just tested this with logging on 1.5.3. It looks like there is an issue with the {$event} binding but I am not sure that is really an issue or not. Let me know if there is anything else I can do on my end to help out. Here is the log for 1.5.3 INFO 2010-10-19 21:46:10,991 net.sourceforge.stripes.util.Log.info(): Stripes Initialization Complete. Version: 1.5.3, Build: 1.5.3 DEBUG 2010-10-19 21:46:11,844 net.sourceforge.stripes.util.Log.debug(): LocalePicker selected locale: en_US DEBUG 2010-10-19 21:46:11,844 net.sourceforge.stripes.util.Log.debug(): LocalePicker did not pick a character encoding, using default: UTF-8 DEBUG 2010-10-19 21:46:11,848 net.sourceforge.stripes.util.Log.debug(): Matched /admin/product/{$event}/{product.id} to /admin/product/{$event}/{product.id} INFO 2010-10-19 21:46:11,858 net.sourceforge.stripes.util.Log.info(): Expression validation will be performed using: net.sourceforge.stripes.validation.expression.Jsp20ExpressionExecutor DEBUG 2010-10-19 21:46:11,859 net.sourceforge.stripes.util.Log.debug(): Transitioning to lifecycle stage RequestInit DEBUG 2010-10-19 21:46:11,862 net.sourceforge.stripes.util.Log.debug(): Transitioning to lifecycle stage ActionBeanResolution DEBUG 2010-10-19 21:46:11,863 net.sourceforge.stripes.util.Log.debug(): Matched /admin/product/{$event}/{product.id} to /admin/product/{$event}/{product.id} DEBUG 2010-10-19 21:46:11,866 net.sourceforge.stripes.util.Log.debug(): Matched /admin/product/{$event}/{product.id} to /admin/product/{$event}/{product.id} DEBUG 2010-10-19 21:46:11,871 net.sourceforge.stripes.util.Log.debug(): Transitioning to lifecycle stage HandlerResolution DEBUG 2010-10-19 21:46:11,874 net.sourceforge.stripes.util.Log.debug(): Resolved event: edit; will invoke
Re: [Stripes-users] Stripes and Portlets
iframe/ ? :) Cheers Remi 2010/10/18 andres ispanand...@yahoo.es ... some bridge for portlets ... --- El *lun, 18/10/10, andres ispanand...@yahoo.es* escribió: De: andres ispanand...@yahoo.es Asunto: Re: [Stripes-users] Stripes and Portlets Para: Stripes Users List stripes-users@lists.sourceforge.net Fecha: lunes, 18 de octubre, 2010 16:19 I dont want to do restructure of Stripes. I am looking for some layer or interfas for implement work with Stripes. I have application on Stripes, and i am not good about portlets. --- El *lun, 18/10/10, Oscar Westra van Holthe - Kind os...@westravanholthe.nl* escribió: De: Oscar Westra van Holthe - Kind os...@westravanholthe.nl Asunto: Re: [Stripes-users] Stripes and Portlets Para: Stripes Users List stripes-users@lists.sourceforge.net Fecha: lunes, 18 de octubre, 2010 15:54 On 18-10-2010 at 15:28, Oscar Westra van Holthe - Kind wrote: To make Stripes work with portlets would require these steps: 1. Convert the StripesFilter to a portlet filter. 2. Convert the StripesDispatcher servlet to a portlet (it mainly handles the lifecycle and lets other classes to the work, so this should be doable). 3. In the dispatcher portlet, store the Resolution obtained from the event handling, so it can be used during the rendering phase. As an added bonus, you'll need to: - resolve redirects (impossible for portlets), - ensure that the Resolution instance can be infinitely reused, - be aware that rendering properties can and will be stored (and thus reused) by the portal server, making selecting the default handler trickier Oh, and Resolutions require a HttpServlet and HttpServletResponse, so you'll need to create versions that wrap the corresponding portlet classes -- all three pairs of them: - ActionRequest/ActionResponse - RenderRequest/RenderResponse - ResourceRequest/ResourceResponse To add complexity, you'll need to detect when a Resolution actually provides a page or another resource (download, AJAX response, ...). The reason is that pages are rendered, while all other Resolution results are handled similarly to a dymanic image using a ResourceServingPortlet. You'll also need to provide a different tag to generate such resource URL's. All in all, I think it's easier to reuse Stripes' strengths such as the validators, population strategy, etc. and create a new lifecycle plus PortletBean and Resolution interfaces for it. Oscar -- ,-_ /() ) Oscar Westra van Holthe - Kind http://www.xs4all.nl/~kindop/http://www.xs4all.nl/%7Ekindop/ (__ ( =/ () A half truth is a whole lie. -- Yiddish Proverb -Adjunto en línea a continuación- -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev -Adjunto en línea a continuación- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -Adjunto en línea a continuación- -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev -Adjunto en línea a continuación- ___ Stripes-users mailing list Stripes-users@lists.sourceforge.nethttp://mc/compose?to=stripes-us...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev___ Stripes-users
Re: [Stripes-users] Stripes and Portlets
Portlets ? Seriously ? Seriously... :P I was joking with the iframe thing, even if it might be a simple option to include some external content in a portlet, I don't know. The other option (the Stripes rewrite) is even more hackish to me ! Anyway, iframes are everywhere. Crappy but damn useful if you ask me :P Even Google has one on the front page... Cheers Remi 2010/10/18 Oscar Westra van Holthe - Kind os...@westravanholthe.nl On 18-10-2010 at 16:40, Grzegorz Krugły wrote: iframe is the worst solution one could think of ;-) It's not even proper HTML 4. For some, the same thing can be said about portlets. And certainly the first portlet specification (JSR 168) qualifies, as it doesn't support portlet specific non-inline CSS, dynamic images, file downloads, etc. (you'd need to setup a separate servlet, which defeats the point of a portlet). It's not until the second specification (JSR 286) that portlets can be considered seriously, IMNSHO. Oscar -- ,-_ /() ) Oscar Westra van Holthe - Kind http://www.xs4all.nl/~kindop/http://www.xs4all.nl/%7Ekindop/ (__ ( =/ () A half truth is a whole lie. -- Yiddish Proverb -BEGIN PGP SIGNATURE- iEYEARECAAYFAky8XoMACgkQLDKOJAl7tOK8zgCfSFhdeSxgpApAY4uqxaAw22ow QrMAn3qiekOoSIPT0bWmVvp9OakwyF8S =ZtzZ -END PGP SIGNATURE- -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev ___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users
[Stripes-users] [OT] Rick A (was Re: Stripes and Portlets)
Hu hu didn't know that was him... Love the hair :) http://www.dailymotion.com/video/x1b7yk_rick-astley-together-forever_music Cheers Remi 2010/10/18 Grzegorz Krugły grzeg...@krugly.pl W dniu 18.10.2010 16:53, VANKEISBELCK Remi pisze: Anyway, iframes are everywhere. Crappy but damn useful if you ask me :P So is Rick Astley ;-) -- Download new Adobe(R) Flash(R) Builder(TM) 4 The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly Flex(R) Builder(TM)) enable the development of rich applications that run across multiple browsers and platforms. Download your free trials today! http://p.sf.net/sfu/adobe-dev2dev___ Stripes-users mailing list Stripes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/stripes-users