This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I am trying to disable all the scripting elements in a JSP page by using "<scripting-invalid>" tag in DD. Even though I unable to disable scripting elements. They(scripting elements) are being processed by JSP and I am able to see the result of Scripting elements. But it should not happen. We must see scripting code without prcessing. Right!!! Please help me to sortout this issue.......
<jsp-property-group> <description> Special property group for JSP Configuration JSP example. </description> <display-name>JSPConfiguration</display-name> <url-pattern>*.jsp</url-pattern> <scripting-invalid>true</scripting-invalid>
try this out.. cheers Sami
Joined: Nov 21, 2004
Hi Sami, I am using Tomcat 5.0.28. I did like this.
<%out.print("This is text in JSP");%> <%out.print("This is another text in JSP");%> Value: <%=9%>
Originally posted by sudhakar: Hi, ... I am able to see the result of Scripting elements. But it should not happen. We must see scripting code without prcessing. Right!!!
Hi, if you disable scripting in web.xml i.e.
Then you should get a Translation Error if the jsp engine encounters any scripting element in your JSP page. So you don't get to see any "scripting code without processing". (Refer JSP 2.0 specs Table JSP.3-3)
BUT the EL ignored setting behaves differently i.e. if we have
Then we get to see the EL expressions in their unevaluated form (NO Translation Error in this case).