tags:

views:

176

answers:

2

I am getting the following error while saving my faces-config.xml:

the markup document following the root element must be well formed

And my xml is:

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

<managed-bean>
    <managed-bean-name>UserBean</managed-bean-name>
    <managed-bean-class>com.jsfcompref.register.UserBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope>
</managed-bean>

<navigation-rule>
    <from-view-id>/register.jsp</from-view-id>
    <navigation-case>
        <from-outcome>register</from-outcome>
        <to-view-id>/confirm.jsp</to-view-id>
    </navigation-case>
</navigation-rule>

</faces-config>

I have closed all the tags properly, still I am getting this error.

+4  A: 

The open tag <faces-config> is missing. Put it between <DOCTYPE...> and <managed-bean>.

BalusC
what more obvious than that :)
Bozho
+1  A: 

Use any JSF IDE, so that you are not bothered with such markup issues. Virtually all IDE's supporting JSF provide a GUI for handling faces-config.xml file

nash