On Tue, 20 Mar 2001, Troy Hart wrote:

> OK, so let me see if I understand what you are saying:
> 
> the tag <html:form action="/someAction"> will trigger FormTag.doStartTag(),
> which will append ".do" if no extension was specified. I guess it looks
> first to see if if extension mapping is being used vs. path (???) mapping?
> 

At startup time, the Struts controller servlet reads the web.xml file and
finds out what <servlet-mapping> entry you have selected.  If you use
extension mapping, <html:form> will append the appropriate suffix
(for example, "/saveCustomer.do")  On the other hand, if you used:

        <servlet-mapping>
                <servlet-name>action</servlet-name>
                <url-pattern>/process/*</url-pattern>
        </servlet-mapping>

The submitted URL will be something like "/process/saveCustomer" instead.

> Maybe I should go review the tag's java source... :)
> 

That's always useful :-).

> Thanks,
> 
> Troy
> 

Craig

Reply via email to