tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Huber" <peter.hu...@gauss-interprise.com>
Subject String usage in JSP-compiled Servlets?
Date Fri, 15 Dec 2000 11:01:13 GMT
Hi you all,

I'm new to the list maybe this stuff has been discussed several times.
If so I'm sorry to waist your time!

My point: 
tomcat 3.2 compiles a JSP into a servlet which contains out.write()
calls which have ""-strings as arguments. As far as I understand Java,
each ""-string creates a new Object! Therefore each out.write() creates
a new object and this is true for each call to _jspService of the same
object. So many calls to one and the same page result in many more
objects.

So my proposal is to compile JSP ""-strings to something like:

class xyz {
	static final String arr[] = { "uvw", "abc" ... };

	_jspService(...) {
		...
		out.write(arr[234])
		...
	}
}

Peter
--
Mime
View raw message