Hi Nestor,
thank you for your answer. It give me interested information about localization even though it did not solve my problem. Perhaps I should have described it better, but the feature preventing me to paste urls is making it a bit hard. Anyway, here is (hopefully) a better description of my problem:
Problem:
I have been playing around with an idea of a public service, which has got localized urls for obtaining a better visibility on Google's search results. Now I am searching for the optimal solution for achieving this goal in a prototype application. The problem can actually be divided into two main areas:
- How to create localized links in a JSP page
- How to map the localized links to the correct controller
Results achieved so far:
By using SimpleUrlHandlerMapping it is possible to achieve a good starting point for solving the problem number 2. See:
Code:
<bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="mappings">
<props>
<prop key="/suomi.action">controller</prop>
<prop key="/english.action">controller</prop>
</props>
</property>
</bean>
<bean id="controller" class="urltest.TestController"/>
However, the solution leads into a bit messy configuration, and I would like to extract the actual configuration from the Spring configuration file. I would prefer a configuration based on resource bundles, because this would perhaps make it easier to solve the problem 1. I have, however, some fears concerning a solution like this:
- The configuration of the project is too heavy
- The development of new features will be slow due to the localization
Any ideas or comments?