[英]How to exclude an url-pattern from servlet-mapping?
I have two servlet mapping.我有两个 servlet 映射。 All requests will go to spring-ws.
所有请求都会 go 到 spring-ws。 That is fine, But except that i want to exclude /legalfollowupnotificationservice/*
很好,但除了我想排除 /legalfollowupnotificationservice/*
<servlet-mapping>
<servlet-name>spring-ws</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>spring-ws2</servlet-name>
<url-pattern>/lglnotificationservice/*</url-pattern>
</servlet-mapping>
I handle this problem.我处理这个问题。 I always had correct two servlet-mapping.
我总是有正确的两个 servlet 映射。 All my definition od servlet mapping is correct.
我所有的定义 od servlet 映射都是正确的。
But I had a mistake When I defined sws:dynamic-wsdl但是当我定义 sws:dynamic-wsdl 时我犯了一个错误
<sws:dynamic-wsdl id="lglNotificationWs" portTypeName="LegalFollowUp"
locationUri="/lglNotificationService/" targetNamespace="http://www.xyz/lglnotificationservice"
createSoap11Binding="true" createSoap12Binding="true">
<sws:xsd location="classpath:/xsd/LegalFollowUpNotificationService.xsd" />
</sws:dynamic-wsdl>
lglNotificationService location uri has capital letter and MessageDispatcherServlet is case sensitive. lglNotificationService 位置 uri 有大写字母,MessageDispatcherServlet 区分大小写。
So my request is correspond to spring-ws byMessageDispatcherServlet and is not correspond to spring-ws2所以我的请求是对应于spring-ws byMessageDispatcherServlet 而不是对应于spring-ws2
I handle as using我处理为使用
<servlet-mapping>
<servlet-name>spring-ws</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>spring-ws2</servlet-name>
<url-pattern>/lglNotificationService/*</url-pattern>
</servlet-mapping>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.