facebook

[Closed] Server Application problem on the demo.

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #270141 Reply

    I had try to do the demo (and modify it a bit) but I am getting a problem when I launch the application server. I am using tomcat 4.1 and it would launch fine until I tried to configure it with MyEclipse. Here is the start of the error that is being thrown by Tomcat, my web.xml file and my faces config. I’m not sure if the last 2 or needed.

    Can someone get me started on what is causing the problem and how I correct?

    Thanks

    ————————-Error I am getting below————————————

    May 16, 2007 9:02:37 AM org.apache.commons.modeler.Registry loadRegistry
    INFO: Loading registry information
    May 16, 2007 9:02:38 AM org.apache.commons.modeler.Registry getRegistry
    INFO: Creating new Registry instance
    May 16, 2007 9:02:38 AM org.apache.commons.modeler.Registry getServer
    INFO: Creating MBeanServer
    May 16, 2007 9:02:39 AM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on port 8080
    Starting service Tomcat-Standalone
    Apache Tomcat/4.1.24
    May 16, 2007 9:02:43 AM org.apache.commons.digester.Digester error
    SEVERE: Parse Error at line 2 column 221: Document root element “web-app”, must match DOCTYPE root “null”.
    org.xml.sax.SAXParseException: Document root element “web-app”, must match DOCTYPE root “null”.
    at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
    at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)

    ————————Web XML file below —————————————

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <web-app xmlns=”http://java.sun.com/xml/ns/j2ee&#8221; xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance&#8221; version=”2.4″ xsi:schemaLocation=”http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd”&gt;
    <context-param>
    <param-name>javax.faces.CONFIG_FILES</param-name>
    <param-value>/WEB-INF/faces-config.xml</param-value>
    </context-param>
    <servlet>
    <servlet-name>Faces Servlet</servlet-name>
    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
    <load-on-startup>0</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>Faces Servlet</servlet-name>
    <url-pattern>*.faces</url-pattern>
    </servlet-mapping>
    </web-app>

    ———————-faces config file below —————————————-

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE faces-config PUBLIC “-//Sun Microsystems, Inc.//DTD JavaServer Faces Config 1.1//EN” “http://java.sun.com/dtd/web-facesconfig_1_1.dtd”&gt;

    <faces-config >
    <managed-bean>
    <managed-bean-name>UserBean</managed-bean-name>
    <managed-bean-class>com.MyProg.bean.UserBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
    <managed-property>
    <description>Field for the User Name</description>
    <property-name>userName</property-name>
    <property-class>java.lang.String</property-class>
    <value></value>
    </managed-property>
    <managed-property>
    <description>Field for the user Password</description>
    <property-name>password</property-name>
    <property-class>java.lang.String</property-class>
    <value></value>
    </managed-property>
    </managed-bean>
    <navigation-rule>
    <from-view-id>/Login.jsp</from-view-id>
    <navigation-case>
    <from-outcome>success</from-outcome>
    <to-view-id>/Welcome.jsp</to-view-id>
    </navigation-case>
    <navigation-case>
    <from-outcome>failure</from-outcome>
    <to-view-id>/Login.jsp</to-view-id>
    </navigation-case></navigation-rule>
    <navigation-rule>
    <from-view-id>/Welcome.jsp</from-view-id>
    </navigation-rule></faces-config>

    #270153 Reply

    Riyad Kalla
    Member

    You cannot run a JSF application under Tomcat 4, you need to use Tomcat 5 or later.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: [Closed] Server Application problem on the demo.

You must be logged in to post in the forum log in