javax和java都是现在都是java的基础类包 他们是在一起的javax已经不是扩展包了,不要看
老的java书,会误导的哦

解决方案 »

  1.   

    什么???那要怎么样做呀??我得到了JSWDK,接着怎么样做?
    我的JSDK装在C:\j2sdk1.4.0,
      

  2.   

    RequestParamExample.java:2: package java.servlet does not exist
    import java.servlet.*;
    ^
    RequestParamExample.java:3: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    RequestParamExample.java:4: cannot resolve symbol
    symbol  : class HttpServlet  
    location: class RequestParamExample
    public class RequestParamExample extends HttpServlet
                                             ^
    RequestParamExample.java:6: cannot resolve symbol
    symbol  : class HttpServletRequest  
    location: class RequestParamExample
    public void doGet(HttpServletRequest request, HttpServletRespond response) throws IOException,ServletException
                              ^
    RequestParamExample.java:6: cannot resolve symbol
    symbol  : class HttpServletRespond  
    location: class RequestParamExample
    public void doGet(HttpServletRequest request, HttpServletRespond response) throws IOException,ServletException
                                                          ^
    RequestParamExample.java:6: cannot resolve symbol
    symbol  : class ServletException  
    location: class RequestParamExample
    public void doGet(HttpServletRequest request, HttpServletRespond response) throws IOException,ServletException
                                                                                                          ^
    RequestParamExample.java:12: cannot resolve symbol
    symbol  : class HttpServletRequest  
    location: class RequestParamExample
    public void doPost(HttpServletRequest request, HttpServletRespond response) throws IOException,ServletException
                               ^
    RequestParamExample.java:12: cannot resolve symbol
    symbol  : class HttpServletRespond  
    location: class RequestParamExample
    public void doPost(HttpServletRequest request, HttpServletRespond response) throws IOException,ServletException
                                                           ^
    RequestParamExample.java:12: cannot resolve symbol
    symbol  : class ServletException  
    location: class RequestParamExample
    public void doPost(HttpServletRequest request, HttpServletRespond response) throws IOException,ServletException
                                                                                                           ^
    RequestParamExample.java:14: cannot resolve symbol
    symbol  : class Enumeration  
    location: class RequestParamExample
    Enumeration e = request.getParamterNames();
                    ^
    10 errors
    Exit code: 1
    There were errors怎么回事啊???
      

  3.   

    安装jdk,javax.servlet包和javax.servlet.http包是没有的,
    你要自己下载servlet.jar
    放在jdk的lib下,classpth 加上java_home\lib\servlet.jar
      

  4.   

    你还是使用JAVA开发工具,如JBuilder\IDEA\Ecclipse等,这些工具都有对SWDK的支持
    如果你需要用轻量级的工具如JCreator等,将j2ee.jar包含到Class路径中即可
      

  5.   

    那是不是装了JBuilder后就不用装JSWDK了?直接可以编译SERVLET类了>?
      

  6.   

    例如:import java.io.*;
    是不是有个BufferedReader.class?那么
    那个BufferedReader.class类放在什么目录下?