-----Mensagem original-----
De: Beau Hebert [mailto:[EMAIL PROTECTED]]
Enviada: quinta-feira, 2 de Maio de 2002 18:47
Para: [EMAIL PROTECTED]
Assunto: Just when I thought I was starting to understand....


I'm new to JSP and have been doing a little tutorial from O'reilly for the
past week in an attempt to run servlets using packages. I'm getting close,
but am running into a problem with my web.xml file (I think). This is what
my doctype header looks like:

<?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";>
<servlet>
<servlet-name>login</servlet-name>
<servlet-class>com.onjava.login</servlet-class>
</servlet>

and this is my Tomcat Startup Error:

Parse Error at Line 1 Column 10
org.xml.sax.SAXParseException: Element type "servlet" must be declared

Any help is greatly appreciated. Thanks in advance.

Beau


well based on your example your complete web xml could look something like
this

<?xml version="1.0" encoding="UTF-8"?>
<!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>
  <servlet>
    <servlet-name>login</servlet-name>
    <servlet-class>com.onjava.login</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>login</servlet-name>
    <url-pattern>/login</url-pattern>
  </servlet-mapping>
</web-app>
 check all tags..
hope this helps
wills

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to