On Sunday, August 3, 2003, at 10:05 PM, Joe Germuska wrote:
If you register "SmartForwardingAction" as your "unknown" (default) action, it will take what would have been the action path, append ".jsp", and forward to that JSP. So if someone requests "/HelloWorld.do", the action looks for "/HelloWorld.jsp". If getRequestDispatcher() for that path returns null, an exception is thrown; otherwise, the execute method returns a ForwardingAction pointing to that path.

Now that is pretty clever! Nice.


The only issue that it would have for me though, is we use different naming conventions for action mappings than we do for JSP pages, so it would require we either change our conventions or just rename JSP's when we inject a real action in the middle at a later time. There still seems to be an advantage to keeping all .do links listed in struts-config though - at least then you can see all entry points of your app. in one place.

Again, a nifty action though.

Erik


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



Reply via email to