Announcement Announcement Module
Collapse
No announcement yet.
inbound-gateway and path parameter issue in Spring Integration 2.2 Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • inbound-gateway and path parameter issue in Spring Integration 2.2

    Hello,

    I am having problems with the http:inbound-gateway path parameter.

    First or all, only paths containing document names with an .html extension work. For instance,

    <http:inbound-gateway
    id="theInboundGateway"
    request-channel="inboundChannel"
    reply-channel="outboundChannel"
    path="/ddd.html"
    works fine.

    On the other hand,

    <http:inbound-gateway
    id="theInboundGateway"
    request-channel="inboundChannel"
    reply-channel="outboundChannel"
    path="/ddd"

    returns a 404 Not_found error.

    Second, the following inbound-gateway returns a 404 error,

    <bean class="org.springframework.integration.http.inboun d.UriPathHandlerMapping" />

    <http:inbound-gateway
    id="theInboundGateway"
    request-channel="inboundChannel"
    reply-channel="outboundChannel"
    path="/ddd.html/email/{email}"
    supported-methods="GET, POST"
    payload-expression="#pathVariables.email"
    >
    Any help would be greatly appreciated.

    Many thanks.

    Philroc
    Last edited by Philroc; Apr 16th, 2013, 04:31 AM.

  • #2
    My web.xml contained this

    <servlet-mapping>
    <servlet-name>webapp</servlet-name>
    <url-pattern>/*.html</url-pattern>
    </servlet-mapping>

    instead of

    <servlet-mapping>
    <servlet-name>webapp</servlet-name>
    <url-pattern>/</url-pattern>
    </servlet-mapping>

    All is working well now.

    Comment


    • #3
      Hello!

      Can you show entire web.xml? please?
      Or the issue is out of date?

      Comment


      • #4
        Here's my web.xml file.

        <?xml version="1.0" encoding="UTF-8"?>
        <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

        <!-- The definition of the Root Spring Container shared by all Servlets and Filters -->
        <!--
        <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath:META-INF/spring/integration/spring-integration-context.xml</param-value>
        </context-param>
        -->

        <!-- Creates the Spring Container shared by all Servlets and Filters -->
        <!--
        <listener>
        <listener-class>org.springframework.web.context.ContextLoade rListener</listener-class>
        </listener>
        -->

        <display-name>spring-http</display-name>

        <!-- Processes application requests -->
        <servlet>
        <servlet-name>webapp</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherSe rvlet</servlet-class>
        <init-param>
        <param-name>contextConfigLocation</param-name>
        <!-- <param-value>classpath:META-INF/spring/mvc/servlet-context.xml</param-value> -->
        <param-value>classpath:META-INF/servlet-config.xml</param-value>
        </init-param>
        <load-on-startup>1</load-on-startup>
        </servlet>

        <servlet-mapping>
        <servlet-name>webapp</servlet-name>
        <url-pattern>/</url-pattern>
        </servlet-mapping>

        <welcome-file-list>
        <welcome-file>
        index.jsp
        </welcome-file>
        </welcome-file-list>

        </web-app>

        Comment


        • #5
          Ok, I see.
          So, I suggest to read more about servlet-mapping: https://www.google.com.ua/search?q=s...ng+url-pattern
          "/*" should fix your issue.

          Take care,
          Artem

          Comment

          Working...
          X