Announcement Announcement Module
Collapse
No announcement yet.
Change locale with interceptor - Params in URL Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Change locale with interceptor - Params in URL

    Hi all!

    I'm currently using the locale interceptor in my web application to manage the session's locale, but I have one problem when exist parameters in the url. The way i'm using is this:

    My application manages 3 different locales:
    • Galician
    • Spanish
    • English

    In the header of my web I have three images, which are links that does this (jsp code):

    Code:
    <c:url var="enURL" value="${request.requestURI}">
    	<c:param name="lang" value="en_US"/>
    </c:url>
    
    <a href="${enURL}"> <img src="img/Flags/UK.png" alt="<spring:message code='Locale.en'/>" </a>
    As you can see, I'm only appending the param for the resolver, but the expression request.requestURI in the JSP doesn't have the parameters (if they exist). All works fine, but if in the URL there are any parameter... crashes.

    ¿Anyone knows any other way to solve this situation in Spring Framework?

    Thanks
Working...
X