camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvahdat <babak.vah...@swissonline.ch>
Subject camel-servlet component doesn't get informed about it's name in web.xml
Date Wed, 17 Aug 2011 15:56:31 GMT
Hi,

camel-servlet is a new component to me to work with in my current project.
Just realized that I should ALWAYS use the servletName option IF I name the
single Servlet entry in my web.xml with something other than 'CamelServlet',
like:

  <servlet>
    <servlet-name>camel-servlet</servlet-name>
    <display-name>Camel Http Transport Servlet</display-name>
   
<servlet-class>org.apache.camel.component.servlet.CamelHttpTransportServlet</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>camel-servlet</servlet-name>
    <url-pattern>/services/*</url-pattern>
  </servlet-mapping>

It seems that
org.apache.camel.component.servlet.ServletComponent.setServletName() method
never gets called!

To reproduce the behaviour on trunk simply change [1] with the upper
modification, then you will see that [2] & [3] will fail.

Am I missing something?

[1]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/resources/org/apache/camel/component/servlet/web.xml
[2]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/HttpClientRouteTest.java
[3]
https://svn.apache.org/repos/asf/camel/trunk/components/camel-servlet/src/test/java/org/apache/camel/component/servlet/ServletTransferExceptionTest.java


Regards, Babak

--
View this message in context: http://camel.465427.n5.nabble.com/camel-servlet-component-doesn-t-get-informed-about-it-s-name-in-web-xml-tp4708805p4708805.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message