Solved

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

Posted on 2006-06-11
5
401 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
basic hardware to learn oop advanced design patterns 3 88
create a gui in perl 3 72
what is a "java.lang.System Property"   ? 20 57
egit plugin on eclipse 8 40
Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
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…
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.

867 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now