You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "Raudenbush, Pamela" <PR...@cslp.org> on 2003/12/01 23:16:00 UTC

Extending ActionMapping

I successfully implemented a class that extends ActionMapping
(MyActionMapping). I have only one new member - validState with a setter and
getter. I was able to successfully add this new attribute to my
struts-config:

<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
  "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
  "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">

....

<action path="/award"
            forward="/Award.jsp"
            scope="request"
            validState="F">
</action>

I set a default in my web-inf:

<init-param>
        <param-name>validState</param-name>
        <param-value>N</param-value>
</init-param>

I defined my ActionMapping in my web-inf:

<init-param>
      <param-name>mapping</param-name>
      <param-value>org.util.MyActionMapping</param-value>
</init-param>

Also,
<init-param>
        <param-name>validating</param-name>
        <param-value>true</param-value>
</init-param>

As I said, it works fine -- on MY development environment. I use Jrun3.1 app
server and struts 1.0.

My co-worker pulls the exact code, config files (web-inf and struts-config),
etc from CVS (I even started from scratch and pulled the same code), but he
gets the following message:

Attribute "validState" must be declared for element type "action".

We ran it against tomcat and got the same message. We see no differences in
our webapp configuration.

Any ideas on why we are getting this message?





---------------------------------------------------------------------
To unsubscribe, e-mail: struts-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-dev-help@jakarta.apache.org