tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BugRat Mail System <tomcat-b...@cortexity.com>
Subject BugRat Report #411 has been filed.
Date Mon, 20 Nov 2000 07:45:11 GMT
Bug report #411 has just been filed.

You can view the report at the following URL:

   <http://znutar.cortexity.com/BugRatViewer/ShowReport/411>

REPORT #411 Details.

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: received
Priority: medium
Severity: serious
Confidence: public
Environment: 
   Release: Tomcat latest as of Nov 17 (stable)
   JVM Release: 1.2
   Operating System: Linux
   OS Release: Suse 7.0
   Platform: ?

Synopsis: 
jsp:setProperty doesn't call set methods in beans if params have no value

Description:
If I have a url like so:

http://localhost:8080/foobar/LoginSubmit.jsp?username=&password=

and then in LoginSubmit.jsp

<jsp:useBean id="loginForm" class="some.class.LoginForm" />
<jsp:setProperty name="loginForm" property="*" />

the setUsername() and setPassword() methods are not called.
If I move the setProperty into the useBean tag, it doesn't help.
Furthermore, if I do
<jsp:setProperty name="loginForm" property="username" value="" />

The set method STILL isn't called.

I can think of no reason for this, but I can think of a good reason to always call it.
Namely, it's nice to know if your bean was initialized fresh or just had a bunch of setProp
with empty string values.
Bean implementors can freely ignore empty string if they want to.

Mime
View raw message