For components, .jwc should start with (note that component-specification) : <?xml version="1.0"?> <!DOCTYPE component-specification PUBLIC "-//Apache Software Foundation//Tapestry Specification 4.0//EN" "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd">
Shing --- jake123 <[EMAIL PROTECTED]> wrote: > > Hi, I have a problem when I try to call my index > page that contain 7 custom > components. One of them is a login component. this > component generates a > org.apache.tapestry.util.xml.DocumentParseException > that says: > > Unable to read > context:/WEB-INF/components/Login.jwc: Document root > element > "component-specification", must match DOCTYPE root > "page-specification". > > It also point out that the error are in my Login.jwc > file: > > context:/WEB-INF/components/Login.jwc, line 5, > column 42 > 1 <?xml version="1.0"?> > 2 <!DOCTYPE page-specification PUBLIC "-//Apache > Software > Foundation//Tapestry Specification 4.0//EN" > 3 > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> > 4 > 5 <component-specification allow-body="no"> > 6 <description>It renders a login form or a change > password > form.</description> > 7 > 8 <!-- LOGIN FORM --> > 9 <component id="loginForm" type="Form" > > 10 <binding name="listener" value="listener:onLogin" > /> > > I see no error in this file, and if I try to open > the file in my web browser > the entire file is opened so I guess that there is > no XML error in th e > file. > > Does anybody know how to solve this error? > > the entire Login.jwc look like this: > <?xml version="1.0"?> > <!DOCTYPE page-specification PUBLIC "-//Apache > Software Foundation//Tapestry > Specification 4.0//EN" > > "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd"> > > <component-specification allow-body="no"> > <description>It renders a login form or a change > password > form.</description> > > <!-- LOGIN FORM --> > <component id="loginForm" type="Form" > > <binding name="listener" value="listener:onLogin" > /> > <binding name="delegate" value="beans.delegate" > /> > </component> > > <!-- INPUT BOXES --> > <component id="inputUsername" type="TextField" > > <binding name="value" value="userName" /> > > <binding name="displayName" > value="literal:Username"/> > <binding name="validators" > value="validators:required,minLength=5" /> > </component> > > <component id="inputPassword" type="TextField"> > <binding name="value" value="password" /> > <binding name="hidden" value="true" /> > <binding name="displayName" > value="literal:Password"/> > <binding name="validators" > value="validators:required,minLength=5" > /> > </component> > > <!-- LABELS --> > <component id="userNameLabel" type="FieldLabel" > > > <binding name="field" > value="component:inputUsername" /> > </component> > > <component id="passwordLabel" type="FieldLabel" > > > <binding name="field" > value="component:inputPassword" /> > </component> > > <!-- VALIDATION --> > <property name="loginCurrentFieldTracking" /> > > <component id="loginErrors" type="For" > > <binding name="source" > value="beans.delegate.fieldTracking" /> > <binding name="value" > value="loginCurrentFieldTracking" /> > </component> > > <component id="loginError" type="Delegator" > > <binding name="delegate" > value="loginCurrentFieldTracking.errorRenderer" > /> > </component> > > <component id="loginIsInError" type="If"> > <binding name="condition" > value="loginCurrentFieldTracking.inError" /> > </component> > > <!-- CHANGE PASSWORD FORM --> > <component id="changePasswordForm" type="Form" > > <binding name="listener" > value="listener:onChangePassword" /> > <binding name="delegate" value="beans.delegate" > /> > </component> > > <!-- INPUT BOXES --> > <component id="inputOldPassword" type="TextField" > > > <binding name="value" value="oldPassword" > /> > <binding name="hidden" value="true" /> > <binding name="displayName" value="literal:Old > Password"/> > <binding name="validators" > value="validators:required,minLength=5" /> > </component> > > <component id="inputNewPassword" > type="TextField"> > <binding name="value" value="newPassword" /> > <binding name="hidden" value="true" /> > <binding name="displayName" > value="literal:New Password"/> > <binding name="validators" > value="validators:required,minLength=5" > /> > </component> > > <component id="inputConfirmNewPassword" > type="TextField"> > <binding name="value" > value="confirmNewPassword" /> > <binding name="hidden" value="true" /> > <binding name="displayName" > value="literal:Confirm New Password"/> > <binding name="validators" > value="validators:required,minLength=5" > /> > </component> > > <!-- LABELS --> > <component id="oldPasswordLabel" > type="FieldLabel" > > <binding name="field" > value="component:inputOldPassword" /> > </component> > > <component id="newPasswordLabel" > type="FieldLabel" > > <binding name="field" > value="component:inputNewPassword" /> > </component> > > <component id="confirmNewPasswordLabel" > type="FieldLabel" > > <binding name="field" > value="component:inputConfirmNewPassword" /> > </component> > > <!-- VALIDATION --> > <property > name="changePasswordCurrentFieldTracking" /> > > <component id="changePasswordErrors" type="For" > > <binding name="source" > value="beans.delegate.fieldTracking" /> > <binding name="value" > value="changePasswordCurrentFieldTracking" /> > </component> > > <component id="changePasswordError" > type="Delegator" > > <binding name="delegate" > value="changePasswordCurrentFieldTracking.errorRenderer" > /> > </component> > > <component id="changepasswordIsInError" type="If"> > <binding name="condition" > === message truncated === Home page : http://uk.geocities.com/matmsh/index.html ___________________________________________________________ All new Yahoo! Mail "The new Interface is stunning in its simplicity and ease of use." - PC Magazine http://uk.docs.yahoo.com/nowyoucan.html --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]