Is it possible to access struts2 variable in jsp scriptlet?

后端 未结 3 2047
盖世英雄少女心
盖世英雄少女心 2020-12-30 18:08

Is it possible to access struts2 variable in jsp scriptlet?

If I have struts2 variable like


         


        
3条回答
  •  情歌与酒
    2020-12-30 18:42

    You can even use the request object to get the action variable. For example, if you have a variable String userName in the action, you can use

    <%
    String userName = (String) request.getAttribute("userName");
    %>
    

提交回复
热议问题