Difference between JSP & servlets.

Answer Posted / sivasubramanian.k

JSP are simply the html pages with some Java code
encapsulated in special tags. We use them in that case when
a smaller part of page is generated dynamicly.

Servlets on the other hand, are pure Java classes extendend
from javax.servlet.http.HttpServlet. They can generate html
pages too.

JSPs are subclasses of Servlets. They do thing the other
way with the HTML or presentation code being written and
the code being placed between special tags <% %>. The first
time a page is requested, the JSP compiler creates java
code, compiles it, registers the servlet and calls it.
After the first request, each additional request calls it
like any other servlet.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

There is a square of side 6cm . A circle is inscribed inside the square. Find the ratio of the area of circle to square.

741


The main line train starts at 5.00AM and the harbor line train starts at 5.02AM. Each train has the frequency of 10 minutes.If a guy goes in the morning at a random time what is the probability of he getting main line train?

937


Which is the largest prime number that can be stored in a 9-bit register?

736


A student is ranked 13th from right and 8th from left. How many students are there in totality ?

883


epaulette : shoulder :: tiara :

786






If 8 men are required to complete a work in 6 days, how many men will be required to complete the same work in ½ day?

682


Can you tender a one rupee note in such a manner that there shall be total 50 coins but none of them would be 2 paise coins.?

960


If a bank clerk can process 80 drafts in half an hour, how many drafts can she process in seven and half hour day?

706


Six squares of same dimension are kept side by side to make a rectangle with a perimeter of 182 cm. what is the perimeter of each square.

730


"what category of job are you looking for and why"asked from an mep engineer.

1708


Find the difference of the minimum number of numbers required to form every number from 1 to 1234 and 1 to 4321.

866


Two chords of lengths L1 and L2 are drawn in a circle. Their lengths are inversely proportional to the straight distance joining the centre.Find the radius of circle.

786


a man purchased 6 stamps of rupees 1 and seven stamps of 50 paise.he paid Rs. 12. how much change he got back ?

761


the difference b/w the compound interest payble half yearly and the simple interest on a certain sum cont out at 10% p.a for 1 year is Rs 25 what is the sum

897


a, b, b, c, c, c, d, d, d, d, . . . . . . Find the 288th letter of this series?

979