File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scripting-invalid

 
Fernando Galdino
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to make invalid for a JSP to have scriptin elements, I put in the DD:

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


and in the jsp:

Testing if the scripting is disabled:
<%
out.println("scripting enable");
%>


But this JSP still work, does anybody know what I'm doing wrong?
 
Varathan Nathan
Greenhorn
Posts: 3
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the name of your file which has this jsp scriptlet?
 
Fernando Galdino
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name and the directory is:

<tomcat_dir>\webapps\SCWCDStudy\testScripting.jsp
 
Anand Ko
Ranch Hand
Posts: 79
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did u restart the server. Just a guess.
 
Fernando Galdino
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I did it and nothing happened
 
S.L.Narayanan
Ranch Hand
Posts: 431
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try doing the following:

1.Clear the .class files created for the jsps. They will be inside 'work' directory.

2. Check whether the directory structure is correct.Like web.xml is inside <tomcat_dir>\webapps\SCWCDStudy\WEB-INF.

3. And also see while starting the tomcat, whether it shows any error due to declarations in DD. I have faced some problems because of the order of declarations.

Try these and get back with your output.
 
PNS Subramanian
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could anyone tell me as to where we need to give the


I get an exception when i start tomcat (4.1.30) with the above tags in my web.xml file.
 
S.L.Narayanan
Ranch Hand
Posts: 431
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Subramanian

There is an order that has to be maintained when u add ur declarations in DD(web.xml)...while starting itself, along with the error it will show the order...see that order and change ur web.xml accordingly...
 
S.L.Narayanan
Ranch Hand
Posts: 431
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Or if it is showing any exceptions as "element 'jsp-config' must be declared" then add the following header...

<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/web-app_2_4.xsd
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
 
shiva viswanathan
Ranch Hand
Posts: 152
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,

Tomcat 4.1 may not support this property . I think this version supports
JSP 1.1 only

This feature might be available only in JSP 2.0 which is supprtoed by Tomcat 5.0

In fact I was having a similar problem where I was trying on Weblogic 6.1 which supports only JSP 1.1

You can probably give a try on Tomcat 5.0

Hope this helps
Shiva
 
PNS Subramanian
Ranch Hand
Posts: 150
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guess Shiva is right - tomcat 4.1 still gives me an exception.

Isn't this version sufficient for the exam or do we need to know features that would work in version 5 as well?
 
Fernando Galdino
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see what I was doing wrong.

I update my web.xml to 1.4 and now everything is woking

<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/web-app_2_4.xsd" version="2.4">


Thanks all
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic