This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to get started with Servlets?" Watch "How to get started with Servlets?" New topic
Author

How to get started with Servlets?

Hannah Redmond
Greenhorn

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!
Thanks,
Hannah
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. http://www.webappcabaret.com/javachina/tomcathowto.htm
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: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/bin/jakarta-tomcat-4.0.1.exe
That is the windows installer version of the latest Tomcat release.

JAVA_HOME
TOMCAT_HOME
- or -
CATALINA_HOME (for Tomcat 4.x)
ANT_HOME

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
Greenhorn

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
Hannah Redmond
Greenhorn

Joined: Jul 18, 2001
Posts: 8
mm, right
i cant seem to get the
J2EE_HOME=c:\j2ee1_3;
JAVA_HOME=c:\JDK1_3_1;
and
TOMCAT_HOME=c:\Tomcat4_0;
to work in my autoexec.bat...
just says bad file name and ignores it.
why?

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??
so
set JAVA_HOME=...
method
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get started with Servlets?
 
Similar Threads
app servers
Tomcat Installation
Servlet Configuration Confusion
What's the point of J2EE, JBOSS, WebLogic...?
javac doesn't see the servlet.jar file