You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@struts.apache.org by "Paul Benedict (JIRA)" <ji...@apache.org> on 2006/11/18 18:08:57 UTC

[jira] Commented: (STR-2894) The type attribute should be optional

    [ http://issues.apache.org/struts/browse/STR-2894?page=comments#action_38786 ] 
            
Paul Benedict commented on STR-2894:
------------------------------------

Wendy,

I see the offending line in the ActionServlet on line 927 (and again on 939):

            // Verify that required fields are all present for the form config
            if (formBean.getType() == null) {
                handleValueRequiredException("type", formBean.getName(),
                    "form bean");
            }

Are you asking to delete that line?

Since the type is optional. What is the type when it is not explicilty stated?

> The <form-bean> type attribute should be optional
> -------------------------------------------------
>
>                 Key: STR-2894
>                 URL: http://issues.apache.org/struts/browse/STR-2894
>             Project: Struts 1
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: Nightly Build
>            Reporter: Wendy Smoak
>             Fix For: 1.3.6
>
>         Attachments: my-webapp.zip
>
>
> According to the 1.3 DTD, the 'type' attribute of <form-bean> is optional.
>    http://struts.apache.org/dtds/struts-config/1_3/
> However, omitting it from the form bean definition in struts-config.xml results in an error.
>         <form-bean
>             name="inputForm" />
> SEVERE: Servlet /my-webapp threw load() exception
> javax.servlet.UnavailableException: Missing type value for inputForm form bean
> 	at org.apache.struts.action.ActionServlet.handleValueRequiredException(ActionServlet.java:830)
> 	at org.apache.struts.action.ActionServlet.initModuleFormBeans(ActionServlet.java:926)
> 	at org.apache.struts.action.ActionServlet.init(ActionServlet.java:357)
> 	at javax.servlet.GenericServlet.init(GenericServlet.java:211)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/struts/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira