I'm using Google Application Project and what I want to do is create a text
box and button. whatever the user enters in the box, it would reference a
website for information like wiki or bing or yahoo or whatever. I managed to
create the panel via google widgets so I can enter whatever and it'd print
via system.out.println. On a Java project I can obtain html page source via
java url as shown below:
URL urlsearch = new URL("http://www.bing.com/search?q=lion");
BufferedReader buffreader = new BufferedReader(new
InputStreamReader(urlsearch.openStream()));
String HTMLdisplay;
while ((HTMLdisplay = buffreader.readLine()) != null) {
System.out.println(HTMLdisplay);
}
buffreader.close();
What I can't do is have them together. It compiles fine so no errors show on
Eclipse Console but when I run via Development tab I get a variety of errors
saying "The import java.net cannot be resolved" and "URL cannot be resolved
to a type."
I know there are google functions along with API keys such as
google.search.SearchControl leading to google.search.WebSearch(). There is
also Custom Search engine provided by google (http://www.google.com/cse).
I've found things from code.google that I can query their search engine and
return results but nothing to allow me to grab the page source like Java URL
and php get_file_contents.
Does anyone know why I am not able to use Java URL on my Google Web
Application project but it runs fine on a normal Java Project?
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.