Suppress empty parameters using param tag

前端 未结 1 1080
旧巷少年郎
旧巷少年郎 2020-12-21 19:26

I have written JSP that I used with many actions. It has a link with parameters

The link:



        
相关标签:
1条回答
  • 2020-12-21 19:54

    Well that line <s:param name="suppressEmptyParameters" value="true"/> doesn't make sense, and it should be removed from the <s:param> docs.

    The <s:param name="type" value="%{type}" suppressEmptyParameters="true"/> is correct way of suppressing empty parameters and it isn't working with not String-s because of the bug WW-4275.

    Meanwhile, until the next version is released, you can use toString() method to avoid ClassCastException exception.

    <s:param name="type" value="type.toString()" suppressEmptyParameters="true"/>
    
    0 讨论(0)
提交回复
热议问题