close nav

close nav


Blog Image

Advantage of JSP Dynamic Web Page (PART-1)  

In this blog we will learn about the drawback/difficulties of writing both presentation logic and business logic together inside the service method of servlet.

We will develop a complete end to end project. We will configure the data base with our web-application and get the data from the database and display it on browser. We will see why there is a drawback/difficulties of writing both presentation logic and business logic together inside the service method of servlet. And why we should go for JSP pages.



-Drawback/Difficulties of writing presentation logic and business logic together inside the service method of servlet.
  • Code become cumbersome/difficult to understand
  • A change in business logic even affects the presentation logic (even you want the same data to be rendered)
  • The html code we are trying to output in servlet to display dynamic data is not easy to understand (HTML formatting has been gone.)
  • Debugging is more difficult
  • Whenever I want to change the way I want to display data again the logic inside servlet should be changed, which may affect the other parts of the servlet and it is not easy to maintain.

About author

User Image
Sriman

A software developer on JDK and JEE platform. I am passionate about Java technology and always an explorer and learner in new technologies in Java. I have experience on Open Source technologies like Struts, Spring, Jsf etc.. and even strong knowledge on Integration/Distributed world like Ejb, Web Services and Restful Services.

1

-Comments

Be the first person to write a comment for this Blog
  • author image
    by:
      BHGROUP
      4 Aug, 2019

    one mistake was there in try with resource , By mistake you told try with resource came in 1.6 instead of 1.7 and isClosable instead of AutoClosable interface. If i m wrong please correct me.

Load More

No More Comments

Leave a Comment

Your comment has been posted and will appear soon.