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 / Tools / October 2004

Tip: Looking for answers? Try searching our database.

Newbie question: Servlets with Eclipse

Thread view: 
Thomas Hoheneder - 18 Oct 2004 21:12 GMT
Hello,

I'm quite a newbie in Java and have the following question.
I want to develop servlets with Eclipse 3.0.
My written code doesn't compile because the imported javax.servlet.* package
could not be found. It seems that there is no such package in die Eclipse
development environment. To run my servlets I have Tomcat 5.0 and for that I
have configured a CLASSPATH=C:\tomcat\common\lib\servlet-api.jar
My question is: How can I announce Eclipse my CLASSPATH or what do I have to
do that Eclipse knows my servlet-api.jar?

In another IDE (Kawa) I don't have any problems in compiling my servlets.

Any help to this would be very appreciated. Thanks in advance.

Nice greetings from
Thomas
Thomas Hoheneder - 18 Oct 2004 22:29 GMT
> My question is: How can I announce Eclipse my CLASSPATH or what do I have to
> do that Eclipse knows my servlet-api.jar?

Ehem... I found a document at
http://www.joller-voss.ch/tools/eclipse/EclipseTomcatStarthilfe.pdf
It explains that I need a plug-in for Eclipse... now I can in fact compile
my servlets.
Nigel Wade - 19 Oct 2004 10:25 GMT
> Hello,
>
[quoted text clipped - 13 lines]
> Nice greetings from
> Thomas

You need to add a Jar to the Project. These instructions are for Linux, I
have never used Eclipse on Windows but I suspect it's almost identical.

Make sure that the project in question is displayed in the "Package
Explorer" or "Packages" windows. Right-click on the project and select
"Properties" from the menu (at the bottom). In the dialog box select "Java
Build Path" in the left pane and the "Libraries" tab in the right, then
click on the "Add External JARs.." button. This will pop-up a file
selection dialog box, just navigate to the servlet jar and select it.

Signature

Nigel Wade, System Administrator, Space Plasma Physics Group,
           University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@ion.le.ac.uk
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

Thomas Hoheneder - 19 Oct 2004 11:31 GMT
> You need to add a Jar to the Project. These instructions are for Linux, I
> have never used Eclipse on Windows but I suspect it's almost identical.
[quoted text clipped - 5 lines]
> click on the "Add External JARs.." button. This will pop-up a file
> selection dialog box, just navigate to the servlet jar and select it.

Thank you very much. This is a good hint with less effort than the way
described in the docu I have found.
In Windows it's exactly as you described for Linux. I will do it that way in
future.

Nice greetings from
Thomas


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.