Solved

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

Posted on 2006-06-11
5
400 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:
mayankeagle earned 168 total points
Comment Utility
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
Comment Utility
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
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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:

743 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

12 Experts available now in Live!

Get 1:1 Help Now