[ 
https://issues.apache.org/struts/browse/STR-3194?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=47201#action_47201
 ] 

Michael Cox commented on STR-3194:
----------------------------------

Hello Paul,

What I was imagining is something along these lines, where every possible 
attribute is described in detail:

<form-beans>
        <form-bean
                name [description, developer-chosen unique name which is used 
as the key to store the form bean object (specified by the "type" attribute) 
into the request, required y/n]
                type [description, Java class name of the ActionForm bean, 
required y/n]
        >
        </form-bean>
</form-beans>

<global-exceptions>
        <exception
                key [description, maps to a value in *.properties file (which 
is specified by the "message-resources" element), required y/n]
                type [description, top-level class name of Java exceptions to 
be handled, required y/n]
                handler [description, Java class name of the exception handler 
for exceptions specified by the "type" attribute, required y/n]
>
</global-exceptions>

<global-forwards>
        [description of the global forwards section]
</global-forwards>

<action-mappings>
        <action
                path [description, must have leading fwd slash?, required y/n]
                type [description, class name of the Action, required y/n]
                input [description, the name of a forward element belonging to 
this action which will be invoked when an error occurs, required y/n]
                name [description, developer-chosen name of the form's class 
name specified by the "type" attribute for use by JSP pages, required y/n]
                validate [description, default value?, required y/n]
                scope [description, default value?, required y/n]
        <
                <forward
                        name [description, ActionMapping.findForward() searches 
for this value, required y/n]
                        path [description, can refer to a JSP page, can refer 
to another Struts action, can refer to a tiles definition, supports URL 
rewriting, required y/n]
                >
        </action>
</action-mappings>

I wish I had more thorough content as you requested, but I don't know all these 
answers yet.  It was actually during my efforts to learn this information about 
Struts that I discovered the documentation seems to have overlooked it.

> Need more thorough documentation of struts-config.xml
> -----------------------------------------------------
>
>                 Key: STR-3194
>                 URL: https://issues.apache.org/struts/browse/STR-3194
>             Project: Struts 1
>          Issue Type: Improvement
>          Components: Documentation
>    Affects Versions: 1.3.10
>         Environment: N/A
>            Reporter: Michael Cox
>            Priority: Minor
>             Fix For: Pending Review
>
>
> Being new to Struts, I've searched all over the documentation here:
> http://struts.apache.org/1.x/index.html
> But it's nearly impossible to get just a basic understanding of the 
> struts-config.xml file and its inner workings.  As one example, the "input" 
> attribute of the "action" element is included in several examples but is not 
> actually documented anywhere.  Other websites say that the "input" attribute 
> describes where to forward if there is a validation error.  Since it is 
> extremely unintuitive that a validation error page is specified by an 
> attribute called "input" (rather than, say, "errorpage"), and since the 
> official documentation should be reasonably thorough when covering the basics 
> of Struts, we really need to have a better description of the Struts 
> configuration XML file.  The documentation should contain a thorough 
> explanation of every element and attribute, as well as how the values can map 
> to other elements.  (i.e. how an action can be specified in the "path" 
> attribute of a "forward" element by using "actionName.do", how a "forward" 
> attribute of an "action" element can point to a tiles definition in 
> tiles-defs.xml, etc.  This wiring of values is very confusing to beginners -- 
> especially since the names that were chosen are often misleading -- and seems 
> to be poorly documented in the official pages.)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to