struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rene Eigenheer <reigenh...@bridgesolutions.net>
Subject RE: Mapping Problems
Date Wed, 02 Oct 2002 21:04:02 GMT
Adam,

I didi something similar with the following action definition:

        <action
            path="/myAction"
            type="my.actionClass"
            name="myForm"
            scope="request"
            validate="false"
            unknown="true">
        </action>

I is not important what action name (path) you use! With the parameter
unknown="true" struts handles all request which do not belong to another
action with this one (i.e. all *.html).

hope this helps
Rene


> -----Original Message-----
> From: Adam Sherman [mailto:adam@teachandtravel.com]
> Sent: Mittwoch, 2. Oktober 2002 22:39
> To: Struts Users Mailing List
> Subject: Mapping Problems
>
>
> Is it possible to map requests to an Action using a pattern?
>
> I would like to map "*.html" to my Action.
>
> Using Tomcat, if I request "/thing.html", I get a 400 saying "Invalid
> path /thing was requested". A few snippets:
>
> In web.xml:
>    <servlet-mapping>
>    	<servlet-name>action</servlet-name>
> 	<url-pattern>*.html</url-pattern>
>    </servlet-mapping>
>
> In struts-config.xml:
> <action path="*.html"
> type="com.teachandtravel.presentation.actions.RenderPageAction" />
>
> Thanks,
>
> A.
>
> P.S. I'm looking for a Best Practice on handling generic non-dynamic
> pages on a site using Tiles, which is what I'm trying to implement
> above. A better solution would be appreciated!
>
> --
> Adam Sherman
> Software Developer
> Teach and Travel Inc.
> +1.613.241.3103
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:struts-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:struts-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:struts-user-help@jakarta.apache.org>


Mime
View raw message