This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

scripting-invalid  RSS feed

 
Greenhorn
Posts: 17
  • 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?
 
Greenhorn
Posts: 3
  • 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
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Did u restart the server. Just a guess.
 
Fernando Galdino
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, I did it and nothing happened
 
Ranch Hand
Posts: 431
  • 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.
 
Ranch Hand
Posts: 150
  • 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
  • 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
  • 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">
 
Ranch Hand
Posts: 152
  • 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
  • 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
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!