<form action="com.creaunion.example.servlet.StockServlet" method="post">

解决方案 »

  1.   

    StockServlet.java前面要
    package com.creaunion.example.servlet;
      

  2.   

    form action不对,你看看web.xml中的StockServlet的uri是什么
      

  3.   

    <form action="http://localhost:8080/com/creaunion/example/servlet/StockServlet" method="post">再试一下
      

  4.   

    在WEB。INF文件中要有SERVLET-MAPPING才行
      

  5.   

    建议在web.xml里添加servlet name 和servlet url
    这样你就可以用自定义的URL了
      

  6.   

    com.creaunion.example.servlet.StockServlet
      

  7.   

    用tomcat or weblogic???
    看看它们文档中的例子。可以解决问题。