aspose file tools*
The moose likes Servlets and the fly likes What to install for servlets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "What to install for servlets?" Watch "What to install for servlets?" New topic
Author

What to install for servlets?

Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Hi all,

I am very much new to servlet, just started learning it. Anyway I need to install something, another SDK called JAVA EE, rather than a the JDK isn't it? I am having JDK 7 installed in my computer. Now, in order to create Servlets, what should I install? What is the version? Is that version compatible with JDK 7? Please give me a URL to download the correct versikon of the correct software. Thanks


Are you better than me? Then please show me my mistakes..
abani patra
Ranch Hand

Joined: Oct 11, 2011
Posts: 70
Hi,
For java servlet you do not need more than JDK.
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
The only other thing you need is a servlet container like Tomcat. Its web site talks at length about all the requirements, but suffice it to say that it's compatible with Java 6 and Java 7. It also comes with the servlet-api.jar and jsp-api.jar files that you'll need in your classpath to compile servlets.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Thanks a lot for both of your replies. Anyway I have to learn JSP too. However our lecturer said we have to install "Java EE SDK".

I just went through the book and we have to use something called "J2EE DEPLOY TOOL". That is like TomCat and available inside the JAVA EE SDK right? OK, so what is the version I hvae to install? I have JDK 7
Tim Moores
Rancher

Joined: Sep 21, 2011
Posts: 2408
However our lecturer said we have to install "Java EE SDK".

Maybe you have to do that for the purposes of your class, but you certainly don't have to do that to develop and run servlets.

I just went through the book and we have to use something called "J2EE DEPLOY TOOL". That is like TomCat and available inside the JAVA EE SDK right? OK, so what is the version I hvae to install? I have JDK 7

J2EE is way outdated. Seriously, don't touch that. Anyway, the deploy tool has nothing to do with Tomcat. It is related to the J2EE server that comes with the J2EE SDK.

What you CAN do (although I wouldn't recommend it to a servlet beginner) is to install the JEE SDK - it comes with a server called GlassFish which can run servlets, amongst many other things. (Note that JEE is not the same as J2EE; J2EE is the old, obsolete version of JEE.)

Still, Tomcat will be much easier to use if you just intend to develop servlets and JSPs. You should point your lecturer to this discussion; teaching (or using) J2EE in 2011 is really not acceptable.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Thanks a lot for your quick replies Tim Moores. I am very much glad to know, that to PROGRAM a servlet, the only need is the JDK. OK, so, If I install the TomCat, I don't have to install the JAVA EE isn't it? However seems like we have to work on both of them so I have to install the both. Anyway, does the latest JAVA EE (that is version 6, isn't it?) supports JDK 7?
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

I just noticed that javax.servlet.* package and javax.servlet.http.* package are NOT available in JDK. Are these are available in the JEE SDK which we talked about?
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

When you install Tomcat, the jars are available in the lib folder.

Do not copy them anywhere else or move them. Leave them be and add them to your compilation class path in-place.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Bear Bibeault wrote:When you install Tomcat, the jars are available in the lib folder.

Do not copy them anywhere else or move them. Leave them be and add them to your compilation class path in-place.


Thanks a lot for the reply. I will install that, and will come back BECAUSE I will have DEPLOYMENT issues for sure.
Mary Chellapa
Ranch Hand

Joined: Jul 26, 2011
Posts: 93
jsp and servlets are not part of JDK..You need JEE(until java 1.4 ), but I think newer JDK(5,6,7) support jsp/servlets. (NOT very sure of this,Please correct me if I am wrong)
anyways ... other than your teacher... can Isuggest a good resource for beginner coreservlets.com and jsptut.com.

Eclipse/ Tomcat is popular combo than glassfish etc.
just my 2 cents


Mary
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61606
    
  67

Mary Chellapa wrote:jsp and servlets are not part of JDK..You need JEE(until java 1.4 ), but I think newer JDK(5,6,7) support jsp/servlets. (NOT very sure of this,Please correct me if I am wrong)

You are wrong.
Yohan Weerasinghe
Ranch Hand

Joined: Oct 07, 2010
Posts: 499

Hi, all

I downloaded it, installed it, created the directory structure and managed to deploy after A HUGE STRUGGLING AND SEARCHING FOR THE DATA. Thanks all of you for helping me. I really appreciate it.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What to install for servlets?