Hi guys,

we're in the process of migrating a web app from Weblogic 5.1 to JBoss 3.2.3/Tomcat 
4.1.29 and we've come across an issue caused by a change in the JSPWriter between the 
JSP 1.1 and JSP 1.2 specifications. We need to support both app servers.

Here's the issue: on Weblogic 5.1, the JSPWriter will implicitly convert nulls to "", 
whereas in Tomcat the nulls are not getting converted and we see "null" in our 
textfields. 

This is as expected in Tomcat 4, since according to the JSP 1.2 spec:

public abstract void print(java.lang.String s)
  |                     throws java.io.IOException
  | Print a string. If the argument is null then the string "null" is printed. 
Otherwise, the string's characters are converted into bytes according to the 
platform's default character encoding, and these bytes are written in exactly the 
manner of the Writer.write(int) method.

The same behavior is described in the JSP 2.0 spec and is seen as expected in Tomcat 5.

Here are our options as I see them:

1. write some Javascript to go through the DOM after each page loads and replace null 
values in text components with ""
2. modify every JSP (we have ~450) to print "" if a string is null
3. hack Tomcat's JSPWriter to print "" if a string is null

Our current thinking is to do #3 first in order to get something working asap, and to 
do #2 in parallel and as a long term solution.

Any better suggestions ? Is there any configuration setting in Tomcat that would give 
implicitly convert nulls to empty strings in the JSPWriter.print(String s) method ? 
I've searched these forums, the tomcat-user mailing list and googled but haven't found 
anything.

Thanks in advance,
-Paul Kavanagh
SuccessFactors Inc.


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3840006#3840006

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3840006


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to