It isn't a bug...
If you set a variable with an empty string, why would you expect the
variable to contain something else when you do getParameter????
FYI
For null values, setProperty is not called according to the specs.
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Gopi Mandava
Sent: Tuesday, October 31, 2000 11:04 AM
To: [EMAIL PROTECTED]
Subject: Problem with setting an empty String in JSP
JSP is not setting the value if the param of String type is an empty
String. Here is an example:
<jsp:useBean id="sar" class="Sar" scope="page">
<jsp:setProperty name="sar" property="termReason" param="termReason" />
</jsp:useBean>
I checked it with request.getParameter("termReason") and it returns an
empty string. If I set any string with length > 0, the setProperty works
fine.
Is this working according to the JSP spec or is this a bug in Tomcat?
I'm using Apache 1.3.11 and Tomcat 3.1, running on Redhat.
Thanks,
Gopi
-----------
Gopi Mandava (703) 267-1735 x307
CoManage Inc.
"The world is more apt to be destroyed by bad politicians than bad physics"
- A.Einstein
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets