`

错误:is quoted with " which must be escaped when used within the value .

    博客分类:
  • web
 
阅读更多

Attribute value request.getAttribute("pageNo") is quoted with " which must be escaped when used within the value

今天突然遇到这个奇怪的问题:google了一下,发现如下原因:

转载自:csdn博客

 

遇到这样的问题在网上找了解决方案现总结2点:

解决以上问题有两种解决方案:

 

方案一

 

   <jsp:include page="split_page.jsp">
    <jsp:param name="jspUrl" value="<%=jspUrl%>" />
    <jsp:param name="lineSize"
     value="<%=request.getAttribute("lineSize")%>" />
    <jsp:param name="searchFlag" value="T" />
   </jsp:include>


这里,在 value 中只是使用了 URL 而已。

然后报错:

Attribute value request.getAttribute("lineSize") is quoted with " which must be escaped when used within the value


啊,无语,在另一个页面中这么写就没错啊?

Google。

发现说是什么 apache 升级到 6.0 后出现的 bug。

详情见:

[#MMB-1706] quoted must be escaped - MMBase

然后跟踪链接,这里说的很详细了:

Possible user code changes required when we upgrade to Tomcat 6.0.18

按照上面的说法,这么改写: 

 <jsp:include page="split_page.jsp">
    <jsp:param name="jspUrl" value="<%=jspUrl%>" />
    <jsp:param name="lineSize"
     value='<%=request.getAttribute("lineSize")%>' />
    <jsp:param name="searchFlag" value="T" />
 </jsp:include>

其实只是把 value="" 改成 value=''。

 

方案二

 

把代码改成

   <jsp:include page="split_page.jsp">
    <jsp:param name="jspUrl" value="<%=jspUrl%>" />
    <jsp:param name="lineSize"
     value="<%=request.getAttribute(/"lineSiz/")%>" />
    <jsp:param name="searchFlag" value="T" />
   </jsp:include>

 

虽然在编辑器中会显示有错  但是运行起来是没有问题,tomcat版本的问题。

分享到:
评论
1 楼 Matol 2013-04-22  
很傻比的一个错误,太扯淡;

相关推荐

    2009 达内Unix学习笔记

    集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...

    微软内部资料-SQL性能优化5

    Each index row in node pages contains an index key (or set of keys for a composite index) and a pointer to a page at the next level for which the first key value is the same as the key value in the ...

    acpi控制笔记本风扇转速

    original input filename is used as the AML output filename, with an ".aml" extension. Implemented a generic batch command mode for the AcpiExec utility (execute any AML debugger command) (Valery ...

    php.ini-development

    directive because it is not set or is mistyped, a default value will be used. ; The value can be a string, a number, a PHP constant (e.g. E_ALL or M_PI), one ; of the INI constants (On, Off, True, ...

    Sakemail

    retrieved and SendMessage is a boolean function (maybe someone has pressed the cancel btn).- Fixed a bug when the subject field is too large.9/2/981.5.1- Fixed a bug with a message within a message ...

    Git-2.21.0-64-bit.zip

    value for the HEAD symbolic ref when the namespace feature is in use, which has been corrected. * "git am -i --resolved" segfaulted after trying to see a commit as if it were a tree, which has ...

    Code of practice for information security management AS/NZS ISO/IEC 17799:2001

    It can be used as a basis from which, for example, a corporate policy or an inter-company trading agreement can be developed. The guidance and recommendations provided throughout this Standard should...

    unidac5.3.8src

    Bug with Locate when a NULL value is present in the index field is fixed Bug with IndexFieldNames when DataTypeMapping is enabled is fixed Bug with freeing memory in the TDADataSet.Lookup method is ...

    img Quectel_BC35-G&BC28;&BC95; R2.0_AT_Commands_Manual_V1.4.pdf

    They can be used to make the input more human-readable. On input, at least a carriage return is required. A newline character is ignored so it is permissible to use carriage return/line feed pairs on ...

    Devart UniDAC v5.3.8 Source

    -Bug with Locate when a NULL value is present in the index field is fixed -Bug with IndexFieldNames when DataTypeMapping is enabled is fixed -Bug with freeing memory in the TDADataSet.Lookup method is...

    android lint performance probe帮助.zip

    This is a simple tool to help pinpoint performance bottlenecks in individual ...For example, the first Lint check to run might get the blame for the initial cache misses when resolving calls, types, etc.

    Sublime Text Build 3124 x64 Setup.exe

    This is controlled with the show_definitions setting. Build errors are now shown inline at the location where they occurred. This is controlled with the show_errors_inline setting. Added a menu item ...

    PLSQL.Developer v11.0.0.1762 主程序+ v10中文包+keygen

    When the read-only status of a file changes this will be propagated to a window associated with that file The logon form now has shortcuts for all fields, is sizeable to show long database names in ...

    'FrontEnd Plus' The GUI for the fast JAva Decompiler.

    UNIX the last argument should be single-quoted: jad -o -r -sjava -dsrc 'tree/**/*.class' In a case you want to check the accuracy of the decompilation or just curious, there is an option -a which ...

    The Boundary Element Method with Programming

    Another new feature of the book is that it deals with the implementation of the method on parallel processing hardware. I. M. Smith, who has been involved in programming the finite element method for ...

    MyDAC7.6.11

    Bug with using quoted field names in the IndexFieldNames property is fixed Bug in TMyStoredProc with closing dataset when the Disconnected property is True is fixed Bug with processing macros named ...

    TCP_IP Professional Reference Guide.pdf

    material is quoted with permission, and sources are indicated. A wide variety of references are listed. Reasonable efforts have been made to publish reliable data and information, but the author and ...

    hibernate3.6 文档(pdf 格式)

    1.1.5. Building with Maven ................................................................................. 9 1.1.6. Startup and helpers .................................................................

    python3.6.5参考手册 chm

    Python参考手册,官方正式版参考手册,chm版。以下摘取部分内容:Navigation index modules | next | Python » 3.6.5 Documentation » Python Documentation contents What’s New in Python ...PEP 343: The ‘with...

    CakePHP 1.3 Application Development Cookbook.pdf

    line tools, which can be used to perform intensive tasks and any other type of non interactive processing. This chapter introduces the reader to CakePHP shells by starting with the process of ...

Global site tag (gtag.js) - Google Analytics