tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: How can I refresh tomcat in the java code?
Date Thu, 03 Apr 2008 14:17:03 GMT
Hash: SHA1


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 because of encoding issues.

He's returning a String from the (Java) method, not the HTTP request.

| You make a good point about two simultaneous requests breaking the app.
| The other issue is of course that Jasper isn't necessarily that quick at
| creating a report and the report generation is in line with the servlet
| request and response.

Right. This will certainly work, but probably not well. This is why
projects like Open Reports offer scheduling and batching so that you
aren't tied to the request/response HTTP model. When you do things
asynchronously, you can do them when the load on the server is low, or,
better still, do it on another server that isn't handling loads of user

| Another tweak is to cache the generated reports if they are unlikely to
| change frequently etc etc...

I think this was the OP's original desire, but everyone pushed him
towards generating content directly to the servlet output stream.
Unfortunately, Tomcat seems to take a snapshot of the content it serves
as the webapp comes up, and it doesn't believe that new content can be
added during the life of the webapp. That was the original question (see
the subject line): how can I tell Tomcat to refresh its content snapshot?

- -chris
Version: GnuPG v1.4.8 (MingW32)
Comment: Using GnuPG with Mozilla -


To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message