jQuery in Action, 3rd edition
The moose likes Servlets and the fly likes Setting up to run servlets and JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Setting up to run servlets and JSP" Watch "Setting up to run servlets and JSP" New topic

Setting up to run servlets and JSP

david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185
I am new to all of this.
Could someone please confirm that - all I need to run servlets is the java SDK and the Enterprise edition.
Also, could someone please list ALL of the class paths that I need to set. I have been here for a couple of days and my helloWorldServlet still does not want to run
Thank you for all of your help
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
All you need to run servlets is the SDK and a servlet engine such as Tomcat. I believe that a reasonably current version of Tomcat comes with the J2EE package.
Sun has greatly simplified the classpath situation, you should not have to set anything in order to get simple servlets to run. If you can get Tomcat to run your system should be fine.
Download the servlet and JSP API documents from java.sun.com to read the details of exactly what the servlet environments needs.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
Could someone please confirm that - all I need to run servlets is the java SDK and the Enterprise edition.
Well, strictly, yes. You can do it this way. As Bill suggests, though, most people prefer to use a more powerful "servlet container" than the somewhat clumsy one supplied with the "Enterprise Edition". There are lots of good ones which are free to download for development use:
Tomcat ( from http://jakarta.apache.org/tomcat/ ) is the official "reference", and you'll find a lot of people with experience of using it both here and around the web. Check out our special Tomcat forum for configuration and installation questions.
My personal favourite is Resin ( from http://www.caucho.com/resin/ ). Many people find it sompler to install and configure than Tomcat, and it has many powerful features as well as strong compliance with the servlet and JSP specifications. We now have a forum for Resin questions, too.
There are lots of other free to download servlet and JSP containers, and most of the "big names" have on-line evaluation versions to try out.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
Rick Hightower
Ranch Hand

Joined: Feb 20, 2002
Posts: 350
I agree with Frank.
The J2EE SDK ships with Tomcat. But you can get the latest and greatest version of Tomcat from the link that Frank provided.
If you are new to Servlets and JSP then Resin is the easiest way to get started. It comes with a free developers lic., and solid documentation.
Tomcat is open source so you can deploy it for free as well, but it is a little bit harder to get started.
I've used quite a few servlet containers and Resin is one of my favorites too.

Rick Hightower is CTO of Mammatus which focuses on Cloud Computing, EC2, etc. Rick is invovled in Java CDI and Java EE as well. linkedin,twitter,blog
I agree. Here's the link: http://aspose.com/file-tools
subject: Setting up to run servlets and JSP
It's not a secret anymore!