补充,另一个例子的连接,http://www.52jsp.com/LoadArticle.do?pk=71
同样,提交了以后,还是什么也不出来。
有谁用这两个例子的?真的都管用?还要注意些什么?

解决方案 »

  1.   

    structs-config.xml定义了LoadArticle的action map没有?
      

  2.   

    检查一下返回页面在structs-config.xml中的配置与action类返回值是否匹配。
      

  3.   

    会楼上的,我当然有检查,是一样的。
    在action类里我用的是success
    我的structs-config.xml
    <?xml version="1.0" encoding="ISO-8859-1" ?><!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>
    <form-beans>
    <form-bean name="EmpIstFormAction" type="com.javapro.struts.EmpIstFormAction"/>
    </form-beans> <action-mappings type="org.apache.struts.action.ActionMapping">
    <action path="/login" type="com.javapro.struts.LoginAction"
    name="EmpIstFormAction" scope="session" input="/login.jsp" validate="false">
    <forward name="success" path="/success.jsp" redirect="true"/>
    </action>
    </action-mappings>
    </struts-config>
      

  4.   

    各位不好意思,问题解决了。
    原因是我的这个应用的web.xml设置不正确导致的。
    中间少了这么一段
        <init-param>
          <param-name>application</param-name>
          <param-value>ApplicationResources</param-value>
        </init-param>
        <init-param>
          <param-name>config</param-name>
          <param-value>/WEB-INF/struts-config.xml</param-value>
        </init-param>
    大概是因为没有指定config导致了无论我怎么配置struts-config.xml都不起作用了。
    对不起大家了!问题是我的分数给谁呢?要不大家再给写如何debug的建议吧。
      

  5.   

    给个如何debug的建议吧,也好让我结贴呀。
    介绍一下号的工具也可以,不过最好能有用法。
      

  6.   

    我没有找到好的调试工具。
    一般我在jbuilder中利用断点进行调试。
    可能有用来测试的web框架,你可从apache.org上找到。