• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Servlet and a Jsp traslated servlet

 
Manjusha Muraleedas
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have been asked in an interview ,that, what is the difference between a plain servlet and a Jsp traslated servlet?
In another words, what a plain servlet can do that a jsp translated servlet can not...?

My thought on this qn is:

1. The jsp translated servlet can not use/specify doXXX() methods(may override using jsp declarations. but cannot use).

Please share your thoughts on this Question.
 
Hebert Coelho
Ranch Hand
Posts: 754
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A JSP is like a compiled servlet, but for view. I don't know where your enterviwer was trying to reach.

Next time, look into his eyes for a long time and say: "Servlets can not use EL!".

I believe that he will not ask your another question like that! =P
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13055
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSP are designed and optimized to create HTML - optimization includes implicit objects, EL, etc etc - all for HTML - ie text.
Servlets can handle the complete set of HTTP methods and serve any kind of resource.

Bill
 
Manjusha Muraleedas
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

He must be testing my confidence on Servlets and JSP... Confidence is the BIG thing that matters in an interview.

My thoughts was somewhat correct .But I didn't speak a word....

Thank you all... Thanks alot for the replies.....
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic