how can i use request parameter in struts2 if tag

a 夏天 提交于 2019-12-04 17:43:33

Try with

<s:if test="%{#parameters.login[0]=='failed'}">

The two problems were in your code:

  1. The = sign is an assignment, not equals ==;
  2. Parameters are saved in the Map<String, String[]>, so each parameter could have multiple values and accessed by the specifying an index.

    The last option also described here: why doesn't the if tag evaluate params properly.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!