| Author |
scripting-invalid
|
Fernando Galdino
Greenhorn
Joined: Jan 08, 2004
Posts: 17
|
|
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
Joined: Jun 03, 2005
Posts: 3
|
|
|
What is the name of your file which has this jsp scriptlet?
|
 |
Fernando Galdino
Greenhorn
Joined: Jan 08, 2004
Posts: 17
|
|
The name and the directory is: <tomcat_dir>\webapps\SCWCDStudy\testScripting.jsp
|
 |
Anand Ko
Ranch Hand
Joined: Dec 03, 2003
Posts: 79
|
|
|
Did u restart the server. Just a guess.
|
Anand<br />SCJP 1.4, SCWCD 1.4, SCEA 5.0(1/3)
|
 |
Fernando Galdino
Greenhorn
Joined: Jan 08, 2004
Posts: 17
|
|
|
Yes, I did it and nothing happened
|
 |
S.L.Narayanan
Ranch Hand
Joined: Apr 01, 2005
Posts: 431
|
|
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.
|
SCJP 1.4, SCWCD 1.4, SCBCD 1.3, NEXT--->IBM XML
|
 |
PNS Subramanian
Ranch Hand
Joined: Jul 13, 2004
Posts: 150
|
|
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
Joined: Apr 01, 2005
Posts: 431
|
|
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
Joined: Apr 01, 2005
Posts: 431
|
|
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
Joined: Aug 12, 2004
Posts: 152
|
|
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
Joined: Jul 13, 2004
Posts: 150
|
|
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
Joined: Jan 08, 2004
Posts: 17
|
|
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
|
 |
 |
|
|
subject: scripting-invalid
|
|
|