500 Servlet Exception
Hi all,
I have absolutely no knowledge of this type of stuff and would appreciate help.
Somebody very nicely offered to write a small web app for me and did so and it ran perfectly well on his local machine which used TomCat.
However the website I want to install it on uses Resin 2.1.13 and the program isn't running. I keep getting the following error:
500 Servlet Exception
/home/stude13/public_html/webapps/ROOT/WEB-INF/web.xml:2: unknown element
`version' in web-app
I know enough (I think) to work out that there is a problem in the web.xml file (which i've found) and its to do with the section that refers to versions - copied here:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.1.13" 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">
Does anybody know what changes I have to make to get this application to run?
All thoughts even if its just an idea greatfully appreciated.
Ian
[1167 byte] By [
IDBa] at [2007-10-3 1:18:21]

Try changing it to 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_4.dtd">
<web-app>
That's how it works with Tomcat, it should also work with Resin. But I can't know that for sure since I never used Resin before.
> Try changing it to 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_4.dtd">
> eb-app>
>
>
> That's how it works with Tomcat, it should also work
> with Resin. But I can't know that for sure since I
> never used Resin before.
Hmm...are you sure about that? I thought the web.xml uses a schema as of 2.4 and the OP's post of web.xml was correct?
Shouldnt' yours be
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
Note the use of 2.3 in both places.
which is the web.xml dtd declaration for the servlet 2.3 spec.
Having said that, I rather agree with your thinking that Resin doesnt have support for the 2.4 spec (isnt that where you were coming from?)
ram.