Jsp本身有问题,或者是家里的机器和公司的机器使用的字符编码不一致,看一下文件的编码。

解决方案 »

  1.   

    request.getParameter("id") 把这个值打印出来看看,出面有非法的字符
      

  2.   

    这个问题在Apache Bugzilla上有提到 Bug 45015原因是环境的改变导致了支持兼容性的改变 某些容器支持的范围超越了jsp规范According to JSP 2.0 specification (chapter 1.7 page 72,73)This code is illegal:
    <mytags:tag value="<%= "hi!" %>" />Instead the correct sentence would be:
    <mytags:tag value='<%= "hi!" %>' />
    <mytags:tag value="<%= \"hi!\" %>" />
    <mytags:tag value='<%= \"name\" %>' />
    ...
    But Tomcat 5.5 accept the first sentence. It's not a real bug but accepting a
    wrong sentence allow developpers to write code which does not respect the JSP
    specification. And when this code is executing in another servlet container
    (Websphere 6.1 for example) it doesn't work.
      

  3.   

    它的错误不是写得很清楚呀
    Attribute value request.getParameter("id") is quoted with " which must be escaped when used within the value 看看你的引号对不对
      

  4.   

    是jdk造成的,换成1.6版本以后就没问题了,
    <jsp:include page="Tools.html">
    <jsp:param name="id" value="<%=request.getParameter("id")%>"/>
    <jsp:param name="flag" value="mate"/>
    </jsp:include>
    这是源码
    5楼说的方法应该可行,加\
    <jsp:include page="Tools.html">
    <jsp:param name="id" value="<%=request.getParameter(\"id\")%>"/>
    <jsp:param name="flag" value=\"mate\"/>
    </jsp:include>这样应该就可以了吧
    星的和三角的就是不一样
      

  5.   

    顶<jsp:include page="Tools.html">
        <jsp:param name="id" value="<%=request.getParameter(\"id\")%>"/>
        <jsp:param name="flag" value=\"mate\"/>
    </jsp:include>