Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > javax.servlet.* ??

javax.servlet.* ??
Thread Tools
Forum Regular
Join Date: Nov 2000
Location: Oslo, Norway
Status: Offline
Reply With Quote
Aug 30, 2002, 03:17 AM
 
I have just installed Tomcat, and I'm trying to compile a servlet.
I get the following error:
package javax.servlet does not exist

Does anyone know where I can find it, and how to install it?

Help! Please!
     
Forum Regular
Join Date: Aug 2001
Location: Vienna, Austria
Status: Offline
Reply With Quote
Aug 30, 2002, 06:07 AM
 
I guess you didn't specify the right classpath, you'll have to include a jar-file from tomcat to get this to work.
     
Junior Member
Join Date: Sep 2000
Status: Offline
Reply With Quote
Aug 30, 2002, 08:24 AM
 
Originally posted by beni:
I have just installed Tomcat, and I'm trying to compile a servlet.
I get the following error:
package javax.servlet does not exist

Does anyone know where I can find it, and how to install it?

Help! Please!
You need to put servlet.jar somewhere where your java compiler can see it. You can find servlet.jar in tomcat/lib/.

Either put it in your Java extensions folder (Not recommended as all Java app's will be able to see it) or put it in the classpath.

Better still use a build tool such as ant to compile with - then you can set up a simple ant script to load the libraries you need, compile your servlet and then deploy it into tomcat.

You can get ant from the same place as Tomcat, apache jakarta.

Good look with the Servlet

James Donkin
bygimis@mac.com
Nobody made a greater mistake than
he who did nothing because he could only
do a little. Edmund Burke
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 01:43 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2