Re: How can I refresh tomcat in the java code?

2008-04-04 Thread Christopher Schultz
-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. You

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Guilherme Orioli
Christopher, Ok, || This code is located on a managed bean. The method is invoked when a || h:commandButton is pressed. That's why I return a String. |Ugh. Do you mean EJB? Yes, it's an EJB managed by the JSF config faces-config.xml . Should I use a different servlet to get the result wanted? I

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Christopher Schultz
-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. There's

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Guilherme Orioli
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 fo

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Christopher Schultz
-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

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Alan Chaney
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 simultan

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Christopher Schultz
-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 are

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Alan Chaney
. 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 do.

Re: How can I refresh tomcat in the java code?

2008-04-03 Thread Guilherme Orioli
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 d

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Alan Chaney
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

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
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 c

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
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() + "/work

RE: How can I refresh tomcat in the java code?

2008-04-02 Thread Caldarale, Charles R
> 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-i

RE: How can I refresh tomcat in the java code?

2008-04-02 Thread Frank W. Zammetti
m: 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 s

RE: How can I refresh tomcat in the java code?

2008-04-02 Thread Caldarale, Charles R
> 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

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
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 = JasperRunManager.runReportToPdf(jasperReport,parameters,this.getR

Re: How can I refresh tomcat in the java code?

2008-04-02 Thread Frank W. Zammetti
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 sy

How can I refresh tomcat in the java code?

2008-04-02 Thread Guilherme Orioli
I'm developing a system that will generate a file dynamically, and i want to make it possible to be downloaded from server after it's created. The problem is that when i link the file, the response i get is that it doesn't exist. After a few tests we've figured out that if the file existed previou