title: Get whole Information of JavaServer Page -- Web Scraping
body: <p>I'm trying to connect to an URL Homepage with <code>java.net.URLConnection</code> and just get the websource code as a <code>String</code>. With my webbrowser the homepage is completly loaded (takes some time) and a list is filled with some items (in SourceCode: <code>simpleListItem.jsp</code> (JavaServer Page)). </p>
  
  <p>If I connect via my Java application and print the <code>String</code>, this items are not part of my string. It is like my application is streaming the code and is done, before the list is filled.</p>
  
  <p>Webpage sourcecode via browser is structured like this:</p>
  
  <pre><code> start hits.jsp
       start simpleListItem.jsp 
       start simpleListItem.jsp 
         ...
       start simpleListItem.jsp
   end hits.jsp
  </code></pre>
  
  <p>Webpage sourcecode via Java application is structured like this:</p>
  
  <pre><code> start hits.jsp
   send hits.jsp
  </code></pre>
  
  <p>How do I get all informations of an URL? All JavaServerPages-ScriptElements?</p>
  
  <p>Hope my Question is clear :D </p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>With your help I think I can specify my question now ;)
  Like <a href="https://stackoverflow.com/users/834362/home">home</a> said, the problem is, that I want to get informations of an webpage that is added to the page by JavaScript, <strong>after</strong> the page is sent. So in my example, I can't get the informations of <code>simpleListItem.jsp</code>. My Java method just connects to the URL and prints the Output, see below:</p>
  
  <pre><code> public void readURL(String url) {
      URL mURL = new URL(url);
      URLConnection mConnection = mURL.openConnection();
      BufferedReader in = new BufferedReader(new InputStreamReader(
                                  mConnection.getInputStream()));
      String inputLine;
      while ((inputLine = in.readLine()) != null) 
          System.out.println(inputLine);
      in.close();
  }
  </code></pre>
  
  <p>So with that, I won't get the fully loaded page. I need something like, an option to read the page when it es fully loaded. </p>
  
  <p>Thanks Guys!! </p>