You can define an "unknown" action that responds to requests that no other actions are mapped to. See section 4.7:
http://jakarta.apache.org/struts/userGuide/building_controller.html


David



From: "Eric Jain" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "David Graham" <[EMAIL PROTECTED]>
CC: <[EMAIL PROTECTED]>
Subject: Re: DynamicForwardAction
Date: Wed, 5 Mar 2003 19:08:47 +0100

> As you said, you can setup forwards to hide the actual file that gets
> served by a url.  I don't see how bookmarks have any relation to this
> issue.

Consider the following simple use case: A user performs a search, gets a
list of results, views one entry in detail and then bookmarks it. Both
the result list as well as the entry viewing page are handled by Struts.
If the links in the result list are generated with the html:link tag and
not hardcoded to a 'nice' path, but directly to the action, the link the
user follows will look something like '/app/view.do?id=x', and this is
what gets bookmarked. Now ten years later, the same user returns, but
alas, we no longer use Struts and Struts naming conventions, you get the
idea :-)


> If you want to use /context/action/image.png, then define a > forward that maps that url to whatever file you want to serve (which > doesn't have to be image.png).

That is my current workaround. The drawback is that I have to include a
forward for each and every resource explicitely; the idea was to define
a default action (unknown="true") that handles this automatically, but
apparently this may not be possible after all?


-- Eric Jain


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


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus



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



Reply via email to