Difference between JSP & servlets.



Difference between JSP & servlets...

Answer / 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

More General Aptitude Interview Questions

A, B, C, D, E, F, G, H, I are all of squares which are combined in a square. Area of B is 81 cm2. Side of A is 1 cm. Then find area of I?

0 Answers   Accenture,


out of three numbers first is twice the second and is half of third.if the average of the 3 number is 56 the three no. in order are

3 Answers  


En statements par vichaar kariye. 1. Bharat me 'Janta' se bada koi nahi hai. 2. Bharat me 'Samvidhan' se bada koi nahi hai. 3. Bharat me 'Rashtrapati' se bada koi nahi hai. Enmein se kaun sa/se sahi hai/hain? a) Only 1 b) Only 2 c) Only 1 & 2 d) Only 2 & 3 e) All 1, 2 & 3

1 Answers  


15 : 50 :: 18 : ? (A) 55 (B) 59 (C) 64 (D) 62 answer is 59 but how?

4 Answers   FCI,


A boy multiplied a number with 10 and got 100,instead of dividing it . If he divided it what would be the answer?

0 Answers   IBM, TATA,






Which of the following countries enjoys a federal form of Govt.? i)China,ii) USA, iii) cuba, and iv)Belgium

2 Answers   Sodexo,


Argentina had football team of 22 player of which captain is from Brazilian team and goalki from European team. For remaining player they have picked 6 from Argentinean and 14 from European. Now for a team of 11 they must have goalki and captain so out of 9 now they plan to select 3 from Argentinean and 6 from European. Find out no. Of methods available for it

0 Answers   Cognizant,


If you are using C language to implement the heterogeneous linked list, what pointer type will you use?

1 Answers  


What is integrity pact ?

1 Answers  


Sir iam going to write exam for the post of Officers under training in APSRTC. Please send me the model papers to my mail ganjiramji@gmail.com

0 Answers  


If + means * and * means / and / means %. what is the value of 2+3*5/7?

26 Answers   Accenture,


suppose you select in this company after six month you will get big job in mnc. Are you go there?

2 Answers  


Categories