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
Why is Servlet so popular?
why we should override only no-agrs init() method.
What is the difference between Difference between doGet() and doPost()?
What is the difference between servlet and filter?
What is api in servlet?
When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?
Explain jsessionid?
How will you pass values from HTML page to the servlet?
How do you create a cookie using servlet?
What are the phases of a servlet life cycle?
Is servlet a server side scripting language?
How do I support both get and post from the same servlet?
When should you prefer to use doget() over dopost()?
What do you mean by web applications?
What is meant by a servlet?