tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carson McDonald <cars...@missiondata.com>
Subject Re: JSP question
Date Thu, 20 Apr 2000 15:25:22 GMT

At some point yes the JVM is speaking but at that point it doesn't know to 
put "null" in the output. The point is that WebSphere is doing one thing with
their JspWriter and jasper is doing another. I'm just trying to find out who
is doing the correct thing or if there is even a correct way. I feel like
Jasper is correct in printing "null" because a PrintWriter will do the same
thing given:

PrintWriter pw = new PrintWriter(System.out);
pw.print((String)null);

Of course if you use the write(...) method you are in trouble.


On Thu, Apr 20, 2000 at 10:35:33AM -0400, Sills, David wrote:
> I may be wrong, but isn't that the JVM speaking? In the JSP projects I have
> done, I have always had to be careful to initialize Strings to "", whatever
> the engine in use. I have even gone so far as to rewrite default
> constructors for data objects that would be used to pre-populate forms so
> that if they weren't found in the HttpSession the default behavior after the
> default constructor would be to print the String as "" and, more
> importantly, report the default length as 0 (since we all know what
> (null).length() gets you).
> 
> David Sills
> 
> 
> -----Original Message-----
> From: Carson McDonald [mailto:carsonm@missiondata.com]
> Sent: Thursday, April 20, 2000 10:49 AM
> To: tomcat-user@jakarta.apache.org
> Subject: JSP question
> 
> 
> 
> I have a question about the jasper JSP implementation. Just recently we
> started
> a move from WebSphere to Tomcat to see if Tomcat is more stable than
> WebSphere.
> For the most part the code works as it did under WebSphere except for a few
> things where WebSphere seems to be at fault for not following specs or just 
> not working. The main question is this: In WebSphere when you use a
> JspWriter 
> if you do:
> 
> String junk = null;
> 
> <%=junk%>
> 
> You get a blank. With jasper you get "null" printed out. Is this behavior up
> to the implementor of JspWriter?
> 
> TIA
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 
> --------------------------------------------------------------------------
> To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commmands, email: tomcat-user-help@jakarta.apache.org
> 

Mime
View raw message