how to add the last line(with the ??? infornt ) in the the
jsp? i want to put that html in to the jsp line with @@@. is it possible??
<%@ page import="java.io.*"%>
<%@ page import="java.lang.Thread"%>
<%@ page import="java.net.URL"%>
<%@ page import="java.net.URLConnection"%>
<%
class ThreadBase implements Runnable
{
int counter = 20;
String inStr="http://hgdownload.cse.ucsc.edu/goldenPath/hg17/vsMm5/axtNet/chr";
URL m_URL = null;
URLConnection m_URLConn = null;
public void run()
{
try
{
//thread1.join();
String x_str = "";
do{
cs();
x_str = Integer.toString(counter);
if (counter==23) x_str = "X";
else if (counter==24) x_str="Y";
m_URL = new URL(inStr+x_str+".axt.gz");
m_URLConn = m_URL.openConnection();
URLConnection uc = m_URL.openConnection();
//InputStream in = new FileInputStream(uc.getInputStream());
InputStream in = new BufferedInputStream(uc.getInputStream());
ByteArrayOutputStream bs = new ByteArrayOutputStream(9999);
int i;
String sFile = "c:\\downloadChr\\mhuman\\chr"+x_str+".axt.gz";
System.out.println("Getting file " + sFile);
File of = new File(sFile);
while(-1 != (i = in.read()))
bs.write(i);
in.close();
byte bt[] = bs.toByteArray();
FileOutputStream fos = new FileOutputStream(of);
fos.write(bt);
fos.close();
System.out.println("Thread is running.");
} while(counter <24); //do
{
@@@
}
}//try
catch(Exception e)
{
e.printStackTrace();
}
}
private void cs() {
int x = counter;
x=x+1;
counter = x;
System.out.println("Thread is running with Chr " + counter);
}
}
ThreadBase base = new ThreadBase();
Thread thread1 = new Thread(base, "T1");
Thread thread2 = new Thread(base, "T2");
thread1.start();
thread2.start();
%>
???<meta HTTP-EQUIV="REFRESH" content="1; url=http://localhost:8080/examples/jsp/HMC/HTML/downloaded.htm">