1 Reply Latest reply on Sep 2, 2003 12:21 PM by Ingo Dettling

    java.lang.IllegalArgumentException: addChild:  Child name 'S

    narendra Newbie

      I get this exception when I try to deploy a cactus test case in jboss.
      java.lang.IllegalArgumentException: addChild: Child name 'ServletRedirector' is not unique

      My web.xml contains only these lines. where have I gone wrong?

      <?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>


      <servlet-name>ServletRedirector</servlet-name>

      <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class
      >



      </web-app>

        • 1. Re: java.lang.IllegalArgumentException: addChild:  Child nam
          Ingo Dettling Newbie

          Hi,
          I do not see any servlet mappings. Try something like this:

          <web-app>


          <filter-name>FilterRedirector</filter-name>
          <filter-class>org.apache.cactus.server.FilterTestRedirector</filter-class>


          <filter-mapping>
          <filter-name>FilterRedirector</filter-name>
          <url-pattern>/FilterRedirector</url-pattern>
          </filter-mapping>


          <servlet-name>ServletRedirector</servlet-name>
          <servlet-class>org.apache.cactus.server.ServletTestRedirector</servlet-class>



          <servlet-name>JspRedirector</servlet-name>
          <jsp-file>/cactus-test/jspRedirector.jsp</jsp-file>


          <servlet-mapping>
          <servlet-name>ServletRedirector</servlet-name>
          <url-pattern>/ServletRedirector</url-pattern>
          </servlet-mapping>

          <servlet-mapping>
          <servlet-name>JspRedirector</servlet-name>
          <url-pattern>/JspRedirector</url-pattern>
          </servlet-mapping>

          </web-app>

          Good luck,
          Ingo