I have a spring_tiles web application and am trying to add spring security to it:
This is the world of my TilesConfig.xml:
<definition name="loginPage" extends="commonPage">
<put-attribute name="body" value="/WEB-INF/tiles/jsp/login_body.jsp" />
</definition>
Here is my spring mapping part:
<bean id="urlMapping"
class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="interceptors">
<list>
<ref bean="openSessionInViewInterceptor" />
</list>
</property>
<property name="mappings">
<props>
<prop key="/main.htm">mainController</prop>
<prop key="/category.htm">viewCategoryController</prop>
<prop key="/good.htm">goodController</prop>
<prop key="/registration.htm">registrationController</prop>
<prop key="/login.htm">?</prop>
</props>
</property>
</bean>
And here is the part from the context-security.xml application:
<http auto-config='true'>
<intercept-url pattern="/**" access="ROLE_USER" />
<intercept-url pattern="/css/**" filters="none"/>
<intercept-url pattern="/js/**" filters="none"/>
<intercept-url pattern="/login.htm*" filters="none"/>
<form-login login-page="/login.htm" />
</http>
But I am wondering how can I configure the definition of the tile page for matching. I have used controllers on all other pages, but I believe that in this case I should not use loginController, because spring Security is instead.
So here is my question: how to map loginPage tiles to /login.htm in spring security?
source
share