Programming Tutorials

Enable/Disable Scripting Elements in JSP

By: Baski in JSP Tutorials on 2007-10-04  

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>





Add Comment

* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in JSP )

Latest Articles (in JSP)