1
隨着下面的頁面,我期待看到我的消息This page requires...
但我看到的只是一個空白頁面(沒有錯誤)。Servlet顯示無輸出
package guest;
import java.io.IOException;
import javax.ejb.EJB;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet(urlPatterns = {"/guestExport"})
public class GuestExportServlet extends HttpServlet {
//Injected DAO EJB
@EJB GuestDao guestDao;
@Override
protected void doGet(
HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("This page requires a POST");
}
@Override
protected void doPost(
HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
System.out.println("This page is a POST");
}
}
這裏有什麼明顯的問題?