I have a
Java Class, which has a Java Script function which makes an HTML form and then submits it to an action URL. I want to ensure that the URL always open on the top of my calling window. As of now, some times it is displaying behind the calling page.
I am using internet Explorer IE 7.0
The Code is as follows Class 1:
********************************************************
The URL "strServerURL" is a
Servlet: and it reders out a PDF Document to the User, which is displayed within the IE
The Following servlet is called, after the above class is executed.
Servlet 2:
*************************************************************************
ServletOutputStream outStream=response.getOutputStream();
FileInputStream inStream = new FileInputStream(pdf);
BufferedInputStream inBuf = new BufferedInputStream(inStream);
/*Send output file to Client*/
/*Display PDF in the browser*/
response.setContentType("application/pdf");
response.setHeader("content-disposition","inline; filename=output.pdf");
/*Display PDF in Acrobat/Reader */
response.setContentLength((int)pdf.length());
int readByte=0;
while((readByte=inBuf.read())!=-1){
outStream.write(readByte);
}
//Cleanup temporary files
inStream.close();
outStream.close();
*******************************************************
What should I do to make sure that PDF is always displayed in front of the calling screen and not behind.