Subject: Re: HELP web-app does not allow servlet here
From: "Patrick Schilling" <[EMAIL PROTECTED]>
 ===
Hello,

I know that the parser can be sensitive to the order of the tags.  Try
placing diplay-name and description first, then servlet, then
servlet-mapping, and finally taglib.

ie.

<web-app>
    <display-name>...</display-name>
    <description>...</description>
    <servlet>...</servlet>
    <servlet-mapping>...</servlet-mapping>
    <taglib>...</taglib>
</web-app>

Hope this helps.  Perhaps someone could explain the details of "why" on
this, but it gave me troubles as well when I first started out.

-Patrick

"jambo" <[EMAIL PROTECTED]> wrote in message
news:ad82kg$k84$[EMAIL PROTECTED]...
> Anyone know why I get this error.  I'm just trying to run javamail wewb
> example but the I get a XML parsing exception. I've checked the dtd and it
> looks OK to me.  Is there a bug in the parser?
>
> Apache Tomcat/4.0
> PARSE error at line 38 column -1
> org.xml.sax.SAXParseException: Element "web-app" does not allow "servlet"
> here.
>
> <!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>FilterServlet</servlet-name>
>     <display-name>FilterServlet</display-name>
>     <description>no description</description>
>     <servlet-class>FilterServlet</servlet-class>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>FilterServlet</servlet-name>
>     <url-pattern>compose</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>FilterServlet</servlet-name>
>     <url-pattern>errordetails</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>FilterServlet</servlet-name>
>     <url-pattern>login</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>FilterServlet</servlet-name>
>     <url-pattern>logout</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>FilterServlet</servlet-name>
>     <url-pattern>send</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>FilterServlet</servlet-name>
>     <url-pattern>messageheaders</url-pattern>
>   </servlet-mapping>
>   <servlet-mapping>
>     <servlet-name>FilterServlet</servlet-name>
>     <url-pattern>messagecontent</url-pattern>
>   </servlet-mapping>
>   <servlet>
>     <servlet-name>AttachmentServlet</servlet-name>
>     <display-name>AttachmentServlet</display-name>
>     <description>no description</description>
>     <servlet-class>AttachmentServlet</servlet-class>
>   </servlet>
>   <servlet-mapping>
>     <servlet-name>AttachmentServlet</servlet-name>
>     <url-pattern>attachment</url-pattern>
>   </servlet-mapping>
>   <display-name>JspDemo</display-name>
>   <description>no description</description>
>   <taglib>
>
> <taglib-uri>http://java.sun.com/products/javamail/demo/webapp</taglib-uri>
>     <taglib-location>lib/jtl.jar</taglib-location>
>   </taglib>
> </web-app>
>
>
>
>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to