I did try giving this. But getting IllegaArgumentException. unknown version.
There are 2 dtd's I see in the WEB-INF folder
web-app_2_2.dtd
web-app_2_3.dtd
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<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">
what should I change this to?
Thanks.
[nobr]What server are you using for your JSPs?
Put this at the top of a JSP, and it should tell you the relevant info
<h2> Server Info </h2>
Server info = <%= application.getServerInfo() %> <br>
Servlet engine version = <%= application.getMajorVersion() %>.<%= application.getMinorVersion() %><br>
Java version = <%= System.getProperty("java.vm.version") %><br>
With Servlet 2.3, you need JSTL1.0
With Servlet 2.4, you need JSTL1.1
You need to
- copy jstl.jar/standard.jar to your web-inf/lib directory.
If you have Servlet2.4 (eg Tomcat 5) then you need to have your web.xml file as version 2.4. Copy the standard xml file from the ROOT directory.
With a Servlet2.4, your web.xml should look something like this:
<?xml version="1.0" encoding="UTF-8"?>
<!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>
...
with 2.4 it should be something like this:
<?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">
Note the second one removes the <%!DocType tag and replaces it with XMLNS stuff in the web-app tag.
Good luck,
evnafets[/nobr]
thanks for your response.
I am using Servlet 2.4 and Tomcat 5....
Where to get the web.xml from?
you mentioned
If you have Servlet2.4 (eg Tomcat 5) then you need to have your web.xml file as version 2.4. Copy the standard xml file from the ROOT directory.
Where is this ROOT directory?
thanks.