Cannot find package javax.servlet.*

Hi All,
I'm trying to run the "make all" in the Wrox J2ee bea book and am running in to errors that all seem to stem from the fact that the javax.servlet.* packages do not exist. After looking around it seems that this package should be in the weblogicaux.jar file. I do not have that jar file in my install. Anyone know where i can either get that weblogicaux.jar file or any file which has the javax.servlet packages. Any help would be much appreciated.
Hoony
weblogic 5.1.0

That jar file should be located in %WebLogichome%\lib.
Michael Girdley
BEA Systems
Learning WebLogic? http://learnweblogic.com
"Hoony Youn" <[email protected]> wrote in message
news:3a70280f$[email protected]..
>
Hi All,
I'm trying to run the "make all" in the Wrox J2ee bea book and am runningin to errors that all seem to stem from the fact that the javax.servlet.*
packages do not exist. After looking around it seems that this package
should be in the weblogicaux.jar file. I do not have that jar file in my
install. Anyone know where i can either get that weblogicaux.jar file or
any file which has the javax.servlet packages. Any help would be much
appreciated.
>
Hoony
weblogic 5.1.0

Similar Messages

  • Where I can find the packages javax.servlet?

    I am using the Jbuilder 5 and I need to do a programm with servlets but it says that it cannot find the javax.servlet although I know it has the package servlet..
    ..what can I do?

    in your servlet runner the servlet.jar is normaly included. check if you find it on your hd. if no, you might get tomcat (jakarta.apache.org) the reference implementation for servlets. than, add the servlet.jar to your classpath.

  • Cannot fing the javax.servlet.*; package

    Hi everybody.. I am new to J2EE Programming.. I just wrote a very small and simple Servlet to see how it works.. The Servlet is designed to take in the the name and a favourite color of a user via a HTML page and display it to him
    Here is the code:
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class VerifyData extends HttpServlet
         public void doGet (HttpServletRequest reg, HttpServletResponse res) throws ServletException, IOException
              res.setContentType("text/html");
              PrintWriter out = res.getWriter();
              String name= req.getParameter ("name");
              String color=req.getParameter ("color");
              out.println("<html>");
              out.println("<head>");
              out.println("<title>Simple HTML Form</title>");
              out.println("<link rel='styleSheet' type='text/css' href='examples.css'>");
              out.println("</head>");
              out.println("<body>");
              out.println("<h1>Hello "+name+" Your favourite Color is : " +color+"</h1>");
              out.println("<form method='GET' action='verifydata'>");
              out.println("<p>Please Type in your name here:</p>");
              out.println("<input type='text' name='name'>");
              out.println("<p>Now select the color of your choice</p>");
              out.println("<select name='color' size='1'>");
              out.println("<option>red<option>green<option>blue</select>");
              out.println("<br></br>");
              out.println("<input type='submit'>");
              out.println("<br></br>");
              out.println("<table>");
              out.println("<tr><th>Colors</th><th>Description</th></tr>");
              out.println("<tr><td>Red</td><td>Blood</td></tr>");
              out.println("<tr><td>Green</td><td>Grass</td></tr>");
              out.println("<tr><td>Blue</td><td>Sky</td></tr>");
              out.println("</table>");
              out.println("</form>");
              out.println("</body>");
              out.println("</html>");
    }BUT I got the following Error:
    C:\Sun\AppServer\jdk\bin>javac VerifyData.java
    VerifyData.java:2: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    VerifyData.java:3: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    VerifyData.java:5: cannot find symbol
    symbol: class HttpServlet
    public class VerifyData extends HttpServlet
                                    ^
    VerifyData.java:7: cannot find symbol
    symbol  : class HttpServletRequest
    location: class VerifyData
            public void doGet (HttpServletRequest reg, HttpServletResponse res) thro
    ws ServletException, IOException
                               ^
    VerifyData.java:7: cannot find symbol
    symbol  : class HttpServletResponse
    location: class VerifyData
            public void doGet (HttpServletRequest reg, HttpServletResponse res) thro
    ws ServletException, IOException
                                                       ^
    VerifyData.java:7: cannot find symbol
    symbol  : class ServletException
    location: class VerifyData
            public void doGet (HttpServletRequest reg, HttpServletResponse res) thro
    ws ServletException, IOException
       ^
    VerifyData.java:11: cannot find symbol
    symbol  : variable req
    location: class VerifyData
                    String name= req.getParameter ("name");
                                 ^
    VerifyData.java:12: cannot find symbol
    symbol  : variable req
    location: class VerifyData
                    String color=req.getParameter ("color");
                                 ^
    8 errors
    C:\Sun\AppServer\jdk\bin>Please please please help me out. I am not sure about the class path settings etc.. but its like this C:\Sun\AppServer\jdk\lib\tools.jar

    Hi everybody
    I am new to j2ee.I am using java ee5.Application server as apache-tomcat-5.5.17.I tried to compile servlet using javac.it gives the following errors.
    HelloServlet2.java:4: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    HelloServlet2.java:5: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    HelloServlet2.java:15: cannot find symbol
    symbol: class HttpServlet
    public class HelloServlet2 extends HttpServlet {
    ^
    HelloServlet2.java:16: cannot find symbol
    symbol : class HttpServletRequest
    location: class coreservlets.HelloServlet2
    public void doGet(HttpServletRequest request,
    ^
    HelloServlet2.java:17: cannot find symbol
    symbol : class HttpServletResponse
    location: class coreservlets.HelloServlet2
    HttpServletResponse response)
    ^
    HelloServlet2.java:18: cannot find symbol
    symbol : class ServletException
    location: class coreservlets.HelloServlet2
    throws ServletException, IOException {
    ^
    6 errors
    this is the code
    public class HelloServlet extends HttpServlet {
    public void doGet(HttpServletRequest request,
    HttpServletResponse response)
    throws ServletException, IOException {
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    String docType =
    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 " +
    "Transitional//EN\">\n";
    out.println(docType +
    "<HTML>\n" +
    "<HEAD><TITLE>Hello (2)</TITLE></HEAD>\n" +
    "<BODY BGCOLOR=\"#FDF5E6\">\n" +
    "<H1>Hello (2)</H1>\n" +
    "</BODY></HTML>");
    pls help me to resolve this problem.
    Thank you
    sam

  • Package javax.servlet does not exists - Cannot resolve symbol

    Hello,
    I am using JDK 1.3.1.06 version. I wanted to compile a simple servlet using this. But I am getting plenty of errors for all javax package. Why it is not able to find javax package classes?
    The following is the program I have tried to compile.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class TestServlet extends HttpServlet
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    process(request, response);
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    process(request, response);
    private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    PrintWriter out = response.getWriter();
    out.println("Hello World !");
    I am getting errors like this :
    Package javax.servlet does not exists.
    cannot resolve symbol
    symbol : class HttpServlet
    Please advice me some solutions fast.
    Thanking you,
    ForumAns.

    javax.servlet doesn't come with the standard jdk. It's part of J2EE.
    If you have tomcat, you can use the server.jar that comes with tomcat.
    Or you can just download J2EE sdk instead.
    I am getting errors like this :
    Package javax.servlet does not exists.
    cannot resolve symbol
    symbol : class HttpServlet

  • Package javax.servlet.http does not exist

    Hello All,
    A few problems here
    1. My classpath doesnt seem to work.:
    .;"C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar"
    2. As a result, i get many errors in my simple code, but there are still a few that are not related to javac not recognizing the servlet api.
    I also tried setting the classpath at the command line (event hough its temporary)
    set classpath="C:\Program Files\Apache Software Foundation\Tomcat 6.0\lib\servlet-api.jar"
    but the servlet package is still not recognized
    I have 2 classes, one to read the database connection details from a file and another class, my servlet.
    Servlet Code:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class CustomQuery extends HttpServlet
         public void init() throws ServletException
              EstablishDBConnetion.establishConnection();
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              response.setContentType("text/html");
              PrintWriter printer = new response.getWriter();
              String title = "Result from custom query";
              Statement stmt = EstablishDBConnetion.establishConnection.con.createStatement();
              ResultSet rs = stmt.executeQuery("select customerID from customer");
              while(rs.next())
                   printer.println("<html> <head><title>" + title + "</title><br><br><table border=\"0\"> <tr><td>" + rs.getString(1));
              rs.close();
              stmt.close();
              EstablishDBConnetion.establishConnection.con.close();
    Database connection code
    import java.io.*;
    import java.sql.*;
    import java.util.StringTokenizer;
    class EstablishDBConnetion
         public static void establishConnection()
              try
                   String dbDriver = "";
                   String dbUrl = "";
                   String dbName = "";
                   String dbUser = "";
                   String dbPassword = "";
                   String newLine = "";
                   BufferedReader fileRead = new BufferedReader(new FileReader("connection.txt"));
                   boolean readerStatus = fileRead.ready();
                   newLine = fileRead.readLine();
                   while (readerStatus)
                        StringTokenizer st = new StringTokenizer(newLine, ",");
                        while (st.hasMoreTokens())
                            dbDriver   = st.nextToken();
                           dbUrl      = st.nextToken();
                           dbName     = st.nextToken();
                            dbUser     = st.nextToken();
                            dbPassword = st.nextToken();
                        readerStatus = fileRead.ready();
                   Class.forName(dbDriver);
                   String url = dbUrl + dbName;
                   System.out.print(url);
                   Connection con = DriverManager.getConnection(url, dbUser, dbPassword);
              catch (IOException e)
                   System.out.println("IO exception in establishConnection()");
                   e.printStackTrace();
              catch (java.lang.Exception ex)
                   System.out.println("General exception in establishConnection()");
                   ex.printStackTrace();
         public static void main(String[] args)
              //EstablishDBConnetion edbc = new EstablishDBConnetion();
              establishConnection();
    }also, full error list below
    CustomQuery.java:4: package javax.servlet does not exist
    import javax.servlet.*;
    ^
    CustomQuery.java:5: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    ^
    CustomQuery.java:7: cannot find symbol
    symbol: class HttpServlet
    public class CustomQuery extends HttpServlet
    ^
    CustomQuery.java:10: cannot find symbol
    symbol : class ServletException
    location: class CustomQuery
    public void init() throws ServletException
    ^
    CustomQuery.java:16: cannot find symbol
    symbol : class HttpServletRequest
    location: class CustomQuery
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    ^
    CustomQuery.java:16: cannot find symbol
    symbol : class HttpServletResponse
    location: class CustomQuery
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    ^
    CustomQuery.java:16: cannot find symbol
    symbol : class ServletException
    location: class CustomQuery
    public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
    ^
    CustomQuery.java:19: package response does not exist
    PrintWriter printer = new response.getWriter();
    ^
    CustomQuery.java:24: cannot find symbol
    symbol : variable establishConnection
    location: class EstablishDBConnetion
    Statement stmt = EstablishDBConnetion.establishConnection.con.createStatement();
    ^
    CustomQuery.java:39: cannot find symbol
    symbol : variable establishConnection
    location: class EstablishDBConnetion
    EstablishDBConnetion.establishConnection.con.close();
    ^
    10 errors
    I appreciate your help
    Message was edited by:
    paulchwd
    null
    Message was edited by:
    paulchwd

    The library is in tomcat/common/lib, not in tomcat/lib.

  • Package javax.servlet does not exist - settings appear to be correct

    laugh as I write this post...it's hardly a "new topic."...but everything seems set just as it should be...
    Okay...I'm a seasoned programmer in every language but JAVA. Here's the issue...every time I try to use the Core Servlets book/website by Marty Hall and Larry Brown I get hung up on the packages. This time, I downloaded and followed step by step what the website said to do...it was even preconfigured for me! Alas...I am getting the following compliation errors on a "simple packagless" program with NetBeans:
    Compiling 1 source file to C:\Servlets+JSP\HelloServlet\build\classes
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:2: package javax.servlet does not exist
    import javax.servlet.*;
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:3: package javax.servlet.http does not exist
    import javax.servlet.http.*;
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:13: cannot find symbol
    symbol: class HttpServlet
    public class HelloServlet extends HttpServlet {
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:14: cannot find symbol
    symbol : class HttpServletRequest
    location: class HelloServlet
    public void doGet(HttpServletRequest request,
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:15: cannot find symbol
    symbol : class HttpServletResponse
    location: class HelloServlet
    HttpServletResponse response)
    C:\Servlets+JSP\HelloServlet\src\helloservlet\HelloServlet.java:16: cannot find symbol
    symbol : class ServletException
    location: class HelloServlet
    throws ServletException, IOException {
    6 errors
    BUILD FAILED (total time: 0 seconds)
    These are my environment settings (note that the JAVAX package is located under the src folder in Java)
    Catalina Home:
    C:\apache-tomcat-6.0.10
    CLASSPATH:
    C:\apache-tomcat-6.0.10\lib\servlet-api.jar;
    C:\apache-tomcat-6.0.10\lib\jsp-api.jar;
    C:\apache-tomcat-6.0.10\lib\el-api.jar;
    C:\Servlets+JSP;..;..\..;
    C:\Program Files\Java\jdk1.6.0_03\src
    JAVA_HOME
    C:\Program Files\Java\jdk1.6.0_03
    Path:
    C:\Program Files\Java\jdk1.6.0_03\bin;%PATH%
    Any ideas (excluding the one that maybe I should let my hair grow out, put on some tackey shorts and sandles and start palying an instrument in the streets of Austin for living?)

    cabkats wrote:
    You are then suggesting that I make the corrections directly to the files in apache using notepad instead of using the envir. variables?No I am not suggesting that. I am suggesting that you need to read the documentation about the product(s) and set them up the way they require, rather than blindly think that the CLASSPATH environment variable is some magical entity.
    I will try this, but I was hoping that since my IDE auto configured (with exception to java_home) that I would not have to do this. I wil give it try....thanks for the suggestion.See, you're using an IDE. Like I mentioned, IDEs do not use the CLASSPATH environment variable. You need to set up your project in your IDE in such a way that it knows what the dependent jars are. I'm sure there's a way to add jars to your project's dependencies.

  • Error:    package javax.servlet.http does not exist

    Hi all,
    How do I import javax.servlet?
    package com.example.web;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class BeerSelect extends HttpServlet {
      public void doPost(HttpServletRequest request,
                         HttpServletResponse response)
                         throws IOException, ServletException {
        response.setContentType("text/html");
        PrintWriter out = response.getWrite();
        out.println ("Beer Selection Advide<br>");
        String c = request.getParameter("color");
        out.println ("<br>Got beer color " + c);
    }What does this error mean? The error message:
    Compiling 1 source file to C:\Program Files\Apache Software Foundation\MyProjects\J2EE\build\classes
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:3:
    package javax.servlet does not exist
    import javax.servlet.*;
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:4:
    package javax.servlet.http does not exist
    import javax.servlet.http.*;
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:7:
    cannot find symbol
    symbol: class HttpServlet
    public class BeerSelect extends HttpServlet {
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:8:
    cannot find symbol
    symbol  : class HttpServletRequest
    location: class com.example.web.BeerSelect
      public void doPost(HttpServletRequest request,
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:9:
    cannot find symbol
    symbol  : class HttpServletResponse
    location: class com.example.web.BeerSelect
                         HttpServletResponse response)
    C:\Program Files\Apache Software Foundation\MyProjects\J2EE\src\com\example\web\BeerSelect.java:10:
    cannot find symbol
    symbol  : class ServletException
    location: class com.example.web.BeerSelect
                         throws IOException, ServletException {
    6 errors
    BUILD FAILED (total time: 0 seconds)Thank you.

    Hi,
    The file servlet-api.jar / servlet.jar is not available in your classpath.
    To compile an Servlet you need the jar file to be in classpath.
    The jar file can be found in your webserver / application server lib folder.
    Regards,
    Zack

  • Package javax.servlet does not exists ?

    Hello,
    I am using JDK 1.3.1.06 and trying to compile a simple Servlet. But getting errors as javax package classes does not exits and cannot resolve symobol.
    The following is the program I am trying to compile:
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    public class TestServlet extends HttpServlet
         public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              process(request, response);
         public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              process(request, response);
         private void process(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
              PrintWriter out = response.getWriter();
              out.println("Hello World !");
    I am getting errors such as :
    Package javax.servlet does not exists.
    cannot resolve symbol
    symbol : class HttpServlet
    Please advice me of any solution asap. Deep trouble.
    Thanking you,
    Forumans.

    Just a guess...
    JDK 1.3.1.06 This represents the Java language in the form of a JVM and the Java API (like java.lang.String.)
    ServletThis is in J2EE, which if you look above was not mentioned.
    If you look in the java docs for the JDK you will also find that javax.servlet does not exist.
    I would guess however that you could start here - http://java.sun.com/j2ee/
    However, keep in mind that your servlet still needs to run in something, so you better make sure that you are compiling against the correct J2EE server for what you are doing.

  • ANT script genrated error: package javax.servlet does not exist

    Hi there,
    I am running ANT and confronted this message:
        [javac] Compiling 1 source file to C:\eclipseProjects\tomcat_test
        [javac] C:\eclipseProjects\tomcat_test\WEB-INF\src\WebTest.java:4: package javax.servlet does not exist
        [javac] import javax.servlet.ServletException;
        [javac] ^I googled around and found this solution:
    servlet-api.jar is the jarfile that contains javax.servlet.ServletException and javax.servlet.http.* which are imported by WebTest.java and must therefore be found in the classpath. If javac doesn't find this jar (or the javax.servlet packages), it will say (or shout, depending on my and javac's mood): [the error message]
    well...I set in the classpath the location of the servlet-api.jar
    (found at: C:\Tomcat\common\lib)
    I set it with the environment variable (windows xp)
    Just as it's shown here: http://www.cs.usask.ca/~wew036/latex/env-env.jpg
    NOTHING :-(
    could anyone assist, thanks

    Hi..seems u r new to J2ee.. dont worry its a very small problem:
    Here is the solution.. yes u have to edit the environment variables:..
    I am using J2EE sdk 1.4 and running on xp
    This is the classpath setting:
    C:\Sun\AppServer\lib\j2ee.jar;
    This is the PATH setting
    C:\Sun\AppServer\bin;
    Good Luck :)

  • ATMTag.java:5: package javax.servlet does not exist

    My j2ee jdk1.4.2 is not supporting javx package.
    i already set all pathh and class path.
    anybody can help me.
    details are given below ::
    C:\AVA\J2EE Programs\JSP\JSPCustomTag>javac ATMTag.java
    ATMTag.java:5: package javax.servlet does not exist
    import javax.servlet.*;
    ^<br>
    ATMTag.java:6: package javax.servlet.http does not exist
    <br>
    import javax.servlet.http.*;
    <br>
    ATMTag.java:18: cannot resolve symbol
    symbol : class TagSupport
    location: class ATMTag
    public class ATMTag extends TagSupport{
    <br> ^
    ATMTag.java:29: cannot resolve symbol
    symbol : class JspTagException
    location: class ATMTag
    public int doStartTag() throws JspTagException{
    <br> ^
    ATMTag.java:31: cannot resolve symbol
    symbol : class JspWriter
    location: class ATMTag
    <br> JspWriter out =pageContext.getOut();
    ^
    ATMTag.java:31: cannot resolve symbol
    symbol : variable pageContext
    location: class ATMTag
    <br> JspWriter out =pageContext.getOut();
    ^
    ATMTag.java:56: cannot resolve symbol
    symbol : variable pageContext
    location: class ATMTag
    pageContext.getOut().write(str);
    <br> ^
    ATMTag.java:60: cannot resolve symbol
    symbol : variable EVAL_PAGE
    location: class ATMTag
    return EVAL_PAGE;
    ^
    8 errors

    When compiling servlets etc, you need to include in your classpath a jar file with all the javax.* classes defined in it.
    For Tomcat this is called servlet.jar and is in (I think) [TOMCAT_HOME]/shared/lib or /common/lib
    For J2EE 1.4 Server, the jar is [J2EE_HOME]/lib/j2ee.jar
    Where the _HOME directory is the directory where you installed J2EE.
    Include this jar file in your classpath when compiling.
    Good luck,
    evnafets

  • Help JDeveloper cannot find package

    Hi,
    I am using JDeveloper 9.0.3.4.
    In the project settings -->Configurations -->Development --> Libraries, I add JSP Runtime, J2EE, Servlet Runtime. But When I tried to rebuild my project, I got errors like:
    (1) package javax.servlet.jsp does not exist;
    (2) cannot resolve symbol on import javax.servlet.http.HttpServletRequest;
    (3)javax.servlet.http.HttpServletRequest is not public in javax.servlet.http; cannot be accessed from outside package.
    Can you help?
    Many thanks,

    Add lib/j2ee.jar from the J2sdkee installation in the project Classpath with Paths>Additional Paths in the project properties frame.

  • Package javax.servlet not found in sdk 1.4.0_01

    Hi,
    Please correct me if i'm wrong. I was using j2sdk 1.3.1 (standard edition) and have recently upgraded to j2sdk1.4.0_01. I can't find the javax.servlet package in the API. I referred to the j2ee sdk and found the package there. Does it mean that I need to have both the j2sdk1.4.0_01 and the j2sdkee1.3.1 (j2ee) in order to be able to compile and run my codes?
    Thanks.
    Karen

    The servlet packages don't come with the standard SDK.
    You can get them from javasoft.com or if you use the
    Tomcat server they come packaged in a jar file called
    servlet.jar

  • Package javax.servlet.jsp does not exist.

    dear all!
    I've one program which import javax.servlet.jsp.* as one of the package to be used in
    the program, and I am using j2sdk 1.4.0_01 to compiled it.
    However I got this error message : package javax.servlet.jsp does not exist.
    Where does it wrong?.
    error message like :
    logisticslib.java:6: package javax.servlet.jsp does not exist
    import javax.servlet.jsp.*;
    ^
    logisticslib.java:201: cannot resolve symbol
    symbol : class JspWriter
    location: class elogistic.db.logisticslib
    public void getServiceInfo(JspWriter out, String SQL) {

    You need a J2EE implementation, I recomemend Tomcat, you also need to put the .jar w/ the implementation in in your classpath.

  • Package javax.servlet does not exist, package javax.servlet.http does not

    Dear All,
    I am a newbie to JAVA.
    I installed JDK1.6.0_04, then NetBeans IDE 6.0
    I tried compiling an example servlet, but got this error message:
    package javax.servlet does not exist, package javax.servlet.http does not exist
    I tried locating these packages, but in vain. I also tried setting the CLASSPATH to many values, still it did not work.
    Can anyone, please, help me with this.
    Should I be able to see/locate these packages, do I have to download them?
    Thank you very much.

    davidgoodman wrote:
    Dear All,
    I am a newbie to JAVA.
    I installed JDK1.6.0_04, then NetBeans IDE 6.0
    I tried compiling an example servlet, but got this error message:
    package javax.servlet does not exist, package javax.servlet.http does not exist
    What servlet/JSP engine do you plan to deploy to? Tomcat, perhaps?I think it's Tomcat (C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14). Are there other engines that come with NetBeans IDE 6.0 (when I downloaded NetBeans, I chose ALL)
    >
    If so, you'll need to put the servlet JAR in your CLASSPATH. (servlet-api.jar for Tomcat 5.5 and earlier, servlet.jar for 6.0 >and later.)
    I tried locating these packages, but in vain.
    You won't find them until you realize that you have to deploy that servlet someplace.How to deploy?
    I also tried setting the CLASSPATH to many values, still it did not work.
    See above. What were you planning to set CLASSPATH to?First I set to:
    C:\Program Files\Apache Software Foundation\Apache Tomcat 6.0.14\lib (because I found jar named servlet-api.jar in this folder)
    Later I added this:
    C:\Program Files\Java\jdk1.6.0_04\lib (out of trial-and-fail)
    Finally I added some paths that lead to a library such as
    C:\Program Files\glassfish-v2\lib
    C:\Program Files\glassfish-v2\lib\ant\lib
    Can anyone, please, help me with this.
    Should I be able to see/locate these packages, do I have to download them?
    You have to get a servlet/JSP engine. Step 1.Thank you for your help

  • Why I  got package javax.servlet.http do not exist

    I have package javax.servlet.http do not exist problem, can anyone tell me why?
    Thank you

    Hi all
    Thank you for all kinds of replies. It is Windows problems. but I got a new questions here
    1) it seems I don't need to including
    install_dir\common\lib\jsp-api.jar in classpath!!
    2) when I try servletUtilities,
    from http://www.coreservlets.com/Apache-Tomcat-Tutorial/#Configure-Tomcat
    I got error
    HelloServlet3.java:23: cannot resolve symbol
    symbol : variable ServletUtilities
    location: class coreservlets.HelloServlet3
    out.println(ServletUtilities.headWithTitle(title) +
    ^
    1 error
    both my HelloServlet3 and servletUtilities under
    WEB-INF\classes\coreservlets
    thank you

Maybe you are looking for

  • Deploy web application in jbuilder 9 with weblogic 7 problem

    when i create a web application and a servlet, and deploy it in jbuilder 9 with weblogic 7.0 ,jbuilder 9 showed me the error,please tell me why, when i choose "redeploy" ,it can be normally work.. E:\bea\jdk131_02\bin\javaw -classpath E:\bea\weblogic

  • How can i insert more than one record a time in a JSP page?

    Hi experts, I'm working with JDeveloper version 3.2 application server 9i. I want to insert more than 1 record using a jsp page and then perform a commit at the end. do you can help me with this problem/challenge? Thank you, Regards, Mario

  • I can no longer reinstall an app I purchased on Snow Leopard

    Now let me try to explain this as easily as possible. I have OS X 10.6.8 running on a prematurely obsoleted Core Duo iMac, and I stupidly purchased Apps on the Mac App Store. My computer was behaving very strangely and I reinstalled the OS... I log i

  • Mac OS x 10.5.6 PSE 6 Paste Anomaly

    Try the following steps: 1. Open a pdf file using Preview. 2. Choose the rectangular selection tool 3. Select a portion of a page. 4. Do a copy (command C) 5. Verify that the clipboard contains the area you selected by: a. Going to Finder > Edit > Sh

  • 27" imac i7 16GB RAM mid-2010 turns off randomly

    I've done a lot of reading on the existing posts, and so far no real solutions except for removing RAM. I have 27" imac with APPLE-INSTALLED 16GB RAM. It is a mid-2010 imac model 11,3. The random shutdowns don't seem to correlate to particular apps o