Vithun,
Thanks for the suggestion! but it did not work
skram,
No, thanks to you for such a thorough tutorial!
If I understood well, you suggested:
web.xml: a child mapping for the servlet, root mapping for security
Code:
<servlet-mapping>
<servlet-name>myapp</servlet-name>
<url-pattern>/hs/*</url-pattern>
</servlet-mapping>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
security.xml: left untouched ()excerpt below
Code:
<http auto-config="true" use-expressions="true">
<!-- Allow everyone access to images, javascript and stylesheets -->
<intercept-url pattern="/resources/**" access="permitAll" />
<intercept-url pattern="/ws" access="permitAll" />
<!-- Allow everyone access to web services endpoints -->
<intercept-url pattern="/ws/**" access="permitAll" />
<!-- Force login through SSL (https) -->
<intercept-url pattern="/login" access="permitAll" requires-channel="https" />
<!-- Force every controller to use SSL (https) -->
<intercept-url pattern="/*" access="hasRole('ROLE_USER')" requires-channel="https"/>
myapp-servlet.xml (left untouched, excerpt)
Code:
<!-- Maps '/' requests to the 'home' view -->
<mvc:view-controller path="/" view-name="home"/>
<!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources/ directory -->
<mvc:resources mapping="/resources/**" location="/resources/" />
<!-- Package where the controllers reside -->
<context:component-scan base-package="org.mycompany.myapp" />
<!-- Views resolver: Tiles -->
<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
</bean>
<!-- Tiles Configuration and Definitions -->
<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
<property name="definitions">
<list>
<value>/WEB-INF/definitions/tiles-defs.xml</value>
</list>
</property>
</bean>
<!-- Interceptor defined elsewhere -->
<bean id="handlerMapping"
class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
<property name="interceptors">
<ref bean="localeChangeInterceptor" />
</property>
</bean>
And mvc-ws-integration.xml (left untouched):
Code:
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<value>
/ws=messageDispatcher
/ws/authentication.wsdl=authentication
</value>
</property>
</bean>
Even with this modifications (well, I only changed the mappings in web.xml), the WS part is still not working. I can access my webapp with https://localhost:8443/myapp/hs/, but I keep getting a:
Code:
WARN [org.springframework.web.servlet.PageNotFound] - <N
o mapping found for HTTP request with URI [/myapp/hs/ws/authentication.wsdl]
in DispatcherServlet with name 'myapp'>
Do you think any of the configuration lines in bold is clashing with another?
I've spent the past two days with trial and error, I never expected this configuration to be so troublesome (and so undocumented)
Thanks both for your help!