aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Not able to invalidate the scripts using the tags in web.xml 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 "Not able to invalidate the scripts using the tags in web.xml" Watch "Not able to invalidate the scripts using the tags in web.xml" New topic
Author

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

James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

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


SCJP 6
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Make sure to clear the cache. For example, try to make a change in your JSP file, and reload.


[My Blog]
All roads lead to JavaRanch
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

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

Joined: Nov 24, 2005
Posts: 14688
    
  16

Did you declare web.xml properly, like explained here ?
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

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
Marshal

Joined: Mar 22, 2005
Posts: 42596
    
  65
How do i verify which version of servlet and JSP i am using?

Like this: http://faq.javaranch.com/java/WhichVersionAmIRunningOn


Ping & DNS - my free Android networking tools app
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

Thanks guys...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Not able to invalidate the scripts using the tags in web.xml