此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
楼主【gpm】截止到2008-06-23 18:20:09的历史汇总数据(不包括此帖):
发帖数:0                  发帖分:0                  
结贴数:0                  结贴分:0                  
未结数:0                  未结分:0                  
结贴率:-------------------结分率:-------------------
如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html

解决方案 »

  1.   

     <s:form action="login.action" method="post"> 
    试试吧,我记得不用加的,不过看错误提示似乎要加上
      

  2.   

    这明显是找不到login.action,你又不肯贴web.xml,你的applicationContext.xml存在什么地方,加入spring的web包了没有?有没有配置spring的监听器?加入spring的struts插件没有?
      

  3.   

    回new_bird_0001,一时疏忽忘记贴了,抱歉抱歉。applicationContext.xml发布在WEB-INF/CLASSES下,spring加了2.0的全模块包。struts2-spring-plugin-2.0.11.1.jar也已经copy到lib下了。
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
    http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <filter>
    <filter-name>struts-cleanup</filter-name>
    <filter-class>
    org.apache.struts2.dispatcher.ActionContextCleanUp
    </filter-class>
    </filter> <filter>
    <filter-name>struts2</filter-name>
    <filter-class>
    org.apache.struts2.dispatcher.FilterDispatcher
    </filter-class>
    </filter> <filter-mapping>
    <filter-name>struts-cleanup</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping> <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping> <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener> <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    </web-app>
      

  4.   

    No configuration found for the specified action: 'login' in namespace: ''. Form action defaulting to 'action' attribute's literal value.
    他说:在你的配置文件中的 ''命名空间中找不到login这个action。
    你调用的是/MyTest/login 根据struts2的定义命名空间应该为/MyTest。所以根据描述,请根据红色部分修改,加入命名空间。<package name="MyTest"  extends="struts-default" namespace="/MyTest">
      <action name="login" class="loginAction"> 
              <result name="success">/ok.jsp </result> 
              <result name="login">/login.jsp </result> 
      </action>
    </package> 
      

  5.   

    有种可能是,你的程序根本没找到struts.xml
    你把struts.xml放在什么位置了,这个应该是放在classpath下面,也就是你的src中,或者看看名字写错了没有
      

  6.   


    是package名字,不是命名空间,楼主并没有定义命名空间,还有提示/MyTest/login中的MyTest应该是项目名,不是楼上所说的命名空间
    像你这样定义的话就变成/MyTest/MyTest/login了
      

  7.   

    回TRMeister: 还是不行,错误提示没什么变化。
      

  8.   

    My God!!!!Landor2004 亲爱的Landor2004 你真强了,怪我太粗心了,居然把名字打错了,struts.xml敲成了sturts.xml。麻烦各位了。
      

  9.   

    朋友,我现在也出现了和你一样的问题,现在也和你遇到这个问题时一样急,也很无奈做做好心人吧,把你这个项目的原代码发给我吧,谢谢了!!!!!! 包大了,哥哥就发个包的列表给我就可以了  邮箱:  [email protected]  
      

  10.   

    [email protected]  给我也来个包。谢谢!!