Solved

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

Posted on 2006-06-11
5
402 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
5 Comments
 
LVL 30

Accepted Solution

by:
Mayank S earned 168 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 166 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 166 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ArrayIndexOutOfBoundException 9 84
Maven Project: Hibernate Dependencies Conflict 10 26
table example 4 29
Unhandled exception type Exception 18 31
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…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…

831 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