Hi,

 I have the following in the web.xml
<servlet>
      <servlet-name>action</servlet-name>
      <servlet-class>lam.mffs.action.MyActionServlet</servlet-class>
      <init-param>
        <param-name>application</param-name>
        <param-value>lam.mffs.form.ApplicationResources</param-value>
      </init-param>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
        <init-param>
          <param-name>debug</param-name>
          <param-value>2</param-value>
        </init-param>
        <init-param>
          <param-name>detail</param-name>
          <param-value>2</param-value>
        </init-param>
        <init-param>
          <param-name>validate</param-name>
          <param-value>true</param-value>
        </init-param>
        <load-on-startup>2</load-on-startup>
    </servlet>

I have MyActionServlet extend ActionServlet with init method as

public void init() throws ServletException
  {
    super.init();
    ConvertUtils.register(new BigDecimalConverter(null),
java.math.BigDecimal.class);

  }

now when I try to do the following in my formbean validate method

if (this.getPort_pct() == null)
    {
      LamLog.log(this, LamLog.INFO,"Error port_pct is null");
      errors.add("PORT_PCT",
                 new ActionError("errors.bigdecimal2"));
    }

I get  a java.lang.NullPointerException at

 errors.add("PORT_PCT",
                 new ActionError("errors.bigdecimal2"));

What is wrong.. I tried the other way of

<message-resources
    parameter="lam.mffs.form.ApplicationResources"/>

in the struts-config.xml but even that gave me the same error

Regards
Rajesh J







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

Reply via email to