Reputation: 69
Hello friends i want to know whether writing jdbc connection in jsp is it a good way or not in spring frame work.
Upvotes: 1
Views: 302
Reputation: 803
Not it's not a good way.
This is really a bad design. You are using spring-mvc so I guess you are using the MVC pattern. In the MVC pattern the V(iew) is your jsp and the only responsability of the view is to display a M(odel). This M(odel) comes from the C(ontroller) and must not be built/fetched from the View.
More information on the MVC pattern : http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
Upvotes: 2