File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Not able to invalidate the scripts using the tags in web.xml

 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used the <scripting-invalid> tags in the web.xml file but still i am not able to stop the scripts in the jsp files. Please help me in finding the issue...

web.xml


jsp
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure to clear the cache. For example, try to make a change in your JSP file, and reload.
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes.. I actually cleared it...
I even deleted the *_jsp.java and *_jsp.class files and then tried.. It still executing the scriptlets
 
Christophe Verré
Sheriff
Pie
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you declare web.xml properly, like explained here ?
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Christophe, I changed it to this..


It fixed the issue... When accessing the jsp i ended up with the following error.. Which i thing is correct. Let me know that is not correct.
org.apache.jasper.JasperException: /bookmark2.jsp(11,6) Scripting elements ( <%!, <jsp:declaration, <%=, <jsp:expression, <%, <jsp:scriptlet ) are disallowed here.


There are two different declartions of web.xml in the page pointed by you and i see that they correspond to particular spec of servlet and JSP. Isn't it ??
How do i verify which version of servlet and JSP i am using?


 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do i verify which version of servlet and JSP i am using?

Like this: http://faq.javaranch.com/java/WhichVersionAmIRunningOn
 
James Tharakan
Ranch Hand
Posts: 580
Eclipse IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic