雙面虎
2006-09-09 01:52:28 UTC
我用書上的範例 編譯錯誤訊息如下
Sample013.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
Sample013.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
Sample013.java:5: cannot resolve symbol
symbol : class HttpServlet
location: class Sample013
public class Sample013 extends HttpServlet {
^
Sample013.java:6: cannot resolve symbol
symbol : class HttpServletRequest
location: class Sample013
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
Sample013.java:6: cannot resolve symbol
symbol : class HttpServletResponse
location: class Sample013
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
Sample013.java:7: cannot resolve symbol
symbol : class ServletException
location: class Sample013
throws ServletException, IOException
^
6 errors
我Tomcat有再跑
不知是什麼原因?
--
╭┬╮
[m│[41m┴[m│╭─﹏﹏────────────── [1;35mWeb bbs http://bbs.ice.cycu.edu.tw
[m└┬┘│[33;1m中原資工神秘之旅 [36;1mPost by[m [37;1 redbug [m │
╰﹏╯[1;32m From:220-139-90-11.dynamic.hinet.n [m ╰﹏﹏[1;36mbbs.ice.cycu.edu.tw[m﹏﹏[1;34mΩ[m
Sample013.java:2: package javax.servlet does not exist
import javax.servlet.*;
^
Sample013.java:3: package javax.servlet.http does not exist
import javax.servlet.http.*;
^
Sample013.java:5: cannot resolve symbol
symbol : class HttpServlet
location: class Sample013
public class Sample013 extends HttpServlet {
^
Sample013.java:6: cannot resolve symbol
symbol : class HttpServletRequest
location: class Sample013
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
Sample013.java:6: cannot resolve symbol
symbol : class HttpServletResponse
location: class Sample013
public void doGet(HttpServletRequest request, HttpServletResponse response)
^
Sample013.java:7: cannot resolve symbol
symbol : class ServletException
location: class Sample013
throws ServletException, IOException
^
6 errors
我Tomcat有再跑
不知是什麼原因?
--
╭┬╮
[m│[41m┴[m│╭─﹏﹏────────────── [1;35mWeb bbs http://bbs.ice.cycu.edu.tw
[m└┬┘│[33;1m中原資工神秘之旅 [36;1mPost by[m [37;1 redbug [m │
╰﹏╯[1;32m From:220-139-90-11.dynamic.hinet.n [m ╰﹏﹏[1;36mbbs.ice.cycu.edu.tw[m﹏﹏[1;34mΩ[m