weblogic下不能解析jsp的问题

chinazhousheng 2010-11-22 11:33:23
问题描述:
基于spring开发的程序在其他中间件下一切运行正常,但是一旦在weblogic11g
下面就报错,其他低版本正常

初步认定是编码问题,在其他中间件下charset能够utf-8,但是在weblogic11g下面它自动就转换成了gbk,强制设置charset也没有用,请各位大牛们帮忙!

JSP内容

<%@ page contentType="text/plain;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core" %>
[
<c:forEach var="resultInfo" items="${resultInfo}" varStatus="status">
<c:if test="${!status.first}">,</c:if>
{
"pointX": "<c:out value="${resultInfo.pointX}"/>",
"pointY": "<c:out value="${resultInfo.pointY}"/>",
"stateTime" :"<c:out value="${resultInfo.stateTime}"/>",
"speed" :"<c:out value="${resultInfo.speed}"/>"
}
</c:forEach>
]


报错内容:


HTTP/1.1 500 Internal Server Error
Date: Mon, 22 Nov 2010 13:26:16 GMT
Transfer-Encoding: chunked
Content-Type: text/html; charset=GBK
Content-Language: zh-CN
X-Powered-By: Servlet/2.5 JSP/2.1

02b9
<html>
<head>
<title>Weblogic JSP compilation error</title>
</head>
<body>
<b>Compilation of JSP File '/home/gis/event/commonresult.jsp' <font color=#FF0000>failed</font>:</b><HR><pre>
commonresult.jsp:5:30: Static attribute must be a String literal, its illegal to specify an expression.
"ErrorCode": "<c:out value="${errorCode}"/>",
^---^
commonresult.jsp:6:33: Static attribute must be a String literal, its illegal to specify an expression.
"ErrorDesc": "<c:out value="${errorDesc}"/>"
^---^
</pre>
</body></html>

0000
...全文
281 3 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
chinazhousheng 2010-11-23
  • 打赏
  • 举报
回复
开发环境没有问题,在其他中间件下面也是可以正常返回utf-8的
安心逍遥 2010-11-23
  • 打赏
  • 举报
回复
楼主用什么工具开发的啊?把开发工具的环境改成UTF-8试试...
chinazhousheng 2010-11-23
  • 打赏
  • 举报
回复
没有人知道吗

81,122

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧