-----------------------------
Please read the FAQ!
<http://java.apache.org/faq/>
-----------------------------
djohnson wrote:
> -----------------------------
> Please read the FAQ!
> <http://java.apache.org/faq/>
> -----------------------------
>
> Hi all,
> We have written a Java servlet which reads specific tags from
> a HTML (We call it VHTML) file and replaces them with HTML code
> built using details extracted from an Oracle database.
> We have also written the same pages using JSP (0.91 for GNUJSP)
> and are able to display the completed page using both formats.
> Using a browser we appear to get a better response from the JSP
> than the VHTML pages.
Are you doing the tag replacement parsing each time that the page is
requested? If so, this is not at all surprising, because most
JSP implementations generate (and compile) a Java servlet to create the
page. The servlet just dumps the template text out of an array, and
sticks in the variable parts where you originally had your tags, so it
does not have to parse anything.
>
> We have also written an applet which will start a number of
> threads which each open a connection to the servlet and request
> the HTML generated, then logs the time takem to open a stream to
> the servlet, the time to read the HTML and the total time.
> The problem is that when we look at the pages from a browser the
> JSP appears much quicker than the VHTML, but when tested through
> the applet the time required to download the page is comparable
> but the time to open the stream goes from 8 miliseconds for the
> VHTML page to 36 seconds for the JSP page.
> This tends to suggest that the configuration of the GNUJSP is
> the cause.
>
A couple of things to check:
* Does the GNUJSP-generated servlet include a flush() or close() of the
output stream at the end? If not, there might be a timeout getting
added
somewhere along the path.
* How much of the variability is caused by the fact that you're running
a Java-based multithreaded client (the applet) versus a browser
download which is presumably written in C or C++?
* It might be interesting to try this test with Apache JMeter, which is
a
stand-alone Java application that does the same kind of metering and
testing. Doing so will remove possible network issues in the
browser's
JVM from the mix of possible causes for this behavior.
But, at the end of the day, isn't it really the performance when
accessed by a browser that counts?
Craig McClanahan
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://java.apache.org/main/mail.html>
Problems?: [EMAIL PROTECTED]