[Stripes-users] Writing to response.writer is not working

2016-01-23 Thread 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&iu=/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

2016-01-25 Thread Ron King
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 
> Subject: Re: [Stripes-users] Writing to response.writer is not working
> To: r...@rvkb.com, Stripes Users List
> 
> Message-ID: 
> 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  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 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 wha

Re: [Stripes-users] Flushing a writer before the ActionBean has completed

2016-01-26 Thread Ron King
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 
> Subject: Re: [Stripes-users] Stripes-users Digest, Vol 113, Issue 4
> To: Stripes Users List 
> Message-ID:
>  kuwkyvpng2sp4kr_qk...@mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> 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 :
>
> > 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 
> >> Subject: Re: [Stripes-users] Writing to response.writer is not working
> >> To: r...@rvkb.com, Stripes Users List
> >> 
> >> Message-I

[Stripes-users] Using an executor with Stripes, on Tomcat 8

2016-01-26 Thread Ron King
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 
> 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 
> > Subject: Re: [Stripes-users] Stripes-users Digest, Vol 113, Issue 4
> > To: Stripes Users List 
> > Message-ID:
> >  > kuwkyvpng2sp4kr_qk...@mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > 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 :
> >
> > > 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 for

[Stripes-users] making a wizard page

2017-10-05 Thread Ron King
Hi Stripes users!

I'm not able to setup a wizard that can navigate backwards when there's a
validation error
on the current page. I read the information about it, and I tried a
@DontNavigate annotation
on the method of the actionbean, but it still tries to validate. Can anyone
tell me how to do it?
I'd like a solution that allows going backwards with validation errors, AND
retaining the information on the previous page.

https://stripesframework.atlassian.net/wiki/spaces/
STRIPES/pages/492018/Wizard+Forms

Backward Navigation Issues

Backward navigation still presents a couple of problems. The
automatic-wizard system that Stripes uses assumes that when a submission is
made that either all the data on the page is valid, or the user will be
shown error messages. Sometimes it may be desirable to allow the user to
navigate back in the wizard without forcing validation of the information
on the current page.
This is a limitation of the current system.

You have three choices, neither of them ideal:
Use JavaScript to perform backward navigation. The downside to this is that
by not submitting any data to the server, the user's entries on the current
page (if any) are lost.
Force the user to provide valid entries before performing backward
navigation
Don't use Stripes' built in required field valiation, but validate fields
yourself based on what page is submitted

-- 
Fear is a reaction, courage a decision - Winston Churchill
--
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] Stripes Today

2018-10-12 Thread Ron King
I work on an active Stripes-based business application that serves
thousands of users monthly.

On Fri, Oct 12, 2018 at 8:19 AM Janne Jalkanen 
wrote:

>
> I have a fairly large production installation running on Stripes serving
> ~billion API calls/month, so it’s very much in active use. Works great! :-)
>
> May you have energy and success!
> /Janne
>
>
>
> On 12 Oct 2018, at 15:56, DJDaveMark via Stripes-users <
> stripes-users@lists.sourceforge.net> wrote:
>
> Hi,
>
> Just wondered how many people on this list still work with projects using
> Stripes?
>
> I only ever managed to convince 2 project managers to use Stripes (both
> with Spring/Hibernate), and I had a brief encounter with JAX-RS. Lately
> I've mostly been on projects using Node (Express/Sequelize).
>
> Cheers,
> Dave
> .
> ___
> 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
>


-- 
Fear is a reaction, courage a decision - Winston Churchill
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] Stripes Today

2018-10-12 Thread Ron King
Isn't this framework built on top of Stripes?
https://portofino.manydesigns.com/en

On Fri, Oct 12, 2018 at 8:32 AM DJDaveMark via Stripes-users <
stripes-users@lists.sourceforge.net> wrote:

> Lucky man. What are you using client-side?
> Do you have any Single-Page-Applications communicating via a REST API with
> Stripes returning JSON ?
>
> Cheers,
> DaveMark
> .
>
>
> On Friday, 12 October 2018, 15:09:56 CEST, 
> wrote:
>
>
> Still using stripes extensively. Existing products.
>
>
>
> On Fri, Oct 12, 2018 at 8:56 AM -0400, "DJDaveMark via Stripes-users" <
> stripes-users@lists.sourceforge.net> wrote:
>
> Hi,
>
> Just wondered how many people on this list still work with projects using
> Stripes?
>
> I only ever managed to convince 2 project managers to use Stripes (both
> with Spring/Hibernate), and I had a brief encounter with JAX-RS. Lately
> I've mostly been on projects using Node (Express/Sequelize).
>
> Cheers,
> Dave
> .
> ___
> Stripes-users mailing list
> Stripes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/stripes-users
>


-- 
Fear is a reaction, courage a decision - Winston Churchill
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


[Stripes-users] multi-page forms ?

2018-10-13 Thread Ron King
In the Portofino docs, the term 'wizard' is used to describe generating a
web app from a database. Can Portofino generate a 'wizard form', a
multi-page, multi-step form?

-- 
Fear is a reaction, courage a decision - Winston Churchill
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users


Re: [Stripes-users] multi-page forms ?

2018-10-13 Thread Ron King
I've implemented wizard forms in stand-alone stripes using this link:
https://stripesframework.atlassian.net/wiki/spaces/STRIPES/pages/492018/Wizard+Forms

I'm not familiar enough with Portofino to know, but maybe I can adapt that
methodology. Thanks!

On Sat, Oct 13, 2018 at 2:28 PM Alessio Stalla 
wrote:

> Hi Ron,
> I'm CC'ing the Portofino mailing list for this.
> While Portofino does not *generate* wizard-style pages automatically, it
> provides the infrastructure to write them yourself. In particular it lets
> you write Stripes actions in Groovy and it provides a form abstraction
> called Elements to write a form as HTML, read values from the request,
> validate them, write them to a Map or an object. It also provides Map-based
> persistence using Hibernate.
> We've rarely if ever written wizard-style pages, but the pieces are there,
> I'd say.
>
> Alessio (Portofino developer)
>
> PS thanks for your interest in the framework, tool or whatever you want to
> call it :)
>
> On Sat, Oct 13, 2018, 17:19 Ron King  wrote:
>
>> In the Portofino docs, the term 'wizard' is used to describe generating a
>> web app from a database. Can Portofino generate a 'wizard form', a
>> multi-page, multi-step form?
>>
>> --
>> Fear is a reaction, courage a decision - Winston Churchill
>> ___
>> 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
>


-- 
Fear is a reaction, courage a decision - Winston Churchill
___
Stripes-users mailing list
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users