Hi Dave,

  The code is from tutorial:

 http://struts.apache.org/2.x/docs/struts-2-spring-2-jpa-ajax.html

pom.xml fragments:

    <modelVersion>4.0.0</modelVersion>
    <groupId>quickstart</groupId>
    <artifactId>quickstart</artifactId>
    <version>0.1-SNAPSHOT</version>
    <packaging>war</packaging>
    <name>quickstart</name>

        <dependency>
            <groupId>org.apache.struts</groupId>
            <artifactId>struts2-spring-plugin</artifactId>
            <version>2.0.6</version>
        </dependency>

struts.xml:

<!DOCTYPE struts PUBLIC
"-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd";>
<struts>
    
    <constant name="struts.objectFactory" value="spring" />
    <constant name="struts.devMode" value="true" />
    
    <package name="person" extends="struts-default">
        <action name="list" method="execute" class="personAction">
            <result>pages/list.jsp</result>
            <result name="input">pages/list.jsp</result>
        </action>
        
        <action name="remove" class="personAction" method="remove">
            <result>pages/list.jsp</result>
            <result name="input">pages/list.jsp</result>
        </action>
        
        <action name="save" class="personAction" method="save">
            <result>pages/list.jsp</result>
            <result name="input">pages/list.jsp</result>
        </action>
    </package>
    
</struts>

The action:
  PersonAction.java  
and validator:
  PersonAction-save-validation.xml
are in the same package "quickstart.action" under folder:
   /src/main/java/quickstart/action

Validation is there to prevent creating empty rows in the database, but
doesn't work for some reason. I've also tried changing struts 2 version to
2.0.11.1 with no success.

-- 
View this message in context: 
http://www.nabble.com/Struts-2-xml-validation-doesn%27t-work-tp17342109p17343878.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to