-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Guilherme,
Guilherme Orioli wrote:
| Yes, it's an EJB managed by the JSF config faces-config.xml . Should I
use a
| different servlet to get the result wanted?
The problem is that you are using an EJB to manipulate the HTTP request
and response.
Didn't get it... it just doesn't work... what do I need to use instead of
the response.redirect ?
2008/4/2, Alan Chaney [EMAIL PROTECTED]:
You don't need the redirect. The response to the request IS the pdf file.
HTH
Guilherme Orioli wrote:
It just doesn't show the Download dialog on
.
Hi Guilherme
I can see that English isn't your first language and I have a lot of
respect for anyone who is trying to work on technical things in a
foreign language - I could never do it!
To help our communication I have tried to explain below what I think it
is that you are trying to
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Guilherme,
Guilherme Orioli wrote:
| Didn't get it... it just doesn't work... what do I need to use instead of
| the response.redirect ?
These good folks are telling you to do something differently than you
are currently doing it.
Right now you
Chris
Very nicely put. The only thing that I'm not clear on is your comment
about sending the data as a String. The OP is trying to return a pdf
file, which is a byte stream. I'd worry about trying to wrap that in a
String because of encoding issues.
You make a good point about two
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Alan,
Alan Chaney wrote:
| Very nicely put. The only thing that I'm not clear on is your comment
| about sending the data as a String. The OP is trying to return a pdf
| file, which is a byte stream. I'd worry about trying to wrap that in a
| String
Christopher,
You got it right. I was trying to generate the content, write it into server
disk and redirect it to the user.
Everyone recomended me to generate it and send it as a response.
If that's the only option, I can accept that. If there's a way to refresh
the content under tomcat server
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Guilherme,
Guilherme Orioli wrote:
| Everyone recommended me to generate it and send it as a response.
| If that's the only option, I can accept that. If there's a way to refresh
| the content under tomcat server folder, it would be better.
Typically when you're generating dynamic content like that, you don't
serve it in the same way as a file on the file system does. Instead you
usually serve it from memory, or from a database if you had need to store
it somewhere.
If you deploy within an EAR you'll find that writing to the file
Ok... I've made some research on that too... I'm actually generating a
report (.pdf file) with jasper, and it already enables me to export it to an
outputstrem, as in this code:
memoryPDF = new FileOutputStream(test);
this.bytes =
From: Guilherme Orioli [mailto:[EMAIL PROTECTED]
Subject: Re: How can I refresh tomcat in the java code?
memoryPDF = new FileOutputStream(test);
Don't create a FileOutputStream, use ServletResponse.getOutputStream()
instead. Make sure you set the content type to application/pdf, of
course
=search
Java Web Parts - javawebparts.sourceforge.net
Supplying the wheel, so you don't have to reinvent it!
My look ma, I have a blog too! blog: zammetti.com/blog
On Wed, April 2, 2008 1:24 pm, Caldarale, Charles R wrote:
From: Guilherme Orioli [mailto:[EMAIL PROTECTED]
Subject: Re: How can I
From: Frank W. Zammetti [mailto:[EMAIL PROTECTED]
Subject: RE: How can I refresh tomcat in the java code?
FYI, serving PDFs in particular can be a bloody mess because
of Acrobat STILL not being able to get their s**t together
when it comes to their browser plug-in.
I finally gave up
ok... here's what i'm doing... in system out, something like a pdf file is
printed... itś probably there... just don't know how to show it from the
button i'm clicking on:
public String geraReportBois(){
try{
//Generating the report
String caminho_arquivo = new File().getAbsolutePath() +
It just doesn't show the Download dialog on the screen when i click the
button...
2008/4/2, Guilherme Orioli [EMAIL PROTECTED]:
ok... here's what i'm doing... in system out, something like a pdf file is
printed... itś probably there... just don't know how to show it from the
button i'm
You don't need the redirect. The response to the request IS the pdf file.
HTH
Guilherme Orioli wrote:
It just doesn't show the Download dialog on the screen when i click the
button...
2008/4/2, Guilherme Orioli [EMAIL PROTECTED]:
ok... here's what i'm doing... in system out, something like
16 matches
Mail list logo