Announcement Announcement Module
Collapse
No announcement yet.
HTTP Status 404 - The requested resource () is not available. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTTP Status 404 - The requested resource () is not available.

    All,

    In my SimpleUrlHandlerMapping, if I set

    <property name="mappings">
    <props>
    <prop key="/*">MyController</prop>
    </props>
    </property>

    and try to access ...apps/spring/jsp/request/type1/list.jsp the control goes to MyController


    But my interest is to have different controllers configured, to start that if I define something like this

    <property name="mappings">
    <props>
    <prop key="/spring/jsp/request/type1/*">MyController</prop>
    </props>
    </property>

    I'm getting "HTTP Status 404 The requested resource () is not available."
    error.
    I'm expecting it to still go to MyController.

    I tried <prop key="/spring/jsp/request/type1/**">MyController</prop>, but that also didn't help


    Where could be the issue ?
    Any help to understand the issue is highly appreciated !

    Thanks,
    TJ



    ===========web.xml ===========
    <servlet>
    <description>MY SPRING SERVLET</description>
    <servlet-name>springServlet</servlet-name>
    <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>springServlet</servlet-name>
    <url-pattern>/spring/jsp/request/*</url-pattern>
    </servlet-mapping>



    ===========springServlet-servlet.xml===========

    <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">
    <property name="mappings">
    <props>
    <prop key="/*">MyController</prop>
    </props>
    </property>
    </bean>

    <bean id="MyController" class="com.spring.flight.HomeController">
    <property name="flightService" ref="flightService" />
    </bean>

    <bean id="Type1Controller" class="com.spring.flight.Type1Controller">
    <property name="flightService" ref="flightService" />
    </bean>

    <bean id="Type2Controller" class="com.spring.flight.Type2Controller">
    <property name="flightService" ref="flightService" />
    </bean>


    <bean id="flightService" class="com.spring.flight.service.DummyFlightServic e" />
    Last edited by tjpradeep; Aug 5th, 2008, 01:51 AM.

  • #2
    I fixed it using
    <property name="alwaysUseFullPath" value="true"/>

    in my <bean id="urlMapping" class="org.springframework.web.servlet.handler.Sim pleUrlHandlerMapping">

    Comment

    Working...
    X