JSTL - using variables in an xpath?

前端 未结 2 1447
遇见更好的自我
遇见更好的自我 2021-01-07 04:20

Here is what I would like to do:


    
         


        
2条回答
  •  生来不讨喜
    2021-01-07 04:34

    Found the answer:

    Using JSTL Data as XPath Variables

    Scoped variables can be used in XPath expressions ($implicitObject:variableName) similar to how they are used in EL (${implicitObject.variableName}). If the implicit object is omitted, scopes will be searched in standard order. Note that the “.” and “[]” notations cannot be used for accessing bean properties.

    from the JSTL Quick Reference Sheet (pdf)

    So my code becomes:

    
    
    

提交回复
热议问题