?
Solved

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

Posted on 2006-06-11
5
Medium Priority
?
406 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

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…
A solution for Fortify Path Manipulation.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month12 days, 12 hours left to enroll

777 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