贴上代码:
<%@ page contentType="text/html; charset=GBK" language="java" errorPage="" %>
<%@taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>添加资讯</title>
</head>
<body>
<table width="780" align="center" cellspacing="0"
background="images/bodybg.jpg">
<tr>
<td >
<h3 align="center">请输入资讯详情</h3>
<div align="center">
<s:actionerror cssClass="error"/>
<s:form action="AddInfo" >
<s:textfield name="infoTitle" label="标题"  />
<s:textfield name="infoOrder" label="优先级"/>
<s:textfield name="infoAuthor" label="作者"/>
<s:textarea name="content" cols="50" row="8" label="内容"/>
<s:textfield name="infoUrl" label="URL"/><br> 
   <s:submit value="提交" />
</s:form>
</div>
</td>
</tr>
</table>
</body>
</html>

解决方案 »

  1.   


    给个method。
    <s:form action="AddInfo" method="post">
      

  2.   

    我发现我把action换成其他的Action就可以提交。应该是Action有问题。大家帮我看看Action哪里出了问题。用的是SSH框架。麻烦各位大牛了。package com.ns.Action;import com.opensymphony.xwork2.ActionContext;import java.util.*;
    import com.ns.Action.base.BaseAction;
    import com.ns.Service.AppManager;
    import com.ns.exception.AppStoreException;public class AddInfoAction  extends BaseAction {
    String infoTitle;
    int infoOrder;
    String infoAuthor;
    String content;
    String infoUrl;
    Date infoTime;
    public String excute() throws Exception {
    Integer infoId=mgr.addInfo(infoTitle, infoOrder, infoAuthor, content, infoUrl, infoTime);
    if(infoId!=null&&infoId>0) {
    return SUCCESS;
    }
    else {
    addActionError("添加资讯失败,请重新填写。");
    return "failure";
    }
    }
    public String getInfoTitle() {
    return infoTitle;
    }
    public void setInfoTitle(String infoTitle) {
    this.infoTitle = infoTitle;
    }
    public int getInfoOrder() {
    return infoOrder;
    }
    public void setInfoOrder(int infoOrder) {
    this.infoOrder = infoOrder;
    }
    public String getInfoAuthor() {
    return infoAuthor;
    }
    public void setInfoAuthor(String infoAuthor) {
    this.infoAuthor = infoAuthor;
    }
    public String getContent() {
    return content;
    }
    public void setContent(String content) {
    this.content = content;
    }
    public String getInfoUrl() {
    return infoUrl;
    }
    public void setInfoUrl(String infoUrl) {
    this.infoUrl = infoUrl;
    }
    public Date getInfoTime() {
    return infoTime;
    }
    public void setInfoTime(Date infoTime) {
    this.infoTime = infoTime;
    }

    }
      

  3.   

    <action name="AddInfo" class="com.ns.Action.AddInfoAction">
    <result name="success">/AddInfo.jsp</result>
    <result name="input">/error.jsp</result>
    <result name="failure">/error.jsp</result>
    <!-- 显式引用系统默认拦截器栈 -->
    <interceptor-ref name="defaultStack"/>
    </action>
      

  4.   

    你的包名有问题,你这样写系统会认为是约定,因为约定优于配置,所以建议包名中不要有Action
      

  5.   

    是配置写的有问题,还是LZ的BASEAction有问题啊
      

  6.   

    你form中的action  是不是少个.do?
      

  7.   

    如果debug时,无法进入ACTION,可以肯定不是ACTION类的问题,而是struts.xml配置文件或页面表单提交的问题,在你的项目中你设置的访问action的方式是什么?
      

  8.   

    一个字母害死人呀!那个excute 应该是execute