Reputation: 3401
Simple question about charset of JSP tags.
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib tagdir="/WEB-INF/tags" prefix="custom" %>
<custom:mytag> </custom:mytag>
mytag
is simple .tag
file located in WEB-INF/tags
. Charset of this file in eclipse is UTF-8. For some reason UTF-8 symbols do not display properly.
This affect only including tags, another jsp-s that was included display fine
Upvotes: 5
Views: 6522
Reputation: 1
In my case, the problem was the order of declaration of pageEncoding attribute. I figured out that pageEncoding attribute must be the first attribute declared right after @tag directive.
Incorrect: <%@tag description="some description" pageEncoding="UTF-8"%>
Correct: <%@tag pageEncoding="UTF-8" description="some description"%>
Upvotes: 0
Reputation: 17444
<%@tag pageEncoding="UTF-8"%>
placed in your tag file will help.
Tag directive attributes resemble ones of its page
counterpart.
Upvotes: 20