• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Scripting Invalid and EL Ignored elements not working?

 
Ranch Hand
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 94
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 856
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...
 
Ranch Hand
Posts: 189
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is already discussed here. In FAQ
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic