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 / First Aid / May 2004

Tip: Looking for answers? Try searching our database.

how to compile servlet program

Thread view: 
WL Yang - 28 May 2004 09:48 GMT
Hi all,

Here comes a problem about servlet, I have a bit experience on java
applet. Now I need to write a servlet on my job and I has installed
Tomcat and J2EE on my redhat servers. but I still cant compile servlet
program by javac( they also said that I dont have javax package ). I
dl some kind of servlet class tar file, such as servlet.jar, jsdk.jar,
and also come with some directories, such as lib, src, api and so on.
Could someone be kind to tell where can I save those files, or how to
setup the server, to make it ready for servlet or jsp running. or
could someone provide good website to teach how to setup servlet or
jsp on the web servers.

many thks in advance.
Nigel Wade - 28 May 2004 10:10 GMT
> Hi all,
>
[quoted text clipped - 10 lines]
>
> many thks in advance.

Tomcat includes servlet.jar, which contains the javax.servlet classes.
It's normally in the common/lib directory of the Tomcat installation tree.
You need to add this jar to the javac compiler classpath.

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

Erwin Moller - 28 May 2004 12:29 GMT
> Hi all,
>
[quoted text clipped - 10 lines]
>
> many thks in advance.

Hi WL Yang,

Just a little friendly word of advise:

J2EE (and servlets/jsp) is not just compile-and-run.
A lot more things need to be set up properly.

I would advise you do some reading and use an IDE to help you.
Personally I am addicted to NetBeans, it is good and it is open source.
www.netbeans.org

If you start coding servlets/jsp without much understanding of the way it
should be set up, you will probably run into a lot of trouble and
frustration later on.
When I started with servlets a few years back, I had about the same
background as you: only applets/basic Java.
I found out the hard way that you safe a lot of time by doing some tutorials
first. :-)
Maybe it takes a week (or 2) extra, but you will safe that time later on
because you will make a lot less mistakes with some solid background.

Have a look at the tutorials that come with Tomcat and look at the tutorials
at sun's own website too. Just do every exercise they conjure up. :-)

Good luck!

Regards,
Erwin Moller
WL Yang - 31 May 2004 04:44 GMT
> > Hi all,
> >
[quoted text clipped - 39 lines]
> Regards,
> Erwin Moller

Dears,

thks a lot, Nigel and Erwin, I will take a look at the site. As a
newbie, servlet and jsp are so strange and difficult to understand, it
will really need to make some efforts.

many thks

Regards,
WL


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.