Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-910

Servlet Generator for Dynamic Web Project is creating errornous web.xml files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Obsolete
    • Icon: Minor Minor
    • None
    • 2.0.0.Beta3
    • common, upstream
    • None

      When creating a Servlet using the New File - Servlet wizard in a Dynamic Web Project in a clean workspace, the web.xml file is not properly created. Specifically, this is what gets generated;
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app id="WebApp_ID" version="2.4" 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">
      <display-name>
      DemoFlaw</display-name>
      <servlet>
      <description>
      </description>
      <display-name>
      DemoServlet</display-name>
      <servlet-name>DemoServlet</servlet-name>
      <servlet-class>
      org.ccccd.webone.DemoServlet</servlet-class>
      </servlet>
      <servlet-mapping>
      <servlet-name>DemoServlet</servlet-name>
      <url-pattern>/DemoServlet</url-pattern>
      </servlet-mapping>
      <welcome-file-list>
      <welcome-file>index.html</welcome-file>
      <welcome-file>index.htm</welcome-file>
      <welcome-file>index.jsp</welcome-file>
      <welcome-file>default.html</welcome-file>
      <welcome-file>default.htm</welcome-file>
      <welcome-file>default.jsp</welcome-file>
      </welcome-file-list>
      </web-app>

      The extra whitespace at the end of the start tag <servlet-class> causes the deployment to fail. This is occuring on 100% of the computers in the Java Web Class that I am teaching.

      -Steve

        1. web.xml
          0.9 kB
        2. Wizard - NewServlet1.JPG
          Wizard - NewServlet1.JPG
          28 kB
        3. Wizard - NewServlet2.JPG
          Wizard - NewServlet2.JPG
          39 kB

            Unassigned Unassigned
            northgorky Steve Davidson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: