I realise the spec says it's ok to use new, however it's a fairly restrictive implementation.
In fact it means that you can only pass objects through to the JSP page that have an empty constructor. It is no longer 'all objects'.
Is the performance hit of using reflection 'that much'?
Cheers
Rupert
Tim Funk wrote:
The spec says using new() is OK. So tomcat does since it is *much* faster than reflection.
-Tim
Rupert Jones wrote:
Hi there
[Running Tomcat 5.0.19]
I have a servlet which forwards a Boolean object resource (request.setAttribute("someBoolean", someBoolean);) on to a jsp page. As you know there is no default constructor for this object (new Boolean()). In previous versions of Tomcat, well 5.0.16 and less, this didnt become a problem, as long as the Boolean was not null. In 5.0.19 the jsp compile throws an error because it includes code to make a new object were it null.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Rupert Jones -------------- http://www.rupertjones.com/
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]