A quick question about Struts' capabilities.
I want to match a wildcard, such as "/portal/*", where the "*" could be
"/mydir/mypage.jsp". Fine so far--I know Struts can handle this.
Now, I want all these requests to be funnelled to a single Action. From what
I can tell, the <action> tag in the struts-config.xml doesn't support
wildcards. Is this correct?
Based upon my tests, this does *not* seem to work. But, I'll admit that I
might be missing something obvious.
I'd like to have an action that looks like:
<action path="/portal/*"
type="my.portal.ControllerClass"
name="whatever"
scope="request"
validate="false">
</action>
The "my.portal.ControllerClass" class would then extract the originally
requested URL (minus the "/portal"), set it as an attribute (so that the
template page could use it to import the document in the content area), then
forward the request to a file "template.jsp" located in the directory of the
requested URL (again, minus the "/portal"--I don't want the forward to be
handled by the Struts controller :-)
The reason for this is I want my web developers to be able to work without
the portal template, creating documents whose links all actually work (the
web app would be mapped to "/portal"). Then, when it gets deployed, they
install the web app in "/", and everything works automagically!
Maybe there's another "preferred" method of doing this. I know that having
the content file as a GET variable would work within the Struts methodology,
but that wouldn't work for my web developers that don't have a local
installation of Jakarta. :-(
Cheers!
-dan
--
Dan Kirkpatrick, Software Architect
Blue Lotus Software +44 (0) 1224 575 985
http://www.bluelotussoftware.com