当前位置: 代码迷 >> Java Web开发 >> struts验证框架的问题?
  详细解决方案

struts验证框架的问题?

热度:149   发布时间:2008-03-12 13:28:35.0
struts验证框架的问题?
我加入了验证框架,但是tomcat6.0启动,为何不加载验证文件 ?
下面为:
web.xml文件
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
  <servlet>
    <servlet-name>MemberGradeServlet</servlet-name>
    <servlet-class>org.esms.servlet.MemberGradeServlet</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>MemberGrade</servlet-name>
    <servlet-class>org.esms.servlet.MemberGrade</servlet-class>
  </servlet>
  <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
      <param-name>debug</param-name>
      <param-value>3</param-value>
    </init-param>
    <init-param>
      <param-name>detail</param-name>
      <param-value>3</param-value>
    </init-param>
    <load-on-startup>0</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>MemberGradeServlet</servlet-name>
    <url-pattern>/servlet/MemberGradeServlet</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>MemberGrade</servlet-name>
    <url-pattern>/servlet/MemberGrade</url-pattern>
  </servlet-mapping>
  <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
</web-app>

struts-config.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.2//EN" "http://struts.apache.org/dtds/struts-config_1_2.dtd">

<struts-config>
  <data-sources />
  <form-beans >
    <form-bean name="addMemberGradeForm" type="org.esms.struts.form.AddMemberGradeForm" />

  </form-beans>

  <global-exceptions />
  <global-forwards />
  <action-mappings >
    <action
      attribute="addMemberGradeForm"
      input="/addMemberGrade.jsp"
      name="addMemberGradeForm"
      path="/addMemberGrade"
      scope="request"
      type="org.esms.struts.action.AddMemberGradeAction"
      validate="true">
      <forward name="failed" path="#" />
      <forward name="success" path="#" />
    </action>

  </action-mappings>

  <message-resources parameter="org.esms.struts.ApplicationResources" />
  
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml" />
  </plug-in>
</struts-config>


tomcat启动信息

2008-3-12 13:20:52 org.apache.catalina.core.AprLifecycleListener init
信息: The Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.5.0_09\bin;D:\Program Files\Apache Software Foundation\Tomcat 6.0\bin
2008-3-12 13:20:53 org.apache.coyote.http11.Http11Protocol init
信息: Initializing Coyote HTTP/1.1 on http-8889
2008-3-12 13:20:53 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 843 ms
2008-3-12 13:20:53 org.apache.catalina.core.StandardService start
信息: Starting service Catalina
2008-3-12 13:20:53 org.apache.catalina.core.StandardEngine start
信息: Starting Servlet Engine: Apache Tomcat/6.0.10
log4j:WARN No appenders could be found for logger (org.apache.struts.util.PropertyMessageResources).
log4j:WARN Please initialize the log4j system properly.
2008-3-12 13:20:59 org.apache.catalina.core.ApplicationContext log
信息: ContextListener: contextInitialized()
2008-3-12 13:20:59 org.apache.catalina.core.ApplicationContext log
信息: SessionListener: contextInitialized()
2008-3-12 13:20:59 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8889
2008-3-12 13:20:59 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2008-3-12 13:20:59 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/62  config=null
2008-3-12 13:20:59 org.apache.catalina.startup.Catalina start
信息: Server startup in 6860 ms

请高手解决?
搜索更多相关主题的帖子: struts  框架  验证  

----------------解决方案--------------------------------------------------------
  相关解决方案