Is this a Google Web Toolkit question? It's not clear from your email - Web
Application Project can refer to a GWT project, an App Engine project, or a
combination of both.
If this is a GWT project, you'll want to ask your question here:
https://groups.google.com/group/Google-Web-Toolkit?pli=1
More likely than not, the error you're seeing is because you are trying to
use java.net. GWT compiles to Javascript which, other than same-domain-XHR
calls, cannot make network calls. If you were looking to do this, you would
have to make a RemoteService call to your server side code which will then
invoke java.net.
Ikai Lan
Developer Programs Engineer, Google App Engine
Blog: http://googleappengine.blogspot.com
Twitter: http://twitter.com/app_engine
Reddit: http://www.reddit.com/r/appengine
On Mon, Mar 21, 2011 at 6:13 PM, John Mathew johnmathew1...@gmail.comwrote:
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
google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.
--
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 google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.