Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieving textbox info from the same jsp page  RSS feed

 
Chris Lim
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am doing a search page. When the user enters some data in the textbox, click Search, it will reload the same jsp page and look for information in the database.

Anyone can advise on how to go about doing it?

Thank you.

Regards,
Chris
 
Mr.David Shapiro
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have the page post back to itself. Use a bean to have the values of your textbox and use its entry as part of an sql query (jstl or a bean with all the sql connect and query processing utilities in it) that will kick off if submit was pressed (jstl can check if param.submit is not empty or you can check with request.getParameter.
 
Sri Gnana
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Create 2 form action, in the first one give action=samepage and in the 2nd form receive the results using the getParameter.
[ May 18, 2006: Message edited by: Sri Gnana ]
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!