We can write any Java Logics in our JSP. Then why we are
using servlets(Controller Layer) to interact with the DAO ?

Answer Posted / madhuri

ya u can write your java logics in scriptlet part of jsp or
u can use jsp action tags to implement the business logic.
but its not the good practice to implement the business
logic in jsp's.mainly the use of jsps is to seperate the
presentation logic and business.. so its better to use
jsps only for presentation purpose..u can write business
logic in action classes or in the servlets..

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Write a method to check if input string is palindrome?

575


Why is a singleton bad?

550


Can you explain inner class.

586


Does a function need a return?

525


What is abstract class? Explain

589






Explain the private field modifier?

604


How do you know if a value is nan?

557


What are the 4 versions of java?

551


What happens if we don’t define serial version uid?

563


What is difference between class and object in java?

521


What is the purpose of default constructor?

569


How you can force the garbage collection?

533


What are the features in java?

572


Explain what access modifiers can be used for variables?

585


What java is used for?

653