Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between Servlet and JSP?Advantage of
JSP over Servelt?Any concept present in JSP which we cant
implement in Servlet?

Answer Posted / fazal

1)A JSP is typically oriented more towards displaying
information, and a servlet is more oriented towards
processing information. For example, a JSP might display a
report, while a servlet would process a user submitted
form. These uses are not exclusive, but they are optimized
more for performing tasks in this manner. It is much easier
to incorporate HTML coding into a JSP than a Servlet. It is
also easier to write more complex Java code in a servlet.

2)JSP has Implicit objects and Servlets do not.
3)JSP and Servlet both define the server end functionality
to provide dynamic outputs ,As we know our HTML is only the
client end technology version which runs on client browser.
JSP and Servlet differ each other in terms of represntation
and execution cycle. Servlet are full functional java codes
that define the output like write to stream files in
protocol defined ways, JSP on the other hand is Role
Sepated format to do so where a ordinary web designer
designes how will be the presentation of the data and
Programmer defines the functinality to provide the
underlying things represented in conditional and non
conditinal ways , But here is the magic of JSp that merges
the both HTML represntation mixed with JAVA scriptlets.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can you create a deadlock condition on a servlet?

1028


What is servlet used for?

1095


How can we include static files in the jsp page?

1015


Why filter is used in servlet?

939


What do you mean by servlet?

1105


Why servlet is used as controller ? Not JSP? I want complete explation?

1079


What are the functions of the servlet container?

1556


What do you mean by singlethreadmodel interface?

997


How to upload a file to the server using servlet?

954


What is the inter-servlet communication?

1134


I have a requirement Here we have a ResultSet object that will contain 50 records i need to print those recors in to a webpage(i.e; view according to MVC architectures that mybe servlet or jsp) . Here i need to print the records 10 per page that is 1 to 10 in page one and 11 to 20 in page two like remaining will be appeared in other pages we need to display those page numbers whenever we click on that page number we will go to that page and display 10 records like we will display 5 pages it is like this << 1 2 3 4 5 next >>

2907


Which HTTP method is non-idempotent?

1068


Explain the jar and war files in servlet?

1044


What is java servlet session?

919


Should I override the service() method?

1044