aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes jsp-config query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "jsp-config query" Watch "jsp-config query" New topic
Author

jsp-config query

Ashu Jain
Ranch Hand

Joined: Feb 24, 2008
Posts: 73
Is something wrong with my DD

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name></display-name>
<description></description>
<jsp-config>
<jsp-property-group>
<url-pattern>/*.do</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</jsp-config>
<servlet>
<servlet-name>JSPTest</servlet-name>
<description>Chapter JSP test</description>
<jsp-file>/BasicCounter.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>JSPTest</servlet-name>
<url-pattern>/BasicCounter.do</url-pattern>
</servlet-mapping>
</web-app>

It gave me error after i added jsp-config element. Error is <jsp-config> must be declared.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

You are using the 2.3 version ? USe 2.4 instead. Remove the DOCTYPE, and use the web-app tag shown in this FAQ.


[My Blog]
All roads lead to JavaRanch
Ashu Jain
Ranch Hand

Joined: Feb 24, 2008
Posts: 73
Got it that doctype was refering to 2.3 DTD. I removed docType from web.xml and give following web.xml

<?xml version="1.0" encoding="ISO-8859-1"?>
<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">
<display-name></display-name>
<description></description>
<jsp-config>
<jsp-property-group>
<url-pattern>*.do</url-pattern>
<scripting-invalid>true</scripting-invalid>
</jsp-property-group>
</jsp-config>
<servlet>
<servlet-name>JSPTest</servlet-name>
<description>Chapter JSP test</description>
<jsp-file>/BasicCounter.jsp</jsp-file>
</servlet>
<servlet-mapping>
<servlet-name>JSPTest</servlet-name>
<url-pattern>/BasicCounter.do</url-pattern>
</servlet-mapping>


</web-app>

It is giving error "Document root element must match DOCTYPE root = null. What does that mean? How to rectify this.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Also remove the xml tag at the top.
Ashu Jain
Ranch Hand

Joined: Feb 24, 2008
Posts: 73
Does not seem to work still.

It gives error that Document root element "web-app" must match DOCTYPE root "null".
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Which container are you using ?
Surajsingh Thakur
Ranch Hand

Joined: Sep 09, 2008
Posts: 124

Depends on the container,perhaps ..



BE (Computer Science) SCJP 4 (80%) SCWCD 5 (97%) IBM CAD(98%) IBM CAppD(100%) IBM SD(100%)
Ashu Jain
Ranch Hand

Joined: Feb 24, 2008
Posts: 73
I am using tomcat 4.1.37 and java 1.4.2
Ashu Jain
Ranch Hand

Joined: Feb 24, 2008
Posts: 73
u were right. Things started working after i installed tomcat 5.X

Thanks a lot
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jsp-config query
 
Similar Threads
Problem with scripting-invalid
JSTL not working on tomcat 4.1.18
How to check scripting-invalid
parse error with web-app when starting tomact
Scripting-Invalid(Usage)