struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Sherman <a...@teachandtravel.com>
Subject Mapping Problems
Date Wed, 02 Oct 2002 20:39:20 GMT
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>


Mime
View raw message