This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes scripting-invalid tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "scripting-invalid tag" Watch "scripting-invalid tag" New topic
Author

scripting-invalid tag

Richard Rex
Ranch Hand

Joined: Sep 19, 2005
Posts: 100
Hi,

I have put in the DD the following:

<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" version="2.4">

<jsp-config>
<jsp-property-group>
<url-pattern>*.jsp</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</jsp-config>

</web-app>

I tried this jsp below named example.jsp located under context root,

<html>
<body>
10 x 5 = ${10 * 5} <br>
2 * 3 = <%= 2 * 3 %> <br>
</body>
</html>

The weird part is that it gives an output of

10 x 5 = 50
2 * 3 = 6

It seems that the jsp expression has been evaluated...
This should not work right? As I have stated in the DD that scripting is invalid... Am I missing something here?


"If you fail to plan, you plan to fail."<br /> <br />Chad<br />SCJP 1.4<br />SCWCD 1.4<br />SCBCD 1.3<br />SCDJWS (next)
Richard Rex
Ranch Hand

Joined: Sep 19, 2005
Posts: 100
Hi,

Sorry... false alarm! I haven't refreshed the file... This was my bad!

I was able to get this message now....

org.apache.jasper.JasperException: /example.jsp(4,11) Scripting elements ( <%!, <jsp eclaration, <%=, <jsp:expression, <%, <jsp:scriptlet ) are disallowed here.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: scripting-invalid tag