Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

Difference between servlet and JSP?

  Asked By: Craig    Date: Sep 07    Category: Java    Views: 3026

Difference between servlet and JSP?
Different between webserver and Application Server?



3 Answers Found

Answer #1    Answered By: Topaz Ramirez     Answered On: Sep 07

1. A servlet  is a complied java program that runs on a web server.
Often (maybe usually) it will generate a web page for all to see. A
JSP (Javaserver page) is a web page with embedded java code (or a java
file with embedded HTML). THe first time the page is accessed, it is
compiled into a servlet.

2. A web server  handles HTTP requests from a browser and delivers web
content to it. An application  server is the "business end" of some
sort of application (let's say a payroll system) where it is accessed
from some thin client. A web server may be used as an application
server if the application is a web application. Or, if you view
reading web pages as an application, I guess a web server can be an
application server, too. Hope that isn't too confusing.

Answer #2    Answered By: Angie Bennett     Answered On: Sep 07

Go to Google.com ....Type that Question and refer that

Answer #3    Answered By: Ray Lawrence     Answered On: Sep 07

Iam answering your question about differences between JSP and servlet. When
Internet was invented, they were less number of people using that and so the
websites were not that advanced, to take care of every sort of customers, and so
are the Languages or API that are used to develop Web Applications. They were
mainly just HTML pages that are used then for building webpages. And later on
the usage of internet increased and so the demand for quality websites. So a
website must react to what user want and give that concerned webpage. And so was
developed Servlet. A servlet  is basically a Server application  that runs on
server and serves the webpage, that a customer requires even in modified form if
required.A servlet just sends a HTML page that is created dynamically. But here
is again a problem is there, the webpages are dynamically created, but does not
solve all the problems. So the need was to create some API that could be used to
build Webpages as if they are Applications, so
came the JSP. In this you can use Java code to build webpage as if it is a
normal application. Both have there own advantages and disadvantages. It is not
that a particular thing can't be done is anyone method, but JSP is easy to use.

Didn't find what you were looking for? Find more on Difference between servlet and JSP? Or get search suggestion and latest updates.