0

如何联系 sourcepackages/default packages/controlServlet。我想用在

表单动作=“ controlServlet ”方法=“POST”

但 netBeans 看不到 controlServlet 。我该如何解决?我记得“ .././controlServlet ”类似的东西......

4

1 回答 1

1

You need to map the URL in the deployment descriptor web.xml under WEB-INF. The <servlet-class> should be fully qualified name of the class like : package.classname.

<servlet>
    <servlet-name>controlServlet</servlet-name>
    <servlet-class>ControlServlet</servlet-class>
</servlet>

<servlet-mapping>
    <servlet-name>controlServlet</servlet-name>
    <url-pattern>/controlServlet</url-pattern>
</servlet-mapping>
于 2013-05-31T08:59:26.333 回答