这是我的JSP页面
<html:html lang="true">
 
  <body>
    <form action="/search" method="post" >
      
<input type="text"  name="data_id" >
<input type="submit"  >
    </form>
  </body>
</html:html>
这是struts配置文件
<action-mappings >
    <action
      input="index.jsp"
      path="/search"
      name="/searchForm"
      type="com.yourcompany.struts.action.SearchAction" >
      <forward name="success" path="/quote.jsp"/>
<forward name="faliue" path="/error.jsp"/>
</action>
为啥在JSP中提交总是找不到页面 说是找不到/search  哪里配置不对啊 救救我啊

解决方案 »

  1.   

    form action="/search" 
    form action="search.do" 
      

  2.   

     <form action="/search" method="post" > 
    里面/search改成 search.do
      

  3.   

    <form action="/search" method="post" > 
    改成:
    加:
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
    + request.getServerName() + ":" + request.getServerPort()
    + path + "/";
    %>

    <form action="<%=basePath%>/search.do" method="post" >