I'm actually quite interested in this as well.
In theory, for a "static" resource (for lack of a better term), you have the
JRun servlet engine interpreting the request, opening the file, and pumping
the contents through the socket to the web server, which then pumps the data
down to the web browser.
Now, this isn't particularly CPU expensive. The Java code is pretty simple,
and can be quite tight. The detail is that essentially you're paying twice
the price to move the data down to the client in terms of socket I/O.
One way around it is for the JRun servlet client to communicate the
translated path to the reource back to the web server, and let the web
server ship it directly. They may, in fact, be doing this.
But, it would certainly be nice that if they WERE doing this, they could
expose the interface (I know, it's an extension to the Servlet API), because
I'm sure a lot of folks have servlet routines that do little more than
figure out which file to send back to the user. I suppose that the
"supported" way of doing that is to send a redirect to the client, but I
wish there was a way to direct the web server to serve a file. Sort of an
internal redirect than the user never sees.
An ideal method would be for the servlet to be able to set up the request
headers, and then let the server push the file out. Perhaps letting the
servlet decide the MIME type of the file versus letting the server.
Sorry, I'm rambling.
Will Hartung
([EMAIL PROTECTED])
> From: Cristian Satnic [mailto:[EMAIL PROTECTED]]
> Sent: Saturday, November 04, 2000 9:28 AM
> To: JRun-Talk
> Subject: Serving non-jsp resources through JRun 3
>
> I have a question here. I am trying to figure out what impact non-jsp
> resources (image files, .css files, .js files and .html files) have on
> performance if they are served from JRun controlled directories for an app
> as opposed to moving them to a web-server-only directory.
------------------------------------------------------------------------------
Archives: http://www.egroups.com/group/jrun-interest/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/jrun_talk
or send a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.