Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

string passing from one page to another

 
abhijeet srivastava
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all!!

I want to design a web page in jsp which contain a text box and a button. As I enter any search string in text box and press button it should pass this string to other searching tool say google search page text box, get all results and display that to my jsp page. All this should be done without opening google page.

ie; I want to use google searching through my jsp interface.
How it is possible???
[ December 26, 2006: Message edited by: Bear Bibeault ]
 
Anu Pillai
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way to do it (i am not saying its the best or even good) is to use JavaScript, access the Google page as a DOM object, populate the textbox in the Google page with the value entered in your jsp page and submit the form in the Google page. It will return the results.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google provides a service API just for this purpose. In fact, I wrote a chapter on using just such services in the Ajax in Practice book. If you are interested, the book is available via the Manning Early Access Program.

Or you could research the API on your own. It's available on the goggle web site.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64631
86
IntelliJ IDE Java jQuery Mac Mac OS X
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic