- ベストアンサー
JSPのエラー
org.apache.jasper.JasperException: ERROR: character 0xc282 of encoding "UTF8" has no equivalent in "EUC_JP" org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:476) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:371) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 原因 javax.servlet.ServletException: ERROR: character 0xc282 of encoding "UTF8" has no equivalent in "EUC_JP" org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779) org.apache.jsp.jsp.sub_jsp._jspService(sub_jsp.java:80) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) 原因 org.postgresql.util.PSQLException: ERROR: character 0xc282 of encoding "UTF8" has no equivalent in "EUC_JP" org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1548) org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1316) org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:191) org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:452) org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:337) org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:329) atmarkit.MyDBAccess.execute(MyDBAccess.java:65) org.apache.jsp.jsp.sub_jsp._jspService(sub_jsp.java:67) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:328) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:315) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) javax.servlet.http.HttpServlet.service(HttpServlet.java:803) おそらく文字の変換がいけないと思いますが、対処方法がわからないです・・ <ソース>の一部 <%@ page contentType="text/html; charset=Shift_JIS" %> <%@ page import="java.sql.*,atmarkit.MyDBAccess" %> <% while(rs.next()) { int id = rs.getInt("member_id"); String name = rs.getString("name"); String age = rs.getString("age"); int state = rs.getInt("attendance"); String comment = rs.getString("comment"); name = new String(name.getBytes("8859_1"), "Shift_JIS"); if(comment != null) { comment = new String(comment.getBytes("8859_1"), "Shift_JIS"); } %> 詳しい方いらしゃったら、教えてください。 よろしくお願いします。
- みんなの回答 (4)
- 専門家の回答
補足
回答ありがとうございます。ちょっと長くなってしまいますので、 新しく立てます。