Making scriptlets invalid in JSPs

[亡魂溺海] 提交于 2019-12-02 02:38:58

You need to configure it the other way round.

<scripting-invalid>true</scripting-invalid>
<el-ignored>false</el-ignored>

When the <scripting-invalid> is set to true, then the container will throw an exception when scriptlets (those <% %>, <%= %> and <%! %> things) are still used.

You definitely don't want to set <el-ignored> to true, otherwise you won't be able to use expression language (those ${} things), which is the recommended way of accessing the model and executing functions in JSPs. If you disable it as well, then all your JSPs would be useless and can be plain static HTML files as good.

I think the jsp's are already converted to Java servlets. Try regenerating the jsp to servlets.

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