Announcement Announcement Module
No announcement yet.
Spring security problem with RESTful URLs Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring security problem with RESTful URLs


    I have a following issue:
    I'm trying to use clean urls, e.g. if my language is english - login url should be, if french - how can i configure spring security to use dynamic urls based on the selected language when user is trying to access restricted resource.

    e.g. if I access this page:, do authentification and want to be redirected on , if i access i want to be redirected to

    my configuration looks like:
    	<http  use-expressions="true" path-type="regex">
    		<intercept-url pattern="\A/[a-z]{2,2}/login\Z" access='isAnonymous()' />
    		<intercept-url pattern="/" access='isAnonymous()' />
    		<intercept-url pattern='/**' access='isAuthenticated()' />
    		<form-login login-page="/login" authentication-failure-url="/login" default-target-url="/welcome"  />
    		<logout logout-url="/logout" logout-success-url="/" />
    Also if i access and i'm not authenticated i would like to be redirected to

    Thanks in advance