This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds and have James Denton on-line!
See this thread for details.
Win a copy of Learning OpenStack Networking: Build a solid foundation in virtual networking technologies for OpenStack-based clouds this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Quick Search Results page cant put multiple results into a table  RSS feed

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
Sheriff
Posts: 23692
50
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're asking why your query returns zero records? That sure looks like a JDBC question to me. Moving...
 
author & internet detective
Sheriff
Posts: 38561
654
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!