如何避免JSP文件中的Java代码?

早过忘川 提交于 2020-10-08 05:34:14

问题:

I'm new to Java EE and I know that something like the following three lines 我是Java EE的新手,我知道类似以下三行

<%= x+1 %>
<%= request.getParameter("name") %>
<%! counter++; %>

is an old school way of coding and in JSP version 2 there exists a method to avoid Java code in JSP files. 是一种旧式的编码方式,在JSP版本2中,存在一种避免JSP文件中的Java代码的方法。 Can someone please tell me the alternative JSP 2 lines, and what this technique is called? 有人可以告诉我替代的JSP 2行,以及这种技术的名称是什么?


解决方案:

参考一: https://stackoom.com/question/DKfl/如何避免JSP文件中的Java代码
参考二: https://oldbug.net/q/DKfl/How-to-avoid-Java-code-in-JSP-files
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!