Hi,

I'm trying to pass some initialization parameters to an Action and I'm having some trouble. What I want is to be able to tell my LoginAction not to validate passwords for development systems. Here is what I have right now followed by the error I get on startup:

struts-config.xml:
<action
  path="/login"
  type="action.LoginAction"
  scope="request"
  name="loginForm"
  validate="false"
  input="/login/login.jsp"
  >
  <set-property property="passwordDisabled" value="true" />
</action>

LoginAction.java:
  public boolean passwordDisabled = false;
  public boolean getPasswordDisabled() {
    return passwordDisabled;
  }
  public void setPasswordDisabled(boolean aValue) {
    passwordDisabled = aValue;
  }

error log:
Nov 18, 2003 2:06:14 PM org.apache.commons.digester.SetPropertyRule begin
FINE: [SetPropertyRule]{struts-config/action-mappings/action/set-property} Set org.apache.struts.action.ActionMapping property passwordDisabled to true
Nov 18, 2003 2:06:14 PM org.apache.commons.digester.Digester startElement
SEVERE: Begin event threw exception
java.lang.NoSuchMethodException: Bean has no property named passwordDisabled
at org.apache.commons.digester.SetPropertyRule.begin(SetPropertyRule.java:192)
at org.apache.commons.digester.Rule.begin(Rule.java:200)
at org.apache.commons.digester.Digester.startElement(Digester.java:1273)
at weblogic.apache.xerces.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:459)
at weblogic.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.jav
a:221)



It looks like it is trying to set the passwordDisabled property in the ActionMapping class instead of the LoginAction class. wtf? I can't find any examples anywhere that set parameters on actions, but according to the dtd, it is valid. Any help is appreciated.


--
Frank Maritato

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to