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
How to commuincate between an applet and a servlet?
Is servlet a controller?
Is servlet a framework?
What is servlet and how it works?
What are the advantages of cookies?
How can we upload the file to the server using servlet?
What is called servlet container?
Elucidate servlet attributes and its scope?
When should you prefer to use doget() over dopost()?
How do we go with database connection and log4j integration in servlet?
Explain the servlet context.
Which is better jsp or servlet?
What is the difference between the getrequestdispatcher(string path) method of javax.servlet.servletrequest interface and javax.servlet.servletcontext interface?
Explain Action Servlet?
Why HttpServlet class is declared abstract?