• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

What to install for servlets?

 
Ranch Hand
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
For java servlet you do not need more than JDK.
 
Saloon Keeper
Posts: 7590
177
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Saloon Keeper
Posts: 7590
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Yohan Weerasinghe
Ranch Hand
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Ranch Hand
Posts: 93
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 507
Netbeans IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic