What are the effects of disabling scripting in a JSP?

前端 未结 2 454
你的背包
你的背包 2020-12-18 08:39

I recently read how to disable scripting for an entire application by adding the following elements to the web.xml file:


    

        
2条回答
  •  没有蜡笔的小新
    2020-12-18 09:02

    It disables scriptlets (<% %>), scriptlet expressions (<%= %>) and scriptlet declarations (<%! %>), which is a way of embedding raw Java code inside a JSP file. Using scriptlets has indeed been discouraged since the birth of taglibs/EL in favor of better readable and maintainable code.

    See also:

    • Java EE 5 tutorial - disabling scripting

提交回复
热议问题