Enable/Disable Scripting Elements in JSP

By: Baski Viewed: 153302 times    

To enable or disable the evaluation of scripting elements within a page, you can use the <scripting-invalid> element. By default, scripting is enabled. To disable scripting for all the JSP pages in your application, you can use a fragment similar to the following:


<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</jsp-config>
To disable scripting for a specific page, you can use a snippet such as the following:
<jsp-config>
<jsp-property-group>
<url-pattern>noscript.jsp</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</jsp-config>

Most Viewed Articles (in JSP )

Latest Articles (in JSP)

Comment on this tutorial