0

i have this code, when i run this script no error shows up, but at the same time no result shows up too :(
i dont understand where the problem is... :(

String result2="";
		String data2;
		URL u2;
		URLConnection uc2;
		
		u2 = new URL("http://genome.ucsc.edu/cgi-bin/hgc?o=32385948&g=htcUserAli&i=../trash/hgSs/hgSs_genome_44ba_e972d0.pslx+..%2Ftrash%2FhgSs%2FhgSs_genome_44ba_e972d0.fa+YourSeq&c=chr1&l=32385948&r=32386166&db=hg19&hgsid=204152805282 ");
		uc2 = u2.openConnection();
		
		InputStream is2 = uc2.getInputStream(); 
		BufferedReader reader2 = new BufferedReader(new InputStreamReader(is2));
		while((data2 = reader2.readLine()) != null){
			result2 += data2;
		}
		String firstString2 = "<HTML>";
		int startFrom2 = result2.indexOf(firstString2);		
//out.print("this is startFrom2 int: "+startFrom2);
		String getHTML2 = result2.substring(startFrom2, result2.length());
		out.println(getHTML2);	//'<==========STH'S WRONG IN HERE!!!!!
2
Contributors
1
Reply
4
Views
6 Years
Discussion Span
Last Post by masijade
1

Well, where is your catch block for this, as any number of exceptions can be thrown by this code, and I have the sneaking suspiscion that you are ignoring them.

Votes + Comments
Catch block still trying to catch with rest of the code :P
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.