Title: SV: Including Actions via jsp:include
hi,
your typical flow is something like,
u click on a link which invokes a new window which inturn invokes some action class, which fetches the file may be from a file system or BLOB field of database, and then u dont forward it anywhere... !!!
and ur last part of action class will look like this...
 
 response.setContentType("application/pdf");
 javax.servlet.ServletOutputStream out = response.getOutputStream();
 out.write(data);    // where data is byte[] containing ur filedata
 out.flush();
 out.close();
 return null;
 

i hope it helps..
 
-satyen
-----Original Message-----
From: Mikkel Bruun [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 03, 2001 11:39 AM
To: '[EMAIL PROTECTED]'
Subject: SV: problem in showing PDF, Doc, xls etc

you have to use a servlet for this...print to the servletOutPutStream....
 
Jsp's cant display binary files....
 

::
  Mikkel Bruun
  Senior IT Developer
  [EMAIL PROTECTED]
  Direct: +45 32 88 22 73

  Valtech A/S
  Kanonbaadsvej 10
  DK-1437 Copenhagen
  Tel  +45 32 88 20 00
  Fax +45 32 88 20 20

-----Oprindelig meddelelse-----
Fra: Anwar Sadat [mailto:[EMAIL PROTECTED]]
Sendt: 03 September 2001 12:28
Til: '[EMAIL PROTECTED]'
Emne: problem in showing PDF, Doc, xls etc

Hi,
   I have one jsp which shows some links.. This link contains the filename (HTML file).
If i click on this link, i will execute one more jsp. This jsp has some methods which will get the file and show the content.
 
This works fine if i have only html files to be shown..  If i have other document types (like pdf, doc, xls etc), how can i show these things on the browser thro my second JSP....
 
Thanx in Advance
Regards
Anwar


--------------------------------------------------------------------------------------------
The information in this Internet email is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this Internet
email by anyone else is unauthorised.

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this Internet email are subject to the terms and conditions
expressed in any applicable governing ING Barings' terms of business or
client engagement letter.

Visit us at www.ingbarings.com
--------------------------------------------------------------------------------------------

Reply via email to