本帖最后由 FaDufendouLiang 于 2012-12-04 10:14:20 编辑

解决方案 »

  1.   

    JSP
    <form action="<%=path %>/regest" method="post">
    WEB配置文件<?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
    http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <!-- struts2 滤镜配置  -->
    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <!--Spring ApplicationContext载入 ,必须-->
    <listener>
    <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>
    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
       classpath:*/springApplicationContext.xml
            </param-value>
    </context-param>
      

  2.   

    <action name="regest" class="regestAction" method="save"  >写错了Messages: regestAction 
    Unable to instantiate Action, regestAction, defined for 'regest' in namespace '/'regestAction 不可以 实例 化 regestAction <action name="regest" class="com.xx.regestAction" method="save"  >你的包路径去那里了
      

  3.   

    我都是这样注入的
    <bean id="fpFindPersonMessageAction" class="net.aykj.findPerson.action.FindPersonMessageAction" scope="prototype" />
    <bean id="fpIndexFindPersonMessageAction" class="net.aykj.findPerson.action.IndexFindPersonMessageAction"  scope="prototype"/>
    <bean id="fpFindPersonMessageService" class="net.aykj.findPerson.serviceimpl.FindPersonMessageServiceImpl" />
    <bean id="fpFindPersonMessageDAO" class="net.aykj.findPerson.daoimpl.FindPersonMessageDAOImpl" />用的是半自动的那种,还用了注解