It's not a secret anymore!
The moose likes Servlets and the fly likes How to get started with Servlets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to get started with Servlets?" Watch "How to get started with Servlets?" New topic

How to get started with Servlets?

Hannah Redmond

Joined: Jul 18, 2001
Posts: 8
I in a right pickle here. So I hope some one can help me out.
Basically, I want to learn servlets and jsp's as Ive been doing java for a bit now, and want to see what else it can do.
Soooo....i downloaded the j2ee from the sun site, and installed that. And read a bit more and it said i needed a server to run servlets and jsp's - makes sense so far. But, where to go from there? Theres all this stuff about setting the j2ee_home and java_home? I dont understand where. The jarkarta ant server that i downloaded, also has this ant_home thing, where i guess i have to state where it is, but do i have to put all this in the autoexec.bat? or is there somewhere else.
Also, i read something somewhere about an JSDK (java servlet development kit) has this been updated by the j2ee? ie is it the same. As my book says i have to more a servlet.jar file into my jre/lib/ext folder and I dont have a servlet.jar file
If anyone could shed any light on what i should do, i would be more that grateful. I look forward to hearing from you all!
Eric Howell
Ranch Hand

Joined: Nov 26, 2000
Posts: 63
All you need is Tomcat. It is an open source Web Server software from Apache. There are others but this is very popular.This link will give you further info.
You can use this to test JSP/Servlets and Javabeans( not to be confused with EJB's)
Of course you can use notepad/wordpad and the JDK.
You can also find out just aboput anything you need by doing a search on this site. It's amazing how people tend to have the same problems.
Cheers and good luck
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

The JSDK was the older Development Kit put out by Sun, to do servlet development. They supported this until they gave up and realized Tomcat was doing a better job than they were.

If you downloaded the j2sdkee from Sun, then you have something called j2ee.jar. This actually contains all the packages in servlet.jar, plus several more.

To do just servlets and JSP though, as Eric mentions, the only thing you need is Tomcat:
That is the windows installer version of the latest Tomcat release.

- or -
CATALINA_HOME (for Tomcat 4.x)

These are all environment variables that you would set up in autoexec.bat (Win9x) or in the System environment variables for WinNT/2k. Get back to us on your OS for more help there.
Hannah Redmond

Joined: Jul 18, 2001
Posts: 8
Thanks guys,
ive downloaded the tomcat program and have it installed, so im just trying to set up all the environments, but i thought id let you know that i have win98, i read somewhere that i might have problems..?
I have to say, i havent had any yet, but then i havent really tried it.
Im sure ill have more q's but thanks for the replies, its much appreciated.
Hannah Redmond

Joined: Jul 18, 2001
Posts: 8
mm, right
i cant seem to get the
to work in my autoexec.bat...
just says bad file name and ignores it.

Dave Van Even
Ranch Hand

Joined: Jul 19, 2001
Posts: 101
because you need to put a command in front of it
I never heard of the JAVA_HOME=c:\fjisdjfo\ command You??
set JAVA_HOME=...
subject: How to get started with Servlets?
It's not a secret anymore!