Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 16th, 2001, 05:30 PM
UrbanDeveloper UrbanDeveloper is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Feb 2001
Posts: 209 UrbanDeveloper User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 13
Problems in compling Servlets

Hi there i am having problems trying to compile servlets even those that are examples found in the tomcat directory. The jdk am using is able to compile any other type of classes but not that classes that require the packag javax.servlet infact when compiling it, it says it doesnt exist !.

I am using tomcat 4.0 beta 7 and JDK ver 1.4 on a Windows 2000 machine. When typing http://127.0.0.1:8080/ the tomcat page appears and when attempting to run the ready made servlets evverything is normal however problem is compiling them.

My server settings are as follows :-

1) Windows 2000- Environment settings (System Variables)-

CATALINA_HOME- C:\Program Files\Tomcat4.0

JAVA_HOME - C:\jdk1.4

CLASSPATH - C:\jdk1.4\bin\tools.jar;C:\Program Files\Tomcat4\lib\servlet.jar;%CLASSPATH%

PATH - C:\jdk1.4\bin;C:\Program Files\Tomcat4

2) Javac commands functions normally and the connection to the server from http://127.0.0.1:8080 works fine.

3) Error obtained after attempting to compile :-

HelloWorld.java:2: package javax.servlet does not exist
import javax.servlet.*

Therefore throughout the script every class within this package is regarded as an error.

Can any one help solve this problem or help reconfigure the server ??

Apperciate ur help !!

Urban Developer

Reply With Quote
  #2  
Old August 20th, 2001, 11:44 AM
Rehan Malik Rehan Malik is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Posts: 0 Rehan Malik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Smile

Umm I might be wrong here but did you make sure you downloaded the servlet packages from Sun's website?

Look for java servlets under product and you'll find a link. Extract the jar file to your JDK directory and then add it to your classpath. Restart your computer and it should work.

Let me know if it doesn't

Reply With Quote
  #3  
Old August 29th, 2001, 12:00 AM
yangontha yangontha is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Singapore
Posts: 3 yangontha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I might be wrong. To me it seems that your path does not cover the Tomcat4/lib/ . So it may not find servlet.jar.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > Problems in compling Servlets

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap