This repository has been archived by the owner on Apr 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dongho Sim <dhsim86@gmail.com>
- Loading branch information
Showing
5 changed files
with
48 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package Lesson04; | ||
|
||
import javax.servlet.*; | ||
import java.io.IOException; | ||
|
||
/** | ||
* Created by Dongho on 2017. 3. 8.. | ||
*/ | ||
public class CharacterEncodingFilter implements Filter { | ||
|
||
FilterConfig filterConfig; | ||
|
||
@Override | ||
public void init(FilterConfig filterConfig) throws ServletException { | ||
this.filterConfig = filterConfig; | ||
} | ||
|
||
@Override | ||
public void doFilter( | ||
ServletRequest request, ServletResponse response, FilterChain nextFilter) | ||
throws IOException, ServletException { | ||
|
||
request.setCharacterEncoding(filterConfig.getInitParameter("encoding")); | ||
nextFilter.doFilter(request, response); | ||
} | ||
|
||
@Override | ||
public void destroy() { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters