• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scripting-invalid

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the name of your file which has this jsp scriptlet?
 
Fernando Galdino
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The name and the directory is:

<tomcat_dir>\webapps\SCWCDStudy\testScripting.jsp
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Did u restart the server. Just a guess.
 
Fernando Galdino
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, I did it and nothing happened
 
Ranch Hand
Posts: 431
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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">
 
Ranch Hand
Posts: 152
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
straws are for suckers. tiny ads are for attractive people.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic