I am trying to create a web application, where the user can pick a name of a movie (ex. “Skyfall”) from a dropdown list. Then I want to execute a crawler to go to rottentomatoes.com and fetch all the html pages relating to this movie. I have created my web application (the GUI) in Eclipse using Tomcat. I have a web crawler: crawler4j, which runs if I choose to run the main .java file as an application. How can I combine these two?
- Is it possible to call the java class file with the
parameter (name of movie) from html ? - Do I have to create a separate Applet with the crawler, in
order to execute it within my html? Can I do that and send strings
with that (the name of the movie from the html
, so I need to send that with the crawler search)?
I solved this by implementing a Servlet which activates the crawler, as Marvo suggested in comments.