<%@page language = "java" contentType="text/html" %> <%@page import = "org.apache.commons.httpclient.*, org.apache.commons.httpclient.methods.*, org.apache.commons.codec.*" %> <% String title = request.getParameter("title"); String ref = request.getParameter("ref"); /* String i_url_s = "http://www.isiknowledge.com"; String i_CurrentLine; String i_response = ""; HttpClient i_client = new HttpClient(); GetMethod i_get = new GetMethod(i_url_s); i_get.setRequestHeader( new Header( "Accept-Encoding", "gzip, deflate" ) ); i_get.setRequestHeader( new Header( "Accept-Language", "en-us" ) ); i_get.setRequestHeader( new Header( "Connection", "Keep-Alive" ) ); i_get.setRequestHeader( new Header( "Host", "isi02.isiknowledge.com") ); i_get.setRequestHeader(new Header("User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" ) ); i_client.executeMethod(i_get); for( int i=0; i= 0) i_SID = i_SID.substring(0, index); i_get.releaseConnection(); */ String new_url = "http://www.isiknowledge.com"; String iCurrentLine=""; String iTotalString=""; java.net.URL i_url = new java.net.URL(new_url); java.net.HttpURLConnection i_connection = (java.net.HttpURLConnection) i_url.openConnection(); i_connection.connect(); java.io.InputStream i_urlStream = i_connection.getInputStream(); java.io.BufferedReader i_reader = new java.io.BufferedReader(new java.io.InputStreamReader(i_urlStream)); while ((iCurrentLine = i_reader.readLine()) != null) { iTotalString += iCurrentLine; } int f_SID = iTotalString.indexOf("SID"); String i_SID_2 = iTotalString.substring(f_SID+4,iTotalString.indexOf("&",f_SID)); System.out.println("SID_2:" + i_SID_2); /* ************************************************************************************************************************* */ String j_url_s = "http://portal02.isiknowledge.com/portal.cgi?SID=" + i_SID_2 + "&Func=Goto&DestApp=WOS&ReqSrc=HOME"; HttpClient j_client = new HttpClient(); GetMethod j_get = new GetMethod(j_url_s); j_get.setRequestHeader( new Header( "Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*" ) ); j_get.setRequestHeader( new Header( "Accept-Encoding", "gzip, deflate" ) ); j_get.setRequestHeader( new Header( "Accept-Language", "en-us" ) ); j_get.setRequestHeader( new Header( "Connection", "Keep-Alive" ) ); j_get.setRequestHeader( new Header( "Host", "isi02.isiknowledge.com") ); //j_get.setRequestHeader( new Header( "Cookie", i_SID) ); //j_get.setRequestHeader( new Header( "Cookie", "CustomersID=Portal; path=/;") ); j_get.setRequestHeader( new Header ("Referer", "http://portal02.isiknowledge.com/portal.cgi?DestApp=WOS&Func=Frame") ); j_get.setRequestHeader(new Header("User-Agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)" ) ); j_client.executeMethod(j_get); j_get.releaseConnection(); %>