DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006

    Exclamation Trying to get servlet using javax.servlet.* package to work?

    I just setup J2EE 5 Application Server on Windows, but I cant get a simple java servlet (named ****) to compile and run which uses the javax.servlet.* package (I get a compile error saying package does not exist)?

    So I downloaded the Servlet SDK 1.5 and unzipped it... then I did this following command to compile **** which specifies -cp (class path) of Servlet SDK...

    javac -cp \servlet ****.java

    The above worked and it compiled... however I still can not get the ANT builder to compile ****, and I cant get the servlet to operate through the Application Server on a web browser?

    Any help appreciated.

  2. #2
    Join Date
    Nov 2006
    If you want to servlet or ant first you need to set the classpath to those things.
    for servlets

    set classpath=c:\servlet-api.jar;

    for ant you need to set path as

    set path=c:\ant\bin;

Similar Threads

  1. Replies: 3
    Last Post: 08-25-2008, 09:01 AM
  2. Servlet Help
    By trixma in forum Java
    Replies: 4
    Last Post: 09-04-2005, 11:10 PM
  3. Replies: 0
    Last Post: 11-16-2000, 04:33 AM
  4. Running a DTS package on SQL server 7
    By Michael W in forum VB Classic
    Replies: 0
    Last Post: 11-06-2000, 02:27 AM

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
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.