[Users | Trunk]: Add filter for utf-8

This commit is contained in:
Konstantinos Triantafyllou 2020-12-07 15:26:42 +00:00
parent 6284ef2d2e
commit a143109714
4 changed files with 37 additions and 8 deletions

View File

@ -0,0 +1,27 @@
package eu.dnetlib.openaire.usermanagement.utils;
import javax.servlet.*;
import java.io.IOException;
public class CharacterSetFilter implements Filter {
@Override
public void init(FilterConfig filterConfig) throws ServletException {
}
public void doFilter(
ServletRequest request,
ServletResponse response,
FilterChain next) throws IOException, ServletException {
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html; charset=UTF-8");
response.setCharacterEncoding("UTF-8");
next.doFilter(request, response);
}
@Override
public void destroy() {
}
}

View File

@ -1,8 +1,2 @@
google.recaptcha.secret = 6LfYrU8UAAAAADwrbImPvDo_XcxEZvrkkgMy9yU0 google.recaptcha.secret = 6LfYrU8UAAAAADwrbImPvDo_XcxEZvrkkgMy9yU0
google.recaptcha.key = 6LfYrU8UAAAAAFsl3m2YhP1uavdmAdFEXBkoY_vd google.recaptcha.key = 6LfYrU8UAAAAAFsl3m2YhP1uavdmAdFEXBkoY_vd
registry.issuer = https://openaire-dev.aai-dev.grnet.gr/registry
registry.user = user
registry.password = pass
registry.version = 1.0
registry.coid = 2

View File

@ -19,7 +19,15 @@
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener> </listener>
<filter>
<filter-name>CharacterSetFilter</filter-name>
<filter-class>eu.dnetlib.openaire.usermanagement.utils.CharacterSetFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>CharacterSetFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet> <servlet>
<servlet-name>User API</servlet-name> <servlet-name>User API</servlet-name>
<servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class> <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>

View File

@ -28,7 +28,7 @@
<link href="images/favicon/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" /> <link href="images/favicon/favicon.ico" rel="shortcut icon" type="image/vnd.microsoft.icon" />
</head> </head>
<body class="" style=""> <body class="" style="">
<div class="uk-offcanvas-content uk-height-viewport">Ï <div class="uk-offcanvas-content uk-height-viewport">
<!-- MENU STARTS HERE --> <!-- MENU STARTS HERE -->
<jsp:include page="header.jsp"/> <jsp:include page="header.jsp"/>
<!-- CONTENT STARTS HERE --> <!-- CONTENT STARTS HERE -->