`
semmy
  • 浏览: 32255 次
  • 性别: Icon_minigender_1
  • 来自: 福建
社区版块
存档分类
最新评论

Element type "len" must be followed by either attribute specifications, ">" or

    博客分类:
  • JSF
阅读更多

昨天在公司时,碰到个莫名其妙的bug,找了好久不知道原因,项目的框架是JSF、seam、利用Facelet做视图模板,spring、hibernate。最后发现在js代码模块中,不能含有有“>”或“<”,比如下面的代码,for循环中有个“<”:

var arr=[1,2,3];

var len=arr.length;

for(var i=0;i<len;++i){

    alert(i);

}

  

这样会被facelet解析成标签的开始,所以会提示“Element type "len" must be followed by either attribute specifications, ">" or "/>"”。

解决方案:

把JS代码中"<"换成"&lt";把">"换成"&gt;"

0
0
分享到:
评论

相关推荐

    BUS Hound

    drop.&lt;br&gt;&lt;br&gt;Searching&lt;br&gt;&lt;br&gt;Searching can be performed from the capture window in either the up or down direction by typing the search string in the lower left edit box followed by pressing the up ...

    2009 达内Unix学习笔记

    &gt; &gt;&gt; 输出重定向 。将一个命令的输出内容写入到一个文件里面。如果该文件存在, 就将该文件的内容覆盖; 如果不存在就先创建该文件, 然后再写入内容。 输出重定向,意思就是说,将原来屏幕输出变为文件输出,...

    cucu-a compiler you can understand

    The grammar specifies the structure and syntax rules that must be followed by the source code. In the case of CUCU, the grammar is defined using Extended Backus-Naur Form (EBNF), which is a notation ...

    eda-playground-readthedocs-io-en-latest.zip

    In either the Design or Testbench window pane, type in the following code: module test; initial $display("Hello World!"); endmodule (Note: The code in the right Design pane is compiled first, ...

    swingx包

    and that jUnit.jar is either in that directory as well OR listed on your CLASSPATH.&lt;br&gt;&lt;br&gt;You can build SwingX by going to the command line and typing&lt;br&gt;ant&lt;br&gt;&lt;br&gt;That should be it--this will test...

    Google C++ Style Guide(Google C++编程规范)高清PDF

    On the other hand, you must include the header file for Foo if your class subclasses Foo or has a data member of type Foo. Sometimes it makes sense to have pointer (or better, scoped_ptr) members ...

    schematron规则简单总结

    *[1]/self::subtitle"&gt;A "title" must be immediately followed by a "subtitle".&lt;/assert&gt; &lt;/rule&gt; &lt;/pattern&gt; ``` - **目的**:确保`title`元素后紧跟着`subtitle`元素。 - **上下文**:`title` 表示`title`...

    Keil MDK 编译 ucOS-II 出现的警告和错误解决

    在编译过程中,可能会出现警告 A1085W:Forced user-mode LDM/STM must not be followed by use of banked R8-R14。这是因为编译器检测到强制用户模式的 LDM/STM 指令可能会导致 R8-R14 寄存器的不正确使用。解决...

    MAXQ1850 USB-HID 范例 内有SPI watchdog 代码可供参考 C 代码 编译环境cross studio

    This project has a few special settings that must be followed. 1. Create a new project as shown in section D of the main README.txt 2. Under "Project Explorer" in the upper right corner open the ...

    erlanghandbook

    - **`-module(Module)`**: This attribute defines the name of the module and must be specified first. The module name should match the filename without the `.erl` extension. - **`-export([Func1/Arity1,...

    【原创】【源代码】myshell:操作系统编程-自己用C语言写的Linux下的Shell

    echo &lt;comment&gt; - display &lt;comment&gt; on the display followed by a new line (multiple spaces/tabs may be reduced to a single space) help - display the user manual using the more filter pause - pause ...

    skyhigh.zip

    The device supports the ONFI Read Parameter Page operation, initiated by writing ECh to the Command Register, followed by an address input of 00h. The host may monitor the R/B# pin or wait for the ...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    Each command is terminated with an end-of-line terminator which can be either a carriage-return &lt;c/r&gt; or line feed &lt;l/f&gt;. For RS-232 models, the baud rate and terminator character are selected using ...

    SignalR – Real-time Application Development, 2nd (pdf英文原版第二版)

    With SignalR, the applications stay connected and will generate notifications when something happens either from the system or by other users thus giving new opportunities to enter into this new, ...

    PowerCommands for Visual Studio 2008

    This command is normally followed by a Paste Class command, which renames the class to avoid a compilation error. It can be executed from a single project item or a project item with dependent sub ...

    kgb档案压缩console版+源码

    P in equation (1), that you can find either x from y or y from x. Note also that both computations can be done incrementally. As the leading characters of y are known, the range of possible x narrows,...

    小雨伞环境文件

    # be placed in the first column followed by the corresponding host name. # The IP address and the host name should be separated by at least one # space. # # Additionally, comments (such as these) may ...

    Tajima 绣花机 花型数据编码格式

    All entries in the header seem to be 2 ASCII characters followed by a colon, then it’s value trailed by a carriage return. First is the ‘LA’ entry, which is the design name with no path or ...

Global site tag (gtag.js) - Google Analytics