If you create an application that is larger than 5 pages, mixing logic and presentation can make your life more difficult. But here is my unpopular opinion - for small applications (or even medium ones) with one developer who "knows his code", it is quite normal to use JSP for business logic. It can be jsps placed in the /action/ folder, which is later redirected to presentation ones, or it can be the same jsps where the request comes from. I have an example for this - at the beginning of my development practice, I created a network strategy game based almost exclusively on jsps self-service. That was 5 years ago. A few weeks ago, I looked at my code base, and I could understand everything. Therefore, if you are just starting out, and do not want to start with a large structure that will make your learning curve even steeper, and you do not expect your project to be very large or become commercial (sidenote: mine became commercial at some point) then feel free to use jsps for business logic, but keep in mind that this is not good practice in the general case.
Bozho Dec 02 '09 at 8:07 2009-12-02 08:07
source share