RE: Image rendering components

2002-10-10 Thread Mohan Radhakrishnan

Hi,
  Actually if it just contained the 'src' tag it would tie the
presentation tier to the graph engine. Am I right ? If we use DTO's and the
report images are dynamically generated then we are thinking of passing them
from tier to tier ? What if the graph engine were in a machine different
than that of the presentation tier ? Any ideas ?
bye,
Mohan

-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 11:25 AM
To: Struts Users Mailing List
Subject: RE: Image rendering components


Hang on - you say " I have a StringBuffer of HTML that includes a generated
image." - you dont mean that some is html text, and then theres a huge chunk
of graphics data all in the same stringbuffer? - Surely the stringbuffer
only contains the URL of the image as an attribute in an img tag right?

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 13:31
To: 'Struts Users Mailing List'
Subject: RE: Image rendering components


Hi,
  Could it be done with the help of tag libraries? My tag libraries
don't connect with the database directly. So I use DTO's. They contain the
image and data for reports. Isn't there a way to pass my Stringbuffer to a
tag directly?
bye,
Mohan


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Image rendering components

2002-10-10 Thread Andrew Hill

Hang on - you say " I have a StringBuffer of HTML that includes a generated
image." - you dont mean that some is html text, and then theres a huge chunk
of graphics data all in the same stringbuffer? - Surely the stringbuffer
only contains the URL of the image as an attribute in an img tag right?

-Original Message-
From: Mohan Radhakrishnan [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 11, 2002 13:31
To: 'Struts Users Mailing List'
Subject: RE: Image rendering components


Hi,
  Could it be done with the help of tag libraries? My tag libraries
don't connect with the database directly. So I use DTO's. They contain the
image and data for reports. Isn't there a way to pass my Stringbuffer to a
tag directly?
bye,
Mohan

-Original Message-
From: Jin Bal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 6:07 PM
To: Struts Users Mailing List
Subject: Re: Image rendering components


Your action could write the html from your DTO directly to the response,
without the need to forward to a JSP.

this would go along the lines of:

  inStream = docLib.getDataStream();
  ByteArrayOutputStream out =new ByteArrayOutputStream();
byte[] buf = new byte[4096];
  int i = -1;
  while ((i = inStream.read(buf))!=-1){
   out.write(buf,0,i);
  }
  response.setContentType(docLib.getContentType());
response.setIntHeader("Content-length",docLib.getSize().intValue());

response.setHeader("Content-disposition","attachment;filename="+docLib.getFi
lename());
 ServletOutputStream sout = response.getOutputStream();
  out.writeTo(sout);
  out.flush();
out.close();
return null;


or something similar where you'd be writing the bytes of html string out.

HTH

Jin

- Original Message -
From: "Mohan Radhakrishnan" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 12:45 PM
Subject: Image rendering components


> Hi,
> I have a StringBuffer of HTML that includes a generated image. My
> DTO carries it to the presentation tier. How is usually included in the
JSP
> stream ? Tags ?
> bye,
> Mohan
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: Image rendering components

2002-10-10 Thread Mohan Radhakrishnan

Hi,
  Could it be done with the help of tag libraries? My tag libraries
don't connect with the database directly. So I use DTO's. They contain the
image and data for reports. Isn't there a way to pass my Stringbuffer to a
tag directly?
bye,
Mohan

-Original Message-
From: Jin Bal [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 10, 2002 6:07 PM
To: Struts Users Mailing List
Subject: Re: Image rendering components


Your action could write the html from your DTO directly to the response,
without the need to forward to a JSP.

this would go along the lines of:

  inStream = docLib.getDataStream();
  ByteArrayOutputStream out =new ByteArrayOutputStream();
byte[] buf = new byte[4096];
  int i = -1;
  while ((i = inStream.read(buf))!=-1){
   out.write(buf,0,i);
  }
  response.setContentType(docLib.getContentType());
response.setIntHeader("Content-length",docLib.getSize().intValue());

response.setHeader("Content-disposition","attachment;filename="+docLib.getFi
lename());
 ServletOutputStream sout = response.getOutputStream();
  out.writeTo(sout);
  out.flush();
out.close();
return null;


or something similar where you'd be writing the bytes of html string out.

HTH

Jin

- Original Message -
From: "Mohan Radhakrishnan" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 12:45 PM
Subject: Image rendering components


> Hi,
> I have a StringBuffer of HTML that includes a generated image. My
> DTO carries it to the presentation tier. How is usually included in the
JSP
> stream ? Tags ?
> bye,
> Mohan
>
>
> --
> To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: Image rendering components

2002-10-10 Thread Jin Bal

Your action could write the html from your DTO directly to the response,
without the need to forward to a JSP.

this would go along the lines of:

  inStream = docLib.getDataStream();
  ByteArrayOutputStream out =new ByteArrayOutputStream();
byte[] buf = new byte[4096];
  int i = -1;
  while ((i = inStream.read(buf))!=-1){
   out.write(buf,0,i);
  }
  response.setContentType(docLib.getContentType());
response.setIntHeader("Content-length",docLib.getSize().intValue());

response.setHeader("Content-disposition","attachment;filename="+docLib.getFi
lename());
 ServletOutputStream sout = response.getOutputStream();
  out.writeTo(sout);
  out.flush();
out.close();
return null;


or something similar where you'd be writing the bytes of html string out.

HTH

Jin

- Original Message -
From: "Mohan Radhakrishnan" <[EMAIL PROTECTED]>
To: "'Struts Users Mailing List'" <[EMAIL PROTECTED]>
Sent: Thursday, October 10, 2002 12:45 PM
Subject: Image rendering components


> Hi,
> I have a StringBuffer of HTML that includes a generated image. My
> DTO carries it to the presentation tier. How is usually included in the
JSP
> stream ? Tags ?
> bye,
> Mohan
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>

--
To unsubscribe, e-mail:   
For additional commands, e-mail: