why business logic written using servlets not in jsp. Jsp
used for presentation purpose. serlvet used for coding
business logic and controller logic. Reason for using
servlets in business logic.
Answer Posted / gopika
In layman's terms, JSP is core Java embedded in HTML. Servlet has HTML embedded in core Java. You must be aware that HTML is used to define the page structure of a web page at the client side and it deals with how to present the data in a web page. The purpose of JSP introduction is to add very few lines of core Java to help display the web page at the client side and hence, populating many lines of core Java is not appreciated in JSP.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the main purpose of java servlets?
What are the phases of servlet life cycle?
What are the advantages of servlets over traditional cgi?
What are its drawbacks of cgi?
What's the difference between servlets and applets?
What do you mean by servlet?
What are different methods of session management in servlets?
Tell the new features added in servletrequest interface i.e. Servlet 2.4
Why do we have servlet wrapper classes?
Describe some assignments that are executed by servlet container?
Why doesn’t a servlet include main()? How does it work?
How do you invoke a Servlet? What is the difference between doPost method and doGet method?
Differentiate between the get and post method
Why do we need servlet filter?
What is load-on-startup in servlet?