我把目录结构写出来,求大神帮我完整的说下,名字不要改变了.St-----|
            |---src--|
                        |----com.cn.servlet----|
                        |             |---GoodClassManage.java  
                        |------WEB-ROOT----|
                        |----------|----GoodClassInfo---|
                                      |----GoodClassManage.jsp-----|              
                        |              |----WEB-INF--|
                                                   |---class--| 
                                                               |---com.cn.servlet--|
                                                                             |--GoodClassManage.class
                                      |---web.xml
表单在GoodClassManage.jsp里
<form action=""怎么弄,麻烦大家每一步写清楚了.感激!^_^^_^
web.xml
 <servlet>
<servlet-name>GoodClassManage</servlet-name>
<servlet-class>com.cn.servlet.GoodClassManage</servlet-class>
  </servlet>
  <servlet-mapping>
<servlet-name>GoodClassManage</servlet-name>
<url-pattern>/GoodClassManage</url-pattern>
  </servlet-mapping>
目前是一直报404错
HTTP Status 404 - /SMarkt/GoodClassInfo/src/GoodClassManagetype Status reportmessage /SMarkt/GoodClassInfo/src/GoodClassManagedescription The requested resource 
(/SMarkt/GoodClassInfo/src/GoodClassManage) is not available
JSPServletweb.xml

解决方案 »

  1.   

    /GoodClassManage
    或者../GoodClassManage
      

  2.   

    哥,这个真不行,刚又试了HTTP Status 404 - /GoodClassManagetype Status reportmessage /GoodClassManagedescription The requested resource (/GoodClassManage) is not available.
    咋着啊~
      

  3.   

    能访问不  http://localhost:8080/St/GoodClassManage 
      

  4.   

    不能访问啊!
    改成<%=request.getContextPath()%>/GoodClassManage 和${pageContext.request.contextPath}/GoodClassManage 就能了,但是为什么?
      

  5.   

    <%=request.getContextPath()%>这是获取服务器根路径的 你可以用火狐看看源代码 就是类似 http://localhost:8080/St/
      

  6.   

    <%=request.getContextPath()%>/跳转的文件名,你试试 <form action="<%=request.getContextPath()%>/InputPositiSer" method="post">不知道是不是你的问题
      

  7.   

    哥,这是你jsp写的有问题啊,一般在head标签中都会写<base href="<%=basePath%>">,你肯定是没有写,谁写action的时候都加上前缀呀,这也太麻烦了吧