---
title: "BUG? must be escaped when used within the value"
author: "fengchao"
date: "2009-02-18T18:49:19Z"
tags: []
slug: "bug-must-be-escaped-when-used-within-the-value"
draft: false
lastmod: "2009-02-18T18:49:19Z"
id: 335080
url: "https://alexfc.iteye.com/blog/335080"
---

在如下调用时出错：

<jsp:include page="fastpost.jsp">
    <jsp:param name="returl" value="<%=Url.encode(****) %>" />
</jsp:include>

这里，在 value 中只是使用了 URL 而已。

然后报错：

Attribute value Url.encode(****)  is quoted with " which must be escaped when used within the value

啊，无语，在另一个页面中这么写就没错啊？

Google。

发现说是什么 apache 升级到 6.0 后出现的 bug。

详情见：

 quoted must be escaped - MMBase

然后跟踪链接，这里说的很详细了：

Possible user code changes required when we upgrade to Tomcat 6.0.18

按照上面的说法，这么改写：

<jsp:include page="fastpost.jsp">

    <jsp:param name="returl" value='<%=Url.encode(****) %>' />

</jsp:include>

其实只是把 value="" 改成 value=''。