Chris , I think maybe I am not explain clearly.
My problem is that in one page called a.html for example , there has a
button called "export" that I can export the page information to excel
, I did get the excel information but  was in the same page(a.html) ,
I wish the result file can popup a new page instead of directly
overwrite the currently page.

Is it possible to do that?
Also in IRequestCycle is it possible to popup a page? As far as I know
IRequestCycle.active() will only direct to other page.

On 2/7/06, Chris Chiappone <[EMAIL PROTECTED]> wrote:
> Couldn't you just do something like target="_blank" in your html?
>
> On 2/7/06, Vincent <[EMAIL PROTECTED]> wrote:
> > Hi ,
> >
> > Now I can open the excel file by ie , but I found it will not pop-up a
> > new page to display the result(actually it use the currently page , so
> > the previous information on the page was lost), am I missing
> > something?
> >
> > <code>
> >        response.setHeader("Expires", "0");
> >                        response.setHeader("Cache-Control", "must-revalidate,
> > post-check=0,pre-check=0");
> >                        response.setHeader("Pragma", "public");
> >                        response.setHeader("Content-disposition", "inline;
> > filename=ExportTempFile.xls");
> >                        // setting the content type
> >                        response.setContentType("application/vnd.ms-excel");
> >                        ServletOutputStream out = response.getOutputStream();
> >
> >                        byte[] buffer = new byte[BUFFER_SIZE];
> >                        ByteArrayOutputStream baos = new 
> > ByteArrayOutputStream();
> >                        int length = inputStream.read(buffer);
> >                        while(length != -1) {
> >                                baos.write(buffer);
> >                                length = inputStream.read(buffer);
> >                        }
> >
> >                        baos.writeTo(out);
> >                        baos.close();
> >                        out.close();
> > </code>
> >
> > in web.xml
> > add the following
> >        <mime-mapping>
> >                <extension>xls</extension>
> >                <mime-type>application/msexcel</mime-type>
> >        </mime-mapping>
> >
>
>
> --
> ~chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to