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

Answer Posted / sujatha

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 ?    11 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we have any code between try and finally blocks?

560


Which is better stringbuffer or stringbuilder?

527


How transient variable is different from volatile variable?

560


What is bitwise complement?

498


Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?

570






Can a final variable be manipulated in java?

532


Is there a way to increase the size of an array after its declaration?

599


For ease of programming you can consider the maze as a 2D array with colors represented by below integer and characters (in capital letters). • B - Black • W -White • G- Green • R- Red R B W B W W W W W W B W B B W W W W W W W B W B W W W B W W W W B B W W W B W W W B W W B B B B W B W B W W B W W W B W W W B B B W W B W W W B W W B W B W W W B W B W W W W B B W W W W B W W W W W G Shortest Route Problem: • Solution that finds the shortest Route between Red and Green  White will have 1 Weight.  Red and Green carry no weights.  Shortest path is the path with less weight when you add up the weights in the path.

1583


Given a singly linked list, determine whether it contains a loop or not without using temporary space?

580


Can we declare the main method of our class as private?

551


What are actual parameters?

522


How we can skip finally block of exception even if some exception occurs in the exception block in java?

523


What is private static in java?

577


Is 0 true or false?

512


Which is a valid identifier?

544