Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

what are jsp, servlets and ejb's used for?

Posted on 2006-06-11
5
Medium Priority
?
407 Views
Last Modified: 2013-11-24
can some1 explain the above in nice simple english plz
no links
thanks in advance
0
Comment
Question by:teachmejava
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 30

Accepted Solution

by:
Mayank S earned 672 total points
ID: 16881206
JSPs and servlets are meant developing web-applications using Java, which you can access from the network using a browser, like Experts-Exchange.com itself. A JSP is like an HTML page with Java code embedded in it, so the output can dynamically change (though it will run on the server side). A servlet is like a web-server side Java component which can be used for doing any kind of processing you want.... it needs a servlet container to run on the web-server (like Tomcat). A JSP is also compiled into a servlet.

An EJB is a remote Java component which executes some business-logic, takes care of transactions, etc. You can call it from remote Java clients which can be stand-alone applications, JSPs/ servlets, EJBs themselves, etc. You need an EJB container to run an EJB.... it also takes care of persistence of the bean objects, transactions of various users using the EJBs, etc. Very often, you prefer to have an application server which is bundled up with a web-server, servlet-container, EJB container....
0
 
LVL 9

Assisted Solution

by:matthew016
matthew016 earned 664 total points
ID: 16888356
With only HTML u can make static web pages : the user can only consult the page and interact with the links.
HTML can include scripts to have a dynamic website, like JavaScript :
but it is limited, can't hide source code, slow, ...
With JSP u can acces and update a DB, files, ...
It is similar to PHP and ASP technology.
JSP files contains HTML code and java code that u can include.
A JSP file is a way to write a servlet. It is actually compiled, before its first execution, into a servlet, so that the web server can understand the code.
The syntax of JSP files is especially convenient when u have less java code and more HTML code.
The servlet is especially convenient when u have a less HTML code and more Java code.
0
 
LVL 2

Assisted Solution

by:ramsin112400
ramsin112400 earned 664 total points
ID: 16898080
In addition to that If you want insert java code into HTML go for JSP which in turn compiles into a servlet. JSP's are meant for web application development.

On the other hand, servlets are used to enhance the server functionality, by creating a thread for each incoming request, so that the server can process many requests simultaneously.

EJB are nothing but java components (group of java classes), but when you deploy them in a application server, the container will provide some services like transactions, persistence, security etc releaving the burder of programmer.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
This video teaches viewers about errors in exception handling.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question