Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2007

Tip: Looking for answers? Try searching our database.

javax.servlet and javax.servlet.http

Thread view: 
newbie_at_tomcat - 24 Apr 2007 17:11 GMT
Hi,

I try to work with the javax.servlet and javax.servlet.http classes.
So first I downloaded them from java.sun.com. The download results in a servlet.jar file.
Simply putting this file in jre directory does not enable Eclipse (3.3) to resolve the import for javax.servlet and javax.servlet.http.
Then I have downloaded the J2SE jdk 1.5 update 11 winstall package from java.sun.com and installed the JDK + its own JRE.
Eclipse is not able to resolve the import for javax.servlet and javax.servlet.http.
Then I have created a JAVA_HOME env. var that points to: C:\Program Files\Java\jdk1.5.0_11\lib and copied servlet.jar to this direcory.
Eclipse is still not able to resolve the import for javax.servlet and javax.servlet.http.

What (more) is needed to enable Eclipse to resolve the import for javax.servlet and javax.servlet.http?

Any help is much appreciated!
Andrew Thompson - 24 Apr 2007 17:33 GMT
...
>What (more) is needed to enable Eclipse to resolve the
> import for javax.servlet and javax.servlet.http?

Add the jar's to the compilation and runtime classpath.
If you are not able to figure how to do that (I suggest,
in the first instance 'F1 - search - classpath - enter',
then if that does not work for you,) take it up on one
of the Eclipse groups, found here.
<http://www.eclipse.org/newsgroups/>

Signature

Andrew Thompson
http://www.athompson.info/andrew/

newbie_at_tomcat - 24 Apr 2007 21:25 GMT
Hi,

I've followed the suggestion of Andrew Thompson (thanks Andrew) and this solves my immediate problem. I've added a (new) variable that points to the lib directory containing the servlet.jar file. But this only applies to the one project that contains my package. Is is possible to define this (Eclipse) system wide or do I need to do this for every project I (might) want to use javax.servlet and javax.servlet.http in?

Thanks in advance for any helpful answer.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.