commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Bradley" <lu...@somnia.com>
Subject [Struts 1.1 - Commons 1.5] <action><set-property/></action>
Date Sun, 11 May 2003 04:41:07 GMT
Using the following within struts-config.xml:

<action ... >
   <set-property property="loginRequired" value="false" />
</action>

Why is the following method on MyActionMapping (extends
ActionMapping) legal?

public String two = "" ;
public void setLoginRequired(String pString)
{
   this.two = pString ;
   System.out.println("setloginRequired " + pString) ;
}

But this not legal?

public boolean one = "" ;
public void setLoginRequired(String pString)
{
   this.one = new Boolean(pString).booleanValue() ;
   System.out.println("setloginRequired " + pString) ;
}

During the startup of Tomcat, the first will diplay all the
System.outs.  With the second example, nothing is there.

The more I play with this, the sketchier it is.... I can't even
pinpoint what makes it NOT work.  Sometimes this does work,
sometimes it doesn't....

public void setLoginRequired(String pString)
{
   this.two = pString ;
   System.out.println("setloginRequired " + pString) ;
   this.one = new Boolean(pString).booleanValue() ;
}

Any ideas?  I'm going source diving......  YUCK.

Lukas




Mime
View raw message