aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Scripting Invalid and EL Ignored elements not working? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Scripting Invalid and EL Ignored elements not working?" Watch "Scripting Invalid and EL Ignored elements not working?" New topic
Author

Scripting Invalid and EL Ignored elements not working?

Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
i am unable to disable the scripting neither the EL,

i have included these elements under web.xml ::

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


But then also this is working perfect generating the output.

<%
//ServletRequest pc = pageContext.getRequest();
Enumeration hobbies1 = pc.getParameterNames();
while(hobbies1.hasMoreElements()){
out.print("<tr>");
out.print("<td>");
out.print("<i>");
out.println(hobbies1.nextElement());
out.print("</i>");
out.print("</td>");
out.print("</tr>");
out.println("<br>");
}
%>


Please advice.


SCJP 1.4, SCWCD 5, SCBCD 5, OCPJWSD 5,SCEA-1, Started Assignment Part 2
My blog- http://rkydesigns.blogspot.com
Dee Brown
Ranch Hand

Joined: Jun 14, 2008
Posts: 94
This can occur as a result of a non-standard "web.xml" file.

According to google:
1) For a JSP 2.0 container, you should be using JSTL 1.1, and you should have your web application declared as a Servlets 2.4 web app by using the Servlets 2.4 XML Schema.
2) For a JSP 1.x container, you should be using JSTL 1.0, and you should have your web application declared as a Servlets 2.3 web app by using the Servlers 2.3 DOCTYPE.

I believe the following is correct for my 2.4 installation:

<web-app version="2.4" 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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

...

</web-app>
Amandeep Singh
Ranch Hand

Joined: Jul 17, 2008
Posts: 844
Brown,

I am using this as

<?xml version="1.0" encoding="ISO-8859-1"?>
<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 http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

Is this right to use...
Anand Bhatt
Ranch Hand

Joined: May 30, 2007
Posts: 189
This is already discussed here. In FAQ
Sumit Jindal
Greenhorn

Joined: Oct 11, 2008
Posts: 3
Thanks Dee. I was also having same problem (scripting-invalid not working in DD).
I replaced my web-app spec in DD with yours, and now, scriptlets are disabled.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scripting Invalid and EL Ignored elements not working?