Report #411 Details

Project: Tomcat
Category: Bug Report
SubCategory: New Bug Report
Class: swbug
State: closed
Priority: medium
Severity: serious
Confidence: public
Environment: 
   Release: Tomcat latest as of Nov 17 (stab
   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.
Title: BugRat Report # 411

BugRat Report # 411

Project: Tomcat Release: Tomcat latest as of Nov 17 (stab
Category: Bug Report SubCategory: New Bug Report
Class: swbug State: closed
Priority: medium Severity: serious
Confidence: public

Submitter: _Anonymous ( [EMAIL PROTECTED] )
Date Submitted: Nov 20 2000, 01:45:11 CST
Responsible: Z_Tomcat Alias ( [EMAIL PROTECTED] )

Synopsis:
jsp:setProperty doesn't call set methods in beans if params have no value
Environment: (jvm, os, osrel, platform)
1.2, Linux, Suse 7.0, ?

Additional Environment Description:

Report Description:
If I have a url like so: http://localhost:8080/foobar/LoginSubmit.jsp?username=&password= and then in LoginSubmit.jsp 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 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.

How To Reproduce:

Workaround:

View this Report online...
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to