本帖最后由 rcedw 于 2012-07-04 07:38:26 编辑

解决方案 »

  1.   

    应该是struts。xml的问题!<!-- <constant name="struts.enable.DynamicMethodInvocation" value="false" /> -->
      <constant name="struts.devMode" value="ture" />  <package name="relationship" namespace="/relationship" extends="struts-relationship">
      <action name="/friend" >
      <result>/Friend.jsp</result>
      </action>
      </package>  
      <package name="relationship1" namespace="/" extends="struts-relationship1">
      <action name="index" >
      <result>/index.jsp</result>
      </action>
      </package>  好好检查一下,可能就是缺点东西,例如“/”
      

  2.   

    你的action标签为啥就只写了一个 <action name="/friend" >没有class属性?还有name属性不用写/号直接写成<action name="friend" class="com.***.***">
      

  3.   

    There is no Action mapped for action name friend<action name="/friend" >
      <result>/Friend.jsp</result>
      </action>
    这里面配置的不对,你可以看看视频附的源码,看下差在哪http://localhost:8080/BlloseWorld
    这个没有错,因为
    <package name="relationship1" namespace="/" extends="struts-relationship1">
      <action name="index" >
      <result>/index.jsp</result>
      </action>配置的没问题。
      

  4.   

    又看见了楼主类似的帖子,建议楼主先不要创新,先把视频中源码的脉络累清。
    1、输入http://localhost:8080/BlloseWorld/的时候是可以正常访问index.jsp
    这个其实找的是<welcome-file>index.jsp</welcome-file>中的jsp,没有执行struts。xml里东西
    2、http://localhost:8080/BlloseWorld/relationship/friend
    <action name="/friend" >里面不应该加“/”,而且应该是你没有配置对应friend的class类,错误说的很明白,There is no Action mapped for action name friend。