You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian Lee <br...@hotmail.com> on 2003/08/04 21:51:13 UTC

ResponseUtils.write and null properties

Is the intended behavior of ResponseUtils.write to write out the String 
"null" to the print writer if the property supplied is null?

It seems that Weblogic's JspWriter will not write out "null" if null is 
provided, but sun's j2ee reference server will.

BAL

_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*  
http://join.msn.com/?page=features/virus


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: ResponseUtils.write and null properties

Posted by Kris Schneider <kr...@dotech.com>.
Okay, actual facts for when you write that bug report against WLS:

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/JspWriter.html#print(java.lang.Object)

http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/jsp/JspWriter.html#print(java.lang.String)

http://java.sun.com/j2se/1.4.1/docs/api/java/lang/String.html#valueOf(java.lang.Object)

Quoting Kris Schneider <kr...@dotech.com>:

> AFAICT, the correct behavior is to output "null". This probably has nothing
> to
> do with Struts but with the container's implementation of JspWriter.
> 
> Quoting Brian Lee <br...@hotmail.com>:
> 
> > Is the intended behavior of ResponseUtils.write to write out the String 
> > "null" to the print writer if the property supplied is null?
> > 
> > It seems that Weblogic's JspWriter will not write out "null" if null is 
> > provided, but sun's j2ee reference server will.
> > 
> > BAL
> 
> -- 
> Kris Schneider <ma...@dotech.com>
> D.O.Tech       <http://www.dotech.com/>

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: ResponseUtils.write and null properties

Posted by Kris Schneider <kr...@dotech.com>.
AFAICT, the correct behavior is to output "null". This probably has nothing to
do with Struts but with the container's implementation of JspWriter.

Quoting Brian Lee <br...@hotmail.com>:

> Is the intended behavior of ResponseUtils.write to write out the String 
> "null" to the print writer if the property supplied is null?
> 
> It seems that Weblogic's JspWriter will not write out "null" if null is 
> provided, but sun's j2ee reference server will.
> 
> BAL

-- 
Kris Schneider <ma...@dotech.com>
D.O.Tech       <http://www.dotech.com/>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: ResponseUtils.write and null properties

Posted by David Graham <gr...@yahoo.com>.
--- Brian Lee <br...@hotmail.com> wrote:
> Is the intended behavior of ResponseUtils.write to write out the String 
> "null" to the print writer if the property supplied is null?

Struts doesn't make that decision; it's up to the writer implementation. 
It seems like standard Java behavior to write "null" when you try to
output a String variable that's set to null.  I haven't used WebLogic but
Tomcat prints "null" and I believe a System.out.println(null) will also
print "null".

David

> 
> It seems that Weblogic's JspWriter will not write out "null" if null is 
> provided, but sun's j2ee reference server will.
> 
> BAL
> 
> _________________________________________________________________
> MSN 8 with e-mail virus protection service: 2 months FREE*  
> http://join.msn.com/?page=features/virus
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
> 


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org