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