Results 1 to 3 of 3
  1. #1
    Dayanand is offline Member
    Join Date
    Feb 2011
    Posts
    61
    Rep Power
    0

    Default struts-blank.war

    when i import struts-blank.war file from jakarata-struts-1.1, i am getting an error in validation.xml,
    which is there in WEB-INF folder, can any one help out



    validation.xml:-

    <?xml version="1.0" encoding="ISO-8859-1" ?>

    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">

    <form-validation>

    <!--
    This is a blank Validator form file with a commented examples.
    -->

    <global>

    <!-- An example global constant
    <constant>
    <constant-name>postalCode</constant-name>
    <constant-value>^\d{5}\d*$</constant-value>
    </constant>
    end example-->
    </global>

    <formset>

    <!-- An example form
    <form name="logonForm">
    <field
    property="username"
    depends="required">
    <arg0 key="logonForm.username"/>
    </field>
    <field
    property="password"
    depends="required,mask">
    <arg0 key="logonForm.password"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^[0-9a-zA-Z]*$</var-value>
    </var>
    </field>
    </form>
    end example form -->

    </formset>

    <!-- An example formset for another locale
    <formset language="fr">

    <constant>
    <constant-name>postalCode</constant-name>
    <constant-value>^[0-9a-zA-Z]*$</constant-value>
    </constant>
    </formset>
    -->

    </form-validation>

    in the above bold line(fromset) i got the error stating that:-the content element type “formset” is incomplete,it must match “(constant *,form+)”

    what the mistake i have done.?

    thanks in advance
    daya
    Last edited by Dayanand; 06-20-2011 at 09:14 AM.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,863
    Rep Power
    19

    Default

    Your formset is empty.
    It either needs at least one <constant> tag (as the second example) or <form> tag.
    I doubt the struts-blank was intended to be deployed, but was intended as a skeleton to build on.

  3. #3
    eedanna is offline Member
    Join Date
    Feb 2009
    Posts
    1
    Rep Power
    0

    Default

    Hey Deyanand,

    Just go through the below link, hope this will helps you to resolve your issue.

    Struts Validator Framework Example

Similar Threads

  1. Sql insert into blank character
    By robyf1 in forum New To Java
    Replies: 16
    Last Post: 06-03-2011, 09:29 PM
  2. Blank screen
    By dewitrydan in forum New To Java
    Replies: 14
    Last Post: 08-12-2010, 05:19 PM
  3. decorator.jsp problem building Struts Menu in JSP when Struts action is used
    By dkirvan in forum JavaServer Pages (JSP) and JSTL
    Replies: 3
    Last Post: 04-29-2010, 05:33 AM
  4. Blank space
    By sandy1028 in forum New To Java
    Replies: 1
    Last Post: 04-21-2009, 10:00 AM
  5. Print a blank space
    By susan in forum New To Java
    Replies: 2
    Last Post: 07-30-2007, 01:58 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •