Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Scripting Invalid

 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ranchers,

I want to disable scripting in JSP file. The JSP 2.0 specs define a way to do so.

I have entered the following in the web.xml of my application

<

However, the scripts are not being ignored in my JSP's. They are working as normal. Can anyone suggest what might be wrong ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe your previous pages are still in the cache. If you're using Tomcat, go to "work\Catalina\localhost" and remove everything under "org\apache\jsp" of your application.
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have tried clearing the cache under the work directory. But still the problem persists. Could this be something else ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oops, the tag is <scripting-invalid>, not <scriptlet-invalid>
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The JSP is called index.jsp. It is in the welcome file list



The URL I am using to access the JSP is

and


I tried both.. but not the desired or expected results
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
... and FYI, I am using Tomcat 5.5.23 with JDK 1.4 compatibility package.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I pointed out in a previous post, try <scripting-invalid> instead of <scriptlet-invalid>
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well I thought <scripting-invalid> should have solved the problem but to my surprise, the problem still persists. I cleared the cache once again but the same results..
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And you have restarted the container ?
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yea.. I did that.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you check the logs ?

One more thing. Did you configure the web-app tag properly ?

<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" >
[ April 25, 2007: Message edited by: Satou kurinosuke ]
 
Chetan Raju
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Finally its working!! I updated the web-app tag to the one you pasted and restarted the container. Thank you very much.

But what exactly does the attributes in the <web-app> mean ?
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means that you are using version 2.4 of the servlets specifications.
The jsp-config tag was introduced from this version.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic