Announcement Announcement Module
Collapse
No announcement yet.
Spring - Struts (action-servlet.xml) settings Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring - Struts (action-servlet.xml) settings

    I'm using Spring on my Struts based web layer. All my actions currently extend Struts' MappingDispatchAction,,
    Is it possible somehow to map beans (in action-servlet.xml) for single action class instead of action name?

    for example, I have
    Code:
    <bean name="/admin/editUser,/admin/saveUser,/admin/listUsers,/admin/deleteUser,/listUserDetails" class="foo.bar.struts.action.UserDispatchAction" singleton="false">
      <property name="service">
        <ref bean="userAccountService"/>
      </property>
    </bean>
    I'd like something like
    Code:
    <bean class="foo.bar.struts.action.UserDispatchAction" singleton="false">
      <property name="service">
        <ref bean="userAccountService"/>
      </property>
    </bean>

  • #2
    You need to provide an implementation of AbstractHandlerMapping to control the routing of requests to handler objects. Default is BeanNameUrlHandlerMapping.
    You can use SimpleUrlHandlerMapping or create your own implementation.

    Comment

    Working...
    X