Results 1 to 3 of 3

Thread: configure multiactionController and regular one help!

Hybrid View

  1. #1
    Join Date
    Aug 2004
    Posts
    12

    Default configure multiactionController and regular one help!

    Hi,
    I try to config one multiactionController with two regular Controllers, no luck, access
    http://localhost:8080/springapp/imagelist.htm
    http://localhost:8080/springapp/imageList
    http://localhost:8080/springapp/imag...html=imageList
    some were 404 errors, some were "No handling method can be found for request"
    please advise! here is my config file:

    <bean id="imageController" class="com.ping.springmvc.ImageController">
    <property name="methodNameResolver"><ref local="imageControllerResolver"/></property>

    </bean>

    <!-- Method resolution strategy for the MultiActionController above -->
    <bean id="imageControllerResolver" class="org.springframework.web.servlet.mvc.multiac tion.PropertiesMethodNameResolver">
    <property name="mappings">
    <props>
    <prop key="/imageList">showImageList</prop>
    <prop key="/imageContent">streamImageContent</prop>
    <prop key="/imageUpload">processImageUpload</prop>
    <prop key="/clearDatabase">clearDatabase</prop>
    </props>
    </property>
    </bean>

    <bean id="priceIncreaseValidator" class="bus.PriceIncreaseValidator"/>
    <bean id="priceIncreaseForm" class="com.ping.springmvc.PriceIncreaseFormControl ler"/>

    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/hello.htm">springappController</prop>
    <prop key="/priceincrease.htm">priceIncreaseForm</prop>
    <prop key="/imagelist.htm">imageController</prop>
    </props>
    </property>
    </bean>
    <bean id="viewResolver" class="org.springframework.web.servlet.view.Intern alResourceViewResolver">
    <property name="viewClass"><value>org.springframework.web.se rvlet.view.JstlView</value></property>
    <property name="prefix"><value>/WEB-INF/jsp/</value></property>
    <property name="suffix"><value>.jsp</value></property>
    </bean>

  2. #2
    Join Date
    Aug 2004
    Posts
    12

    Default I used two DispatcherServlets in web.xml

    I seperated to two DispatcherServlets, split config file to two, springapp-servlet.xml and image-servlet.xml, it works fine, but I do not know if this is the right way.

  3. #3
    Join Date
    Aug 2004
    Location
    Istanbul, Turkey
    Posts
    6

    Default

    hi,

    http://localhost:8080/springapp/imagelist.htm

    I advice you to assign standard URL to the requests. The first URL of the three seems OK for me. If imagelist.htm is used, you should add

    <prop key="imagelist.htm">imageController</prop>

    to urlHandlerMapping and

    <prop key="/imagelist.htm">showImageList</prop>

    to the method name resolver. There should be a method "showImageList" is your multiActionController.

    --
    Lemi Orhan Ergin

Similar Threads

  1. Replies: 0
    Last Post: Oct 6th, 2005, 03:41 PM
  2. FilterSecurityInterceptor & Regular Expression
    By Scott Battaglia in forum Security
    Replies: 2
    Last Post: Feb 24th, 2005, 01:18 AM
  3. Simple Regular expression problem
    By schuer in forum AOP
    Replies: 3
    Last Post: Feb 22nd, 2005, 03:35 AM
  4. Replies: 2
    Last Post: Jan 24th, 2005, 09:07 AM
  5. Replies: 3
    Last Post: Sep 1st, 2004, 12:38 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •