Well I got a little further with this -- thanks!
Now I can get CompositeActionManager to work properly for actions
that are mapped both with traditional URL's (ie: /foo/bar.action) and
REST style URL's (/foo/bar/1). Unfortunately, this seems to have
screwed up loading static content url's (/foo/bar.css) such that I
cannot get to JSP pages directly, and none of my stylesheets load.
Is there another mapper I need to add to this declaration:
<constant name="struts.mapper.class"
value="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"/>
<constant name="struts.mapper.composite" value="struts,restful"/>
thanks.
--Deryl
On Mar 29, 2007, at 3:09 PM, Darren Salomons wrote:
Deryl,
I'm not sure if you solved your problem but this is how I got it to
work.
In the struts.mapper.composite value it is a list of the bean
references
from the struts-default.xml it is not a list of class names. The
bean name
for the DefaultActionMapper is struts. So you could configure the
DefaultActionMapper and the RestfulMapper with the following
configuration
in your struts.xml file.
<constant name="struts.mapper.class"
value="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"/>
<constant name="struts.mapper.composite" value="struts,restful"/>
Hope this helps,
Darren Salomons
Deryl Seale wrote:
Yes, I tried that, and all I got was an exception when I started up
the application saying that an ActionMapper with the name "struts"
had already been loaded, presumedly from struts-default.xml. If
there is a way to make Struts use CompositeActionMapper with some
configuration entry in struts.xml, it is not obvious to me how to do
it (in spite of the documentation).
--Deryl
On Mar 20, 2007, at 10:26 AM, Dave Newton wrote:
--- Deryl Seale <[EMAIL PROTECTED]> wrote:
I am having some trouble getting the
CompositeActionMapper to work
properly. I have the following specified in my
struts.properties:
[...]
Have you tried it like this in struts.xml?
<bean
type="org.apache.struts2.dispatcher.mapper.ActionMapper"
name="struts"
class="org.apache.struts2.dispatcher.mapper.CompositeActionMapper"
/>
<constant name="struts.mapper.composite"
value="org.apache.struts2.dispatcher.mapper.DefaultActionMapper,foo.
ba
r.MyActionMapper,foo.bar.MyAnotherActionMapper"
/>
(I haven't; this is what's in the API docs, though,
and I tend to avoid the properties file.)
d.
____________________________________________________________________
__
______________
No need to miss a message. Get email on-the-go
with Yahoo! Mail for Mobile. Get started.
http://mobile.yahoo.com/mail
--------------------------------------------------------------------
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Deryl Seale -- Director of Engineering
c: 734.883.9636
[EMAIL PROTECTED]
www.intel-assess.com
--
View this message in context: http://www.nabble.com/
CompositeActionMapper-tf3433990.html#a9740579
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Deryl Seale -- Director of Engineering
c: 734.883.9636
[EMAIL PROTECTED]
www.intel-assess.com