DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=27830>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=27830 "null" string in output for JSP documents when EL variable not set Summary: "null" string in output for JSP documents when EL variable not set Product: Tomcat 5 Version: 5.0.19 Platform: Other OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: Jasper AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] correct: When e.g. ${param.test} is not set, for jsp pages the attribute value is an empty string if printed to output. wrong: When using jspx (jsp document) the string "null" is in the output instead. If the param.test is set but null, the empty string is printed in jspx also (as should be). So, when using normal jsp pages, an empthy string is outputted both in case the ${param.test} is in the document text or as an attribute value of some element. I expect jsp documents to behave the same way. Testcase: <?xml version="1.0" encoding="utf-8"?> <!-- - JSPX Testcase. --> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:c="http://java.sun.com/jsp/jstl/core"> <head> <title>Test</title> </head> <body> <p> When param.test is not set, for jsp pages the attribute value is an empty string if printed to output. <br /> When using jspx (jsp document) the string"null" is in the output instead. If the param.test is set but null, the empty string is printed in jspx also. <br /> Observe the difference:<br /> Not printed: \${param.test} = ${param.test} <br /> but displayed as "null" here:<br /> <input type="text" value="${param.test}" /> </p> </body> </html> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]