今天接了个同事的半成品网站需要继续完成,熟悉网站的时候出现了以下错误
org.apache.jasper.JasperException: /jsp/index_f_left.jsp(135,84) Attribute value new Integer[] {Integer.valueOf((String)db.get("id"))} is quoted with " which must be escaped when used within the value
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:198)
org.apache.jasper.compiler.Parser.parseQuoted(Parser.java:301)
org.apache.jasper.compiler.Parser.parseAttributeValue(Parser.java:250)
org.apache.jasper.compiler.Parser.parseAttribute(Parser.java:212)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:155)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1252)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1467)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1675)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1022)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1290)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1467)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1675)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1022)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1290)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1467)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1675)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1022)
org.apache.jasper.compiler.Parser.parseCustomTag(Parser.java:1290)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1467)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1063)
org.apache.struts.action.RequestProcessor.internalModuleRelativeForward(RequestProcessor.java:1001)
org.apache.struts.action.RequestProcessor.processForward(RequestProcessor.java:560)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:209)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
错误原因是同事使用Tomcat5.0,我使用的是Tomcat6.0,后来测试,Tomcat5.5及Tocmcat6.0对于页面标签的属性value中的引号需要使用"\"转译。
例如,Tomcat5.0中以下写法没有问题
variables="<%=new Integer[] {Integer.valueOf((String)db.get("id"))}%>"
而在Tomcat5.5及Tomcat6.0中需要这样的写法
variables="<%=new Integer[] {Integer.valueOf((String)db.get(\"id\"))}%>"
分享到:
相关推荐
用于Unicode中文的转译 用于Unicode中文的转译 用于Unicode中文的转译用于Unicode中文的转译
有时候,是不是感觉自己写的JS不起作用,特别是拼装JS的时候,那么这个对你有作用..
总结了一些关于C#的转义字符和大家分享,该文件描述的是C#语言,关于一些转义字符的用法
PDF文件转译器 PDFtoWordConverter
在ORACLE中,单引号有两个作用: 1:字符串是由单引号引用 2:转义。 单引号的使用是就近配对,即就近原则。而在单引号充当转义角色时相对不好理解 1.从第二个单引号开始被视为转义符,如果第二个单...
Hibernate 转译中文版。 好久前收集的学习资料。
通过微软语音转译API 将说话人的语音转换成文字
Propedit(Properties转译),将Properties文件中字符转译成中文,保存方式依然为字符。 方法:将文件解压后得到 propedit 文件夹--放入Eclipse或者MyEclipse的 dropins 文件夹中--重启应用即可。
2010-1-28 VB转易和易转VB最新版本获取 请您访问: http://shop60450757.taobao.com/ 2010-1-12 VB到易语言源代码转译软件1.0版的重要说明 本说明随VB到易语言源代码转译软件一同分发,使用本软件之前请先仔细...
脚手架及html转译GUI工具WinMac版
NULL 博文链接:https://412599526-qq-com.iteye.com/blog/1178036
emoji表情存储转译工具类 由于数据库不支持Emoji表情,为了避免改数据库编码格式代理来的风险。Java处理emoji 表情符号依赖的jar包 示例地址:https://pxy.iteye.com/blog/2435738
这是脚手架及html转译GUI工具WinMac版。有需要的下载
图像的转译与美术的释读.pdf
How to get the C language program in Delphi language 如何将C语言程序转译成delphi语言程序
ShiftJS是开源的采用JavaScript编写的Swift转译JavaScript工具,需要Node 4.0.0 及以上版本环境。使用:安装命令行工具:npm install --g shift.js转译一个单独的Swift文件到JavaScript文件shift.js ...
页面传进来传个条件判断的时候,要用到sql语句的拼接才能解决sql的问题,这是一个小例子。
下面小编就为大家分享一篇解决JSON.stringify()自动将中文转译成unicode的问题,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧
Oracle字符串如何连接单引号 写了个存储过程,需要在字符串变量前后加单引号。貌似简单的事情折腾了我一下午,好在天无绝人之路。终于被我弄明白甲骨文的变态规则。 Oracle字符串连接单引号: 1.首尾单引号为...
SSH整合开发,MyElipse下源代码工作区,SQL文件,使用时创建名为morse的数据库,并执行morse.sql,该web应用使用了国际化、拦截器、规则验证等struts功能,实现将英文、中文转译为摩尔斯码点线码和音频码。...