So I have a typical struts app, where everything ends in "*.do", e.g.:
    http://www.citycarshare.org/howitworks.do
And I wanted to add a URL like:
    http://www.citycarshare.org/ucsf

So I did:
    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>ucsf</url-pattern>
    </servlet-mapping>

And all was good.  The application even passed testing :-).  But... all
of the form-beans were actually broken :-(.  I see a small note in the
documentation that says "WARNING - The framework will not operate
correctly if you define more than one <servlet-mapping> element for the
controller servlet.".
 
So if I can't add two servelet-mappings, how can I support both URL styles?
Is there a way to do this with Apache, before we get to Tomcat/Struts?
I am aware of http://tuckey.org/urlrewrite/ , but have not yet adopted it.

                               -Bryce Nesbitt
                               Berkeley CA USA


NB: The rest of the relevant code path is:

<action-mappings type="org.apache.struts.config.SecureActionConfig">
        <action parameter=".site.offer_ucsf" path="/ucsf"
            type="org.apache.struts.actions.ForwardAction" validate="false">
            <set-property property="secure" value="false"/>
        </action>

<tiles-definitions>
    <definition name=".site.offer_ucsf" extends=".site">
        <put name="title" value="City CarShare - UCSF Parntership"/>
        <put name="shortHand" value="BLANK"/>
        <put name="content" value="/jsp/forbusiness/offer_ucsf.jsp"/>
    </definition>

-- 
----
Visit http://www.obviously.com/


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

Reply via email to