Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jQuery Autocomplete servlet/jsp

 
Nicolas Constanzo
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everyone,
I've been looking all around for an efficient way to implement the jquery autocomplete javascript on my website but so far I haven't been able to make it work.
What I want to do is to have a text field that when the user starts typing, a search of the database will be made and the user would be given "suggestions".
Considering that I currently use servlets to fill the data on most of my jsp pages, I thought maybe I could use a servlet that could call on a DAO.
Like so:
String sql = "SELECT name FROM User WHERE name LIKE '"+str+"%';
Or should the texbox already know which values to select from?

Is this the way I should be approaching this? Because so far all of the tutorials I have found so far haven't worked for me. I don't know PHP or JSON if that's needed to do this.

Any help on this would be greatly appreciated, I have been looking everywhere!

Thanks in advance,
Nick
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic