<html:link page="/login_success.do">
 不用在golbal中配置aaction的,只在你的ationmapping 中配置即可,当然你的web.xml要配置对。

解决方案 »

  1.   

    页面改成
    <html:link forward="userAction.do"> 返回</html:link>
    试试还有你的ACTION位置和PACKAGE的声明检查下
      

  2.   

    web.xml应该是对的,因为我其他的action 都可以forward的
    按你的样子改了,还是不行。依然是那样的错误晕
      

  3.   

    配置:
    web.xml相关部分:
      <servlet-mapping>
        <servlet-name>action</servlet-name>
        <url-pattern>*.do</url-pattern>
      </servlet-mapping>struts-config相关部分:
        <action-mappings>
            <action
                path="/login_success"
                type=" 指定是哪一个包下的哪一个claas"
                name="loginForm"
                scope="request"
                input="/logon.jsp"
                validate="true" />
        </action-mappings>jsp相关部分:
    <html:link page="/login_success.do">
      

  4.   

    补:mapping里面加上你的forward元素即可
      

  5.   

    to hanml(sunmoon):
      我检查过了,web.xml 设置跟你的一样的。 struts-config中除了 少了2个属性 input和validate
    没写,其他的也正确。 我想问一下 input跟 validate是用户登录验证的时候才用的吧? 但是我这里是已经登录过了,并已经跳到其他的页面。现在想通过一个“返回”链接回登录成功的页面,在返回时想到 action 里面处理一下session的数据,(不是form的数据)。但是这样子,它连action都进不了
      

  6.   

    注意你的struts-config里面配置的action class如果是path="/userInfoAction"
    那么你jsp里面也要用这个名称啊.<html:link page="/userInfoAction.do">
      

  7.   

    恩,对的.是这样写.但还是报原来的错误:No action instance for path /userInfoAction could be created
      

  8.   

    struts-config 文件:
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
                                   "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <struts-config>
     <data-sources/>
     <form-beans type="org.apache.struts.action.ActionFormBean">
     ...
      <form-bean name="userInfoForm" type="com.ipa.informationControl.userInfo.form.UserInfoForm"/>
       </form-beans>
     <global-forwards type="org.apache.struts.action.ActionForward">
      ...  
      <forward name="loginsuccess" path="/userInfoAction.do"/>
     </global-forwards>
     <action-mappings type="org.apache.struts.action.ActionMapping">
      ...  
      <action name="userInfoForm" path="/userInfoAction" scope="request" type="com.ipa.informationControl.userInfo.action.UserInfoAction">
       <forward name="loginSuccess" path="/accessControl/loginSuccess.jsp"/>
      </action>
      ...
     </action-mappings>
    </struts-config>a.jsp:
    <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
    <%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>聊天窗口</title>
    <SCRIPT language=JavaScript> 
    var currentpos,timer; function initialize() 

    timer=setInterval("scrollwindow()",10); 

    function sc(){ 
    clearInterval(timer); 

    function scrollwindow() 

    //currentpos=window.frames['chatframe'].document.body.scrollTop;
    //alert(currentpos); 
    window.frames['chatframe'].scrollTo(0,99999); 

    </script>
    </head><body onload="scrollwindow();">
    <table id="list">
        <tr>
    <td align=center width="100%">
    <iframe  id="chatframe" src="http://localhost:8080/ipa/chat/chatlist.jsp" width=570 height=160 scrolling="auto" style="pixelBottom: 80"><></iframe>                
    </td>
    </tr>
    </table>
    <table width="460" height="301" border="0">
      <tr>
        <td width="713" height="30" align="center" valign="top"><p>交谈记录</p>
          <html:form  method="post" action="chatAction" >   
            <input type="text" name="sentence" size="50">
            <input type="submit" name="Submit" value="提交">
          </html:form>
          <p>口语学习 专业学习</p>
        </td>
      </tr>
      <TR ><td align="center"><html:link page="/userInfoAction.do"> 返回</html:link></td></TR>
    </table>
    </body>
    </html>userInfoAction 文件:
    package com.ipa.informationControl.userInfo.action;import org.apache.struts.action.*;import com.ipa.informationControl.userInfo.form.UserInfoForm;import javax.servlet.http.*;import net.sf.hibernate.HibernateException;public class UserInfoAction {
      public ActionForward execute(ActionMapping mapping, ActionForm actionForm,
                                   HttpServletRequest request,
                                   HttpServletResponse response) throws
          HibernateException {
       System.out.println("-------------------------------------"); // test
       HttpSession session = request.getSession();
        UserInfoForm user = (UserInfoForm) session.getAttribute("userInfoForm");
        System.out.println("----------------------------------++++++++---");
        request.setAttribute("usetInfoForm",user);
        return mapping.findForward("loginSuccess");
      }
    }在a.jsp点击“返回”,就抱错了
      

  9.   

    我晕,UserInfoAction 都没有继承action这个类,咋找?