<A href="compAction.do" target=main>公司管理</A><BR>
点击之后,报:
javax.servlet.ServletException: Request [/compAction] does not contain handler parameter named 'action '.
org.apache.struts.actions.DispatchAction.unspecified(DispatchAction.java:215)
org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:249)
org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:187)
org.springframework.web.struts.DelegatingActionProxy.execute(DelegatingActionProxy.java:110)
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414)
javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
struts-config.xml没有问题
可能JS的问题,请问下怎么解决?如果要写JS,最好把JS代码贴下,谢谢

解决方案 »

  1.   

    管JS什么事阿 你是直接点击这个超链接就请求compAction.do吗?你把Struts-config.xml中的<action path="/compAction" 贴一下吧!
      

  2.   

    javax.servlet.ServletException: Request [/compAction] does not contain handler parameter named 'action '.
    你应该追踪到compAction这个里面去
      

  3.   

    <A href="compAction.do" target=main>公司管理 </A> <BR> 这里的提交类写全路径并附带你的方法。
      

  4.   

    <action path="/compAction"
            type="org.springframework.web.struts.DelegatingActionProxy"
            name="CompForm" scope="request"  parameter="action">
          <forward name="compSuccess" path="/system/sysPage/XT_02.jsp" />
          <forward name="compFailure" path="/system.jsp" />
        </action>
      

  5.   

    贴一下<action 的配置
     不出我所料就是?action=方法名没写
      

  6.   

    你去servlet-action.xml里面去搜索/compAction 看看class指向那个类 然后打开这个类 看看里面的那个方法是执行公司管理的然后把你的<A href="compAction.do" target=main>公司管理  </A>  <BR> 
    改成
    <A href="compAction.do?action=方法名" target=main>公司管理  </A>  <BR> 
      

  7.   

    <form method="post">
    </from>看看你method="post" 在form里有没
      

  8.   

    把<form> 内的 method=“post” 这样就可以了,struts与spring集成内不能用get提交
      

  9.   

    参考
    http://www.cctieba.cc/tiezi.aspx?tieziId=309
      

  10.   

    badegg38,实在是太感谢你了我就是这个问题