ajkishore
ajkishore

Reputation: 41

How can i retrieve data from Database using Java Server Page?

How can i retrieve data from Database using Java Server Page? Can anybody help me to know the concepts, because am a new one to work in Java Server Page.

Upvotes: 0

Views: 80

Answers (2)

Joop Eggen
Joop Eggen

Reputation: 109613

One can use the sql tag.

However often one sees a separation using MVC, Model-View-Controller.

Where a servlet (controller) fills the data (model) in a request attribute, and forwards to a JSP (view), that uses the resulting request attribute.

Then the JSP functons as a template and is more readable.

Upvotes: 2

Santhosh
Santhosh

Reputation: 8217

For beginner to java-ee i would recommend to read the tutorials of Oracle Documentation which are very helpful and provides strong basics .

Apart from it you can find many basic examples in the below sites

And to your question here is the example. As @joop stated it very important to adhere MVC pattern

Hope this helps

Upvotes: 2

Related Questions