DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2006
    Posts
    9

    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
    Posts
    2
    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

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