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 inner class be public in java?

539


Can we make a constructor final?

533


In a container there are 5 components. I want to display all the component names, how will you do that?

1553


What is the main use of generics in java?

502


What is difference between variable declaration and definition?

507






Can we create object of static class?

521


What is local class in java?

514


Explain a few methods of overloading best practices in java?

498


What do you mean by thread safe?

529


Is java se open source?

560


Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

533


when a request is generated from apache tomcat 5.5 and goes to oracle 10g or mysql,,, how the oracle or mysql reads the request as apache is a web server and oracle 10g is application server? when the oracle 10g provides response, how the apche tomcat reads it???

1666


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

1823


Can singleton class be serialized?

507


What is anagram of a string?

509