aspose file tools
The moose likes JDBC and the fly likes Quick Search Results page cant put multiple results into a table Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Quick Search Results page cant put multiple results into a table" Watch "Quick Search Results page cant put multiple results into a table" New topic
Author

Quick Search Results page cant put multiple results into a table

John Turner
Greenhorn

Joined: Dec 19, 2010
Posts: 6
Hi all,

I have a little problem regarding my quick results search page created with jsp and jstl. What is wrong is that after I submit my quick search jsp form and the servlet processes the request, the results page is not appearing, only stating that no books match my search criteria. So it is not forwarding to the results page, even though I know there are multiple results i nthe database which should be output to a table. Here is my code:





Again to clarify, I know my database has more than one search term such as different java books, but when I select "All" from my search form, and submit this, instead of forwarding this to the results page, it gives me an error that no resources match my search criteria. However, when I search for a specific title, the book will be displayed in the results table. How can I get my code to actually display all the results that match the search term provided by me?

Thanks if you can help.

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

You're asking why your query returns zero records? That sure looks like a JDBC question to me. Moving...
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 26192
    
  66

I see two things that are odd.
1) It looks like you only run the query if "all" is selcted? This seems like it isn't what you want.
2) The actual query looks for a title. If you are looking for "All", you'd need to omit the where clause.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Quick Search Results page cant put multiple results into a table
 
Similar Threads
small question for a e-store problem
Displaying the right details of a resource taken from a JSP results page
how to display data from database on jsp using struts2
JSP two pages
Number Format Exception