Skip to content
Snippets Groups Projects
Commit 193e7583 authored by Mic's avatar Mic
Browse files

added encoding configuration so people can enter Chinese characters inside all the forms.

parent 9489b926
No related branches found
No related tags found
No related merge requests found
......@@ -60,20 +60,8 @@ http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
<servlet-name>datatablesController</servlet-name>
<url-pattern>/datatablesController/*</url-pattern>
</servlet-mapping>
<!-- Dandelion-Datatables filter definition -->
<filter>
<filter-name>datatablesFilter</filter-name>
<filter-class>com.github.dandelion.datatables.extras.servlet2.filter.DatatablesFilter</filter-class>
</filter>
<!-- Dandelion-Datatables filter mapping -->
<filter-mapping>
<filter-name>datatablesFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- used so we can use forms of method type 'PUT' and 'DELETE'
<!-- used so we can use forms of method type 'PUT' and 'DELETE' (such as in the Pet form)
see here: http://static.springsource.org/spring/docs/current/spring-framework-reference/html/view.html#rest-method-conversion
-->
<filter>
......@@ -85,5 +73,36 @@ see here: http://static.springsource.org/spring/docs/current/spring-framework-re
<filter-name>httpMethodFilter</filter-name>
<servlet-name>petclinic</servlet-name>
</filter-mapping>
<!-- used to provide the ability to enter Chinese characters inside the Owner Form -->
<filter>
<filter-name>encodingFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>encodingFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- Dandelion-Datatables filter definition -->
<filter>
<filter-name>datatablesFilter</filter-name>
<filter-class>com.github.dandelion.datatables.extras.servlet2.filter.DatatablesFilter</filter-class>
</filter>
<!-- Dandelion-Datatables filter mapping -->
<filter-mapping>
<filter-name>datatablesFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment