Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing values from JSP page to Java program

 
Brian Mulvany
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am creating a cd search engine website. I want a user to be able to type in the name of the cd they are looking for and I will have programs in the background doing the searching for them. Eventually I will search several websites but for now Ill settle just for searching CDWOW and returning their results.
I have managed to create several Java classes that search http://www.cdwow.ie for an album and return the results back as XML but within the Java program. I want the user to be able to use a JSP webpage with a form to be able to search for whatever cd they want. When they type in U2 for example I want U2 to be passed into the Java program. Also I would like the results of the seach that are in XML to be in abrand new XML or HTML file.
Thanks
Brian Mulvany
 
Joel McNary
Bartender
Posts: 1840
Eclipse IDE Java Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds more like it belongs in the Servlets forum (or the JSP forum), but what you need to do is have the form on the JSP POST to a Servlet. Then the Servlet reads the parameters from the form and calls your search engine with those parameters. The Servlet can then either do something with the results or redirect to another JSP page.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic