File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Examples of using servlets to search and display the details from database. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Examples of using servlets to search and display the details from database." Watch "Examples of using servlets to search and display the details from database." New topic
Author

Examples of using servlets to search and display the details from database.

Loh Peggie
Ranch Hand

Joined: Jul 09, 2009
Posts: 51
Hey guys do you have any great examples of link that enables me to search the productid from database using servlets and jsp and then display all the information from the database, so that if there is any wrong info I can edit from it and display it again



Thanks
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39548
    
  27
The fastest way of getting all that up and running in one go (assuming that you don't yet have any of pieces involved) is probably to use Grails. If you're asking about any specific piece of it, tell us which one that is.


Ping & DNS - updated with new look and Ping home screen widget
Loh Peggie
Ranch Hand

Joined: Jul 09, 2009
Posts: 51
I see i see. Thanks

Oh I mean that for example, I create a servlet and jsp to search for productid from the database and when I search for productid:1101. All information regarding on 1101 will display.

Thanks
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1506
I will make this very simple. Using teh very common MVC pattern, you will have the user enter the item to seach for in the browser and hit submit, That will go to a servlet (controller) get that will get that and call the backend businnes logic that will search the database, possible using a DAO, the results will be passed back to teh controller preferably via a business object (also called a data transfer object). The controller will add object holding the results to a certain scope (session, request, application) as an attribute, where the jSP can find it and then forward the request to the JSP. The JSP will then get it and process it so that the browser can display it. You will have some tags in your JSP to help doing this.

You may want to search for MVC pattern. I am sur eyou can find example of something similar.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Examples of using servlets to search and display the details from database.
 
Similar Threads
JTable question
edit, delete, clear
jsp & database
Disadvantage of using Vectors
how to display image using servlets..?