urobins
asked on
is it possible to query imdb.com from my website using a jsp page
I wanted to write a JSP page for my website that would allow a user to enter a movie name and then query IMDB.com and display the page with the info on that movie. Is this possible, and if so how would I do it?
thanks!
thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Use the following page to call the page I posted in my first post.
<html>
<head>
<title>Movie Info</title>
</head>
<body>
<form action="getMovieInfo.jsp">
Please enter movie title:<input type="text" size="25" name="movieTitle"/>
<input type="submit" value="Get movie info"/>
</form>
</body>
</html>
But if you want the whole page you don't even need JSP. You could use the following in a frame on one of your HTML pages.
<html>
<head>
<title>Movie Info</title>
<script>
function GetInfo(){
window.location = "http://imdb.com/find?s=all&q="
+ encodeURIComponent(documen t.movieFor m.movieTit le.value);
}
</script>
</head>
<body>
<form name="movieForm">
Please enter movie title:<input type="text" size="25" name="movieTitle"/>
<input type="button" value="Get movie info" onclick="GetInfo();"/>
</form>
</body>
</html>
<html>
<head>
<title>Movie Info</title>
</head>
<body>
<form action="getMovieInfo.jsp">
Please enter movie title:<input type="text" size="25" name="movieTitle"/>
<input type="submit" value="Get movie info"/>
</form>
</body>
</html>
But if you want the whole page you don't even need JSP. You could use the following in a frame on one of your HTML pages.
<html>
<head>
<title>Movie Info</title>
<script>
function GetInfo(){
window.location = "http://imdb.com/find?s=all&q="
+ encodeURIComponent(documen
}
</script>
</head>
<body>
<form name="movieForm">
Please enter movie title:<input type="text" size="25" name="movieTitle"/>
<input type="button" value="Get movie info" onclick="GetInfo();"/>
</form>
</body>
</html>
ASKER
Thanks let me try this I appreciate the help. Now you say I can parse just certain parts, but I would need to know what they were called on IMDB Right? I am just confused at how to pull info from a site I don't manage. I have looked for some tutorials but haven't found a whole lost using JSP and my book isn't all that great either.
Which book are you using ?
There is a lot of info online. Google is your friend.
There is a lot of info online. Google is your friend.
ASKER
How do I get it so I can use the Hyperlinks on the returned page?
>Now you say I can parse just certain parts
But, I didn't say it would be easy. Depends on what you want to do.
But, I didn't say it would be easy. Depends on what you want to do.
ASKER
I bought Beginning Java EE5. I found a lot of JSP info online but a lot of it is over my head, or too basic "hello world" world examples. Thanks again. I can get it to return the IMDB page but I have the problem where a movie title will return multiple matches and I can't select them...
ASKER
>But, I didn't say it would be easy. Depends on what you want to do
Oh :) thats probly much greater than where I am at huh :)
thanks for all of your help.
Oh :) thats probly much greater than where I am at huh :)
thanks for all of your help.
ASKER
Thank you!
ASKER