在web.xml中加入
 <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
  </taglib>  <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
  </taglib>  <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
  </taglib>

解决方案 »

  1.   

    注意form 中的action和struts-config中的action的path属性必须一致
      

  2.   

    Jsp就这么简单:<html>
    <body>
        <title>Example </title>
    <body>    <form action="example.do", method="post">
           please input a striung<br>
           <input type="text"   name="input" size="20"><br>
           
           <input type="submit" value="Submit" name="submit"
        </form>
    <html>
      

  3.   

    先看看IE地址栏中访问example.do的URL是否正确,确认是不是路径问题.
      

  4.   

    路径问题,改成下面这样试一试:
    <html>
    <body>
        <title>Example </title>
    <body>    <form action="<%=contextPath%>/example.do", method="post">
           please input a striung<br>
           <input type="text"   name="input" size="20"><br>
           
           <input type="submit" value="Submit" name="submit"
        </form>
    <html>
      

  5.   

    soryy,用这个
    <html>
    <body>
        <title>Example </title>
    <body>
    <%String contextPath = request.getContextPath();%>
        <form action="<%=contextPath%>/example.do", method="post">
           please input a striung<br>
           <input type="text"   name="input" size="20"><br>
           
           <input type="submit" value="Submit" name="submit"
        </form>
    <html>
      

  6.   

    //最好用Struts的form标签:
    <html:form action="example">
           please input a striung<br>
           <input type="text"   name="input" size="20"><br>
           
           <input type="submit" value="Submit" name="submit"
        </form>
    </html:form>
      

  7.   

    点击提交后,IE地址URL为:http://127.0.0.1/example.do
      

  8.   

    不会吧,你用上面的哪种方法,把Jsp代码再贴出来:
    另外你out.print(request.getContextPath());是什么告诉我!!
      

  9.   

    to xunyiren(从jsp开始):
    结果是:
    message Invalid path /example was requested
    description The request sent by the client was syntactically incorrect (Invalid path /example was requested).此时URL是:http://127.0.0.1/example/example.do
      

  10.   

    现在的JSP:<%@ page contentType="text/html; charset=gb2312" %><html>
    <body>
        <title> Example </title>
    </body>
    <%String contextPath = request.getContextPath();%>
        <form action="<%=contextPath%>/example.do", method="post"> &Ccedil;&euml;&Ecirc;&auml;&Egrave;&euml;&Ouml;&micro;
    <input type="text" name="test"/>
    <br><br>
    <input type="submit" name="Submit">
    <input name="reset" type="reset">
    </form></html>
      

  11.   

    sorry, &Ccedil;&euml;&Ecirc;&auml;&Egrave;&euml;&Ouml;&micro;是几个汉字
      

  12.   

    <form action="<%=contextPath%>/example.do", method="post">
    怎么没配 type?也就是你的bean
    给你一个例子
    <form name="EquipFetchreceiptsVOE" type="com.sinosoft.vo.equipment.EquipFetchreceiptsVOE" onsubmit="return validateEquipFetchreceiptsVOE(this);" action="/fetchReceiptsAction.do">
      

  13.   

    现在对了,我也不知道那里搞错了。不过/example.do中的“/”是不该要的