How can we disable java code or scripting in JSP page?

Report
Question
7 views

Please explain why do you think this question should be reported?

Report Cancel

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> Above url-pattern will disable scripting for all the JSP pages but if you want to disable it only for specific page, you can give the JSP file name itself.

Please follow and like us:

About the Author