DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    stanley Guest

    Problem regarding javax.servletpackage


    I am getting problem in regards to the package javax.servlet.*
    not found although I have set the correct path in my autoexec.bat file
    the path for servlet is as follows:
    set path=c:\jsdk2.0\bin;
    set classpath=c:\jsdk2.0\lib;
    which is in my root directory
    So I created another director javadir and I was compiling this
    servlet programme. It threw me this exception
    Please help.


  2. #2
    Paul Clapham Guest

    Re: Problem regarding javax.servletpackage

    The servlet classes come in a jar file (or maybe more than one). Did you
    add it (or them) to your classpath? Doesn't look like it.

    PC2

    stanley <stancher56@hotmail.com> wrote in message
    news:3a07a896$1@news.devx.com...
    >
    > I am getting problem in regards to the package javax.servlet.*
    > not found although I have set the correct path in my autoexec.bat file
    > the path for servlet is as follows:
    > set path=c:\jsdk2.0\bin;
    > set classpath=c:\jsdk2.0\lib;
    > which is in my root directory
    > So I created another director javadir and I was compiling this
    > servlet programme. It threw me this exception
    > Please help.
    >




  3. #3
    Patel Guest

    Re: Problem regarding javax.servletpackage


    Since JSDK 2 you need to set your class path to c:\jsdk2.0\lib\"somejarfile".jar.
    Point your class path to the jar file that has javax package in it.

    "stanley" <stancher56@hotmail.com> wrote:
    >
    >I am getting problem in regards to the package javax.servlet.*
    >not found although I have set the correct path in my autoexec.bat file
    >the path for servlet is as follows:
    >set path=c:\jsdk2.0\bin;
    >set classpath=c:\jsdk2.0\lib;
    >which is in my root directory
    > So I created another director javadir and I was compiling this
    > servlet programme. It threw me this exception
    > Please help.
    >



  4. #4
    prasad Guest

    Re: Problem regarding javax.servletpackage


    hi,
    I think u should compile the file giving
    the classpath attribute along with the file
    name

    like

    javac -classpath <ClasspathOfJarFile> <filename>

    love PRASAD

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links