我是一个新手,请各位前辈多多关照,在此先谢谢了! 
      我用struts写了一个分页实现了增删改查,带了一个登录也面对登录也面(只进行了不为空和密码长度的)验证,符合条件进入查询也面,我按着要求通过了验证 、、但是进入查询页面后一点查询的链接(通过struts-config.xml到action类)怎么有回到登录验证的也面了???,我就是这没弄明白,除了把struts-config.xml中action标签中的validate属性改成false还有别的办法吗???这是config文件  
        <?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="pageListForm" type="org.apache.struts.validator.DynaValidatorForm"> 
      <form-property name="user" type="com.jq.struts.bean.User"/> 
    </form-bean>   </form-beans>   <global-exceptions /> 
  <global-forwards /> 
  <action-mappings > 
    <action 
      input="/index.jsp" 
      name="pageListForm" 
      path="/pageList" 
      scope="request" 
      type="com.jq.struts.action.PageListAction" 
      validate="false" 
      > 
      <forward name="go" path="/pageList.jsp" /> 
      <forward name="go1" path="/findall.jsp" /> 
      <forward name="error" path="/error.jsp" /> 
      <forward name="update" path="/update.jsp" /> 
    </action>   </action-mappings>   <message-resources parameter="com.jq.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>

解决方案 »

  1.   

    好像是你用的是带验证的formbean,你点超链接进action,可formbean中没值,
    看看这个可以么,超链接跳到这里
    <action 
          input="/index.jsp" 
          path="/page" 
          scope="request" 
          type="com.jq.struts.action.PageListAction" 
          > 
          <forward name="show" path="/页面" /> 
        </action> 
      

  2.   

    你点击链接到action的过程中会对与这个action绑定的表单进行验证,可是你这个时候actionfom里面的属性没有值,这样验证肯定不会通过就跳到了登陆页面。
      

  3.   

    问题就是出在actionform验证上,你可以试试确定actionform的属性值,这样就可以了!
        因为你的配置中已经把action 和actionform绑定了,得通过验证才可以呀!
      

  4.   

    那么怎样才能在第一次通过验证的时保证下次验证的时候frombean中有值啊???