JSP中有<form action="/SUB" method="post">
<input type="submit" name="OK" value="确定">1,JSP和SERLET在一个目录中
  但点击确定铵钮出现不能调用SERLVET2.JBUILDER中JSP文件和SERLET文件默认不是在同一个目录中,这是为什么?

解决方案 »

  1.   

    SERLET是什么,servlet吗,应该把编译好的class文件放在web-inf/classes目录里面
      

  2.   

    你的Servlet有没有在Web.xml中配置,你的Servlet class有没有放到WEB-INF/classes目录下?
      

  3.   

    servlet放在web-inf/classes不行哪,
      

  4.   

    servlet还需要在web.xml里面进行配置
      

  5.   

    infowain(infowain)
    如何配置呢???,谢谢大家帮助!
      

  6.   

    <?xml version="1.0" encoding="ISO-8859-1"?><!DOCTYPE web-app
        PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
        "http://java.sun.com/dtd/web-app_2_3.dtd"><web-app>
      <display-name>Welcome to Tomcat</display-name>
      <description>
         Welcome to Tomcat
      </description><!-- JSPC servlet mappings start -->
        <servlet>
            <servlet-name>ViewServlet</servlet-name>
            <servlet-class>servlet.ViewServlet</servlet-class>
        </servlet>    <servlet-mapping>
            <servlet-name>ViewServlet</servlet-name>
            <url-pattern>/ViewServlet</url-pattern>
        </servlet-mapping><!-- JSPC servlet mappings end -->
    <!-- JSPC filter mappings start -->
    <!-- JSPC filter mappings end -->
    <!-- JSPC mysql-connection-pool start -->
    <resource-ref> 
    <description>MySqlDBCP Connection</description> 
    <res-ref-name>jdbc/history</res-ref-name> 
    <res-type>javax.sql.DataSource</res-type> 
    <res-auth>Container</res-auth> 
    </resource-ref> <!-- JSPC mysql-connection-pool end--><!-- JSTL start--><!-- JSTL end-->
    </web-app>