You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Madhav Bhargava <un...@gmail.com> on 2006/03/08 13:51:39 UTC

File download

Hi All,

I have a JSP where if a link is clicked then a Save As dialog box is
invoked. If the user chooses to save the file, then on the successful
completion of the file download i need to update a status in the database.
After the status is updated the page from which the Save As dialog box was
invoked has to be refreshed with the new status.

When i invoke a dialog box i use ServletOutputStream and context-disposition
to bring up the dialog box. At the end when i write to the servlet output
stream the response is commited. This means that i will not be able to
automatically refresh the page from which the dialog box was invoked.

Please help me with a solution where in i can capture the status of the
download and make a call to the action to referesh the JSP and the database
with the download status.

--madhav

--
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do

Re: File download

Posted by P Y <py...@gmail.com>.
204 or 304 ?
http://www.w3.org/Protocols/rfc2616/rfc2616-sec6.html#sec6.1.1


On 3/9/06, Madhav Bhargava <un...@gmail.com> wrote:
> did not find anything that would be of help.
>
> On 3/8/06, Madhav Bhargava <un...@gmail.com> wrote:
> >
> >  Hmm... let me check that out. Will get back to you if this does not work.
> > The purpose however is to know when the download is complete and to
> > refresh a JSP.
> >
> > --Madhav
> >
> >  On 3/8/06, David Delbecq <de...@oma.be> wrote:
> > >
> > > If i remember well there are special http header that can be used to
> > > tell client the response is split in several part. This is mainly used
> > > when you send a partial response to client (like a html with table
> > > containing 3 rows) and after process advanced you send a more complete
> > > response (like the same html but with table containing 10 rows) and so
> > > on. You could try a 'file then redirect'  construction.  That may be
> > > worth investigations. See HTTP rfc for informations.
> > >
> > > Madhav Bhargava a écrit :
> > >
> > > >Hi All,
> > > >
> > > >I have a JSP where if a link is clicked then a Save As dialog box is
> > > >invoked. If the user chooses to save the file, then on the successful
> > > >completion of the file download i need to update a status in the
> > > database.
> > > >After the status is updated the page from which the Save As dialog box
> > > was
> > > >invoked has to be refreshed with the new status.
> > > >
> > > >When i invoke a dialog box i use ServletOutputStream and
> > > context-disposition
> > > >to bring up the dialog box. At the end when i write to the servlet
> > > output
> > > >stream the response is commited. This means that i will not be able to
> > > >automatically refresh the page from which the dialog box was invoked.
> > > >
> > > >Please help me with a solution where in i can capture the status of the
> > >
> > > >download and make a call to the action to referesh the JSP and the
> > > database
> > > >with the download status.
> > > >
> > > >--madhav
> > > >
> > > >--
> > > >When I tell the truth, it is not for the sake of convincing those who
> > > do not
> > > >know it, but for the sake of defending those that do
> > > >
> > > >
> > > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> >
> >
> > --
> >
> > When I tell the truth, it is not for the sake of convincing those who do
> > not know it, but for the sake of defending those that do
> >
>
>
>
> --
> When I tell the truth, it is not for the sake of convincing those who do not
> know it, but for the sake of defending those that do
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: File download

Posted by Madhav Bhargava <un...@gmail.com>.
did not find anything that would be of help.

On 3/8/06, Madhav Bhargava <un...@gmail.com> wrote:
>
>  Hmm... let me check that out. Will get back to you if this does not work.
> The purpose however is to know when the download is complete and to
> refresh a JSP.
>
> --Madhav
>
>  On 3/8/06, David Delbecq <de...@oma.be> wrote:
> >
> > If i remember well there are special http header that can be used to
> > tell client the response is split in several part. This is mainly used
> > when you send a partial response to client (like a html with table
> > containing 3 rows) and after process advanced you send a more complete
> > response (like the same html but with table containing 10 rows) and so
> > on. You could try a 'file then redirect'  construction.  That may be
> > worth investigations. See HTTP rfc for informations.
> >
> > Madhav Bhargava a écrit :
> >
> > >Hi All,
> > >
> > >I have a JSP where if a link is clicked then a Save As dialog box is
> > >invoked. If the user chooses to save the file, then on the successful
> > >completion of the file download i need to update a status in the
> > database.
> > >After the status is updated the page from which the Save As dialog box
> > was
> > >invoked has to be refreshed with the new status.
> > >
> > >When i invoke a dialog box i use ServletOutputStream and
> > context-disposition
> > >to bring up the dialog box. At the end when i write to the servlet
> > output
> > >stream the response is commited. This means that i will not be able to
> > >automatically refresh the page from which the dialog box was invoked.
> > >
> > >Please help me with a solution where in i can capture the status of the
> >
> > >download and make a call to the action to referesh the JSP and the
> > database
> > >with the download status.
> > >
> > >--madhav
> > >
> > >--
> > >When I tell the truth, it is not for the sake of convincing those who
> > do not
> > >know it, but for the sake of defending those that do
> > >
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
>
> When I tell the truth, it is not for the sake of convincing those who do
> not know it, but for the sake of defending those that do
>



--
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do

Re: File download

Posted by Madhav Bhargava <un...@gmail.com>.
Hmm... let me check that out. Will get back to you if this does not work.
The purpose however is to know when the download is complete and to refresh
a JSP.

--Madhav

On 3/8/06, David Delbecq <de...@oma.be> wrote:
>
> If i remember well there are special http header that can be used to
> tell client the response is split in several part. This is mainly used
> when you send a partial response to client (like a html with table
> containing 3 rows) and after process advanced you send a more complete
> response (like the same html but with table containing 10 rows) and so
> on. You could try a 'file then redirect'  construction.  That may be
> worth investigations. See HTTP rfc for informations.
>
> Madhav Bhargava a écrit :
>
> >Hi All,
> >
> >I have a JSP where if a link is clicked then a Save As dialog box is
> >invoked. If the user chooses to save the file, then on the successful
> >completion of the file download i need to update a status in the
> database.
> >After the status is updated the page from which the Save As dialog box
> was
> >invoked has to be refreshed with the new status.
> >
> >When i invoke a dialog box i use ServletOutputStream and
> context-disposition
> >to bring up the dialog box. At the end when i write to the servlet output
> >stream the response is commited. This means that i will not be able to
> >automatically refresh the page from which the dialog box was invoked.
> >
> >Please help me with a solution where in i can capture the status of the
> >download and make a call to the action to referesh the JSP and the
> database
> >with the download status.
> >
> >--madhav
> >
> >--
> >When I tell the truth, it is not for the sake of convincing those who do
> not
> >know it, but for the sake of defending those that do
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
When I tell the truth, it is not for the sake of convincing those who do not
know it, but for the sake of defending those that do

Re: File download

Posted by David Delbecq <de...@oma.be>.
If i remember well there are special http header that can be used to
tell client the response is split in several part. This is mainly used
when you send a partial response to client (like a html with table
containing 3 rows) and after process advanced you send a more complete
response (like the same html but with table containing 10 rows) and so
on. You could try a 'file then redirect'  construction.  That may be
worth investigations. See HTTP rfc for informations.

Madhav Bhargava a écrit :

>Hi All,
>
>I have a JSP where if a link is clicked then a Save As dialog box is
>invoked. If the user chooses to save the file, then on the successful
>completion of the file download i need to update a status in the database.
>After the status is updated the page from which the Save As dialog box was
>invoked has to be refreshed with the new status.
>
>When i invoke a dialog box i use ServletOutputStream and context-disposition
>to bring up the dialog box. At the end when i write to the servlet output
>stream the response is commited. This means that i will not be able to
>automatically refresh the page from which the dialog box was invoked.
>
>Please help me with a solution where in i can capture the status of the
>download and make a call to the action to referesh the JSP and the database
>with the download status.
>
>--madhav
>
>--
>When I tell the truth, it is not for the sake of convincing those who do not
>know it, but for the sake of defending those that do
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org