Member Avatar

I am using netbeans to do "Library book search system"in EJB.

I have a html page in which I want to display the list of books that match with the entered keyword.

I get the keyword from the user and send it to a servlet through an ajax funtion which will inturn send it to the session bean.

Question 1:I only know to use "get" method to retrieve one value in a particular field. But I want to retrieve all the record values that match with the value entered form the session bean. How do I do that?

The session bean will return all the retrieved values to the servlet which will return all the values to the ajax funtion in the html page.

Question 2: How do I display(in the HTML page) the data I receive from the server in a structured format? (Like How google displays the retrieved websites as a list)

Thanks in advance.

Recommended Answers

All 2 Replies

Question 1: Return the whole recordset

Question 2: Lots of different ways, depending on your site and design. If you design HTML that allows for repeating lines then just loop through the returned recordset and build that over and over.

Member Avatar

I have to use entity bean in the project.If I give queries from the session bean, wont that be like not using the entity bean? How should I do it using entity bean?

I dont know how to loop through statements in HTML. How do i do that?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.