why servlet is used as controller not JSP?

Answers were Sorted based on User's Feedback



why servlet is used as controller not JSP?..

Answer / javasheavenforu

JSP can be used as controller because it is converted into
servlet ultimately.But this is a violation of MVC pattern.
If you want to follow the pattern then you need to seperate
your presentation part and controller part.

Is This Answer Correct ?    31 Yes 1 No

why servlet is used as controller not JSP?..

Answer / xxx

while using in mvc1 architechture jsp is used as the
request and the response so that the presentation and
apllication logic are the same component but in case of
using servlets in mvc2 the advantage over this is that the
request is handled using jsp but the response and the
overall manipulation is done by using the servelet so that
the presentation and application logic are the same...ie
the difference

Is This Answer Correct ?    10 Yes 5 No

why servlet is used as controller not JSP?..

Answer / gopikrishna

JSP is a scripting language flexible for webdesigners to
undersatnd the tags with java language and this is
espicially for presentation, as in this struts scenario,
Servlet is a component which is responsible for taking the
contents of incomming http requests and decode and process
for furthur forwarding rather than presenation...So this is
genaral way of thinking to understand y they had chossen
servlet instead of jsp. if we are having a beeter
understaning of jsp and servlets then, we ourself can
decide which one is more better if your way of thinking
also considering the load balancing issues.

Is This Answer Correct ?    10 Yes 6 No

why servlet is used as controller not JSP?..

Answer / sri

servlet only communicate with container. if suppose any java
class can communicate with container no need to servlet.

jsp is also internally conerted to servlet...

Is This Answer Correct ?    1 Yes 0 No

why servlet is used as controller not JSP?..

Answer / sarathchandra t

Html is used in jsp and http is used in servlet.

Is This Answer Correct ?    1 Yes 0 No

why servlet is used as controller not JSP?..

Answer / zesan

Because when ever request is come then servlet is handle and
communicate to model and model process data and send back to
servlet . servlet those process data store into reositry area
then servlet can communicate to jsp and jsp response to
client . so every thing is done by servlet that is reason
servlet is used as controller.

Is This Answer Correct ?    0 Yes 0 No

why servlet is used as controller not JSP?..

Answer / sarathchandra t

Servlet is used in http server and jsp is used in html server.

Is This Answer Correct ?    0 Yes 0 No

why servlet is used as controller not JSP?..

Answer / sarathchandra t

Motor is not present.
Controller is present in the chip binarycodes are present.

Is This Answer Correct ?    0 Yes 1 No

why servlet is used as controller not JSP?..

Answer / anonymous

There is NO difference between servlet and jsp page.
Since Jsp should be converted into Servlet, there is
virtually no difference. These type of questins are being
used to trap the candidates.
Thats about it.

Is This Answer Correct ?    8 Yes 18 No

Post New Answer

More Struts Interview Questions

Which design pattern is implemented by Struts2 interceptors?

0 Answers  


What is the life cycle of actionform?

0 Answers  


What happens when Two users requests for same action class? How the threads are controlled?

4 Answers  


How you will enable front-end validation based on the xml in validation.xml?

0 Answers  


how does request processor relates to action mapping?

0 Answers  


What are the aware interfaces in struts2?

0 Answers  


What is struts2 in java?

0 Answers  


how to write uploadphoto in the insert update delete using struts? write code struts and jsp jdbc

1 Answers  


can anyone help me to send the code for Jasper Reporting in java?plz

3 Answers   CSC, RFT,


What is role of action class?

0 Answers  


What is the use of jsonvalidation in struts?

0 Answers  


Explain about struts relation to html tags?

0 Answers  


Categories