Checking request parameter value in Struts2 tag

后端 未结 2 764
温柔的废话
温柔的废话 2021-01-14 17:42

I have the following code in my jsp:



2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-14 18:16

    I just found that #parameters['test'] returns an array of String. So when you say

    
    

    you are actually comparing a string '1' with an array {'1'} hence it returns false. Maybe this is because there are two parameters with same name

    correct thing to do would be

    
    

提交回复
热议问题