Hey all,

So, my app is based around serving data from a web page (a wiki, to be
exact). My code works fine, including the code which reads from the
URL -- however, everytime I run the code it throws an IOException
because the URL times out -- "Timeout while fetching: http://wiki...";

Here's the code. It works fine outside of the GWT/GAE environment, and
it's correctly placed in the server portion of the project with the
required RPC calls.


                  // The URL for the list of wiki skills
                  // Includes all skils, description, and attribute
                  u = new URL("http://wiki.guildwars.com/wiki/
List_of_codex_skills");

                  is = u.openStream();

                  rdr = new BufferedReader(new InputStreamReader(is));

                  // Add each line to the table until end (<!--)
                  while (s != null && !s.startsWith("<!-")) {
                          out += s;
                          s = rdr.readLine();
                  }

                  return out;

          } catch (MalformedURLException mue) {
                  throw new Error("URL Error: " + mue.getMessage());
          } catch (Exception ioe) {
                  throw new Error("Error: " + ioe.getMessage() + " -type- " +
ioe.getClass());
          }

Any ideas on why it times out/how to avoid that? I tried using a
URLConnection instead (it has a setTimeout method), but setting the
timeout to 0 or to a very large number did nothing.

Thanks everyone

--

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-j...@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.


Reply via email to