Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Calling Java classes

 
Brian Mulvany
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I have a series of Java classes that search www.cdwow.com for cds and returns the values in xml format. The program searchs for cd's for whatever paramater I set it to search for within JBuilder.
I also have a basic servlet working that takes a value from a html form and returns the value.
I want to be able to use whatever value enter in the html form to be entered into the java class as a search paramater.
I have the servlet and the classes for searching in two seperate packages.
I presume I have to call the classes from inside the servlet somewhere but Im not sure how.
If anybody has any help I would be more than grateful.
Thanks
Brian Mulvany
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You would call them the same way you would call them from any other java program. Make sure that you package is under WEB-INF/classes or, if you have them jarred up, under WEB-INF/lib.
 
Elihu Smails
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you would instantiate your search class just as if the servlet class were any other class. There is really no special logic involved. Are you having some other problem?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!