permaculture playing cards*
The moose likes Servlets and the fly likes jQuery Autocomplete servlet/jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "jQuery Autocomplete servlet/jsp" Watch "jQuery Autocomplete servlet/jsp" New topic
Author

jQuery Autocomplete servlet/jsp

Nicolas Constanzo
Greenhorn

Joined: Jul 10, 2011
Posts: 4
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jQuery Autocomplete servlet/jsp