app1, app2 분리
This commit is contained in:
45
tomcat/webapps/bussiness2/chl_mci.jsp
Executable file
45
tomcat/webapps/bussiness2/chl_mci.jsp
Executable file
@@ -0,0 +1,45 @@
|
|||||||
|
<%@ page contentType="text/html;charset=euc-kr" %>
|
||||||
|
<%@ page import = "java.rmi.*,
|
||||||
|
javax.naming.*,
|
||||||
|
java.sql.*,
|
||||||
|
javax.sql.*,
|
||||||
|
java.io.*,
|
||||||
|
java.net.*,
|
||||||
|
java.util.*,
|
||||||
|
exem.chl.generatecode"
|
||||||
|
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
generatecode gencode = new generatecode();
|
||||||
|
gencode.make_junmun_code();
|
||||||
|
|
||||||
|
URL url = null;
|
||||||
|
URLConnection urlConnection = null;
|
||||||
|
String sUrl = System.getProperty("service.call.url");
|
||||||
|
//String sUrl = "http://10.10.52.10:8880/mci/mci_core.jsp"; //MCI call
|
||||||
|
String sUrl_call_sucess_flag = sUrl + " URL Call succeeded";
|
||||||
|
|
||||||
|
Thread.sleep(1);
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
url = new URL(sUrl);
|
||||||
|
|
||||||
|
urlConnection = url.openConnection();
|
||||||
|
InputStream is = urlConnection.getInputStream();
|
||||||
|
|
||||||
|
} catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
sUrl_call_sucess_flag = sUrl + " URL Call failed";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>URL Call<br>[<%=sUrl_call_sucess_flag%>]</p>
|
||||||
|
<p>service.call.url<br>[<%=System.getProperty("service.call.url")%>]</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
139
tomcat/webapps/bussiness2/core.jsp
Executable file
139
tomcat/webapps/bussiness2/core.jsp
Executable file
@@ -0,0 +1,139 @@
|
|||||||
|
<%@ page contentType="text/html;charset=euc-kr" %>
|
||||||
|
<%@ page import = "java.rmi.*,
|
||||||
|
javax.naming.*,
|
||||||
|
java.sql.*,
|
||||||
|
javax.sql.*,
|
||||||
|
java.io.*,
|
||||||
|
java.net.*,
|
||||||
|
java.util.*,
|
||||||
|
tmax.webt.*"
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//TMAX
|
||||||
|
WebtConnection connection = null;
|
||||||
|
WebtBuffer tp_request = null;
|
||||||
|
WebtBuffer tp_response = null;
|
||||||
|
|
||||||
|
//FEP
|
||||||
|
URL url = null;
|
||||||
|
URLConnection urlConnection = null;
|
||||||
|
String sUrl = "http://10.10.52.10:8880/IMXtest/fep_receiver.jsp"; //FEP call
|
||||||
|
String sUrl_call_sucess_flag = sUrl + " URL Call succeeded";
|
||||||
|
|
||||||
|
//Properties pro = new Properties();
|
||||||
|
//pro.load(new FileInputStream("C:/smtest/jsp/core.properties"));
|
||||||
|
//String system_test_target=pro.getProperty("system.test.target");
|
||||||
|
String system_test_target="FEP";
|
||||||
|
|
||||||
|
int random_sleep_milisec = (int) (Math.random() * 13) + 12;
|
||||||
|
String flag = Integer.toString(random_sleep_milisec).substring(0,1);
|
||||||
|
//System.out.println("random_sleep_milisec: " + random_sleep_milisec);
|
||||||
|
//System.out.println("flag: " + flag);
|
||||||
|
|
||||||
|
if(flag.compareTo("1") == 0){
|
||||||
|
system_test_target = "FEP";
|
||||||
|
}else{
|
||||||
|
system_test_target = "TMAX";
|
||||||
|
}
|
||||||
|
|
||||||
|
//FEP Call
|
||||||
|
if(system_test_target.compareTo("FEP")==0){
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
url = new URL(sUrl);
|
||||||
|
|
||||||
|
urlConnection = url.openConnection();
|
||||||
|
InputStream is = urlConnection.getInputStream();
|
||||||
|
|
||||||
|
/*
|
||||||
|
byte[] buf = new byte[1024];
|
||||||
|
int len = -1;
|
||||||
|
|
||||||
|
try {
|
||||||
|
while((len = is.read(buf, 0, buf.length)) != -1) {
|
||||||
|
System.out.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
} catch(IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
} catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
sUrl_call_sucess_flag = sUrl + " URL Call failed";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{ //TMAX Call
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Tmax<61><78> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Random random = new Random();
|
||||||
|
String lStr_randum_value=Integer.toString(Math.abs(random.nextInt()));
|
||||||
|
int int_Value_length= lStr_randum_value.length();
|
||||||
|
|
||||||
|
if(int_Value_length > 10){
|
||||||
|
lStr_randum_value = lStr_randum_value.substring(0, 10);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
for(int i=0; i<10-int_Value_length; i++){
|
||||||
|
lStr_randum_value=lStr_randum_value+"0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String guid=lStr_randum_value +"_" + System.currentTimeMillis();
|
||||||
|
String txcode="tp_txcode001";
|
||||||
|
|
||||||
|
String sndstr = "[Core -> tmax]tmax call......."+ guid +"................" + txcode ;
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//[Core -> tmax]tmax call.......5974573420_1706087409995................tp_txcode
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
try{
|
||||||
|
|
||||||
|
connection = new WebtConnection("10.10.52.10", 8888);
|
||||||
|
WebtRemoteService service = new WebtRemoteService("TOUPPER", connection);
|
||||||
|
tp_request = service.createStringBuffer();
|
||||||
|
tp_request.setString(sndstr);
|
||||||
|
tp_response = service.tpcall(tp_request);
|
||||||
|
System.out.println("tmax request : " + tp_request.getString());
|
||||||
|
System.out.println("tmax response : " + tp_response.getString());
|
||||||
|
|
||||||
|
}catch (WebtIOException ioe){
|
||||||
|
System.out.print("webt connection closed");
|
||||||
|
ioe.printStackTrace();
|
||||||
|
}catch (WebtServiceFailException sfe){
|
||||||
|
System.out.print("tmax server ruturns TP_FAIL");
|
||||||
|
sfe.printStackTrace();
|
||||||
|
}catch (WebtServiceException se){
|
||||||
|
System.out.print("tmax service fail. tperrno = " + se.getTPErrorMessage());
|
||||||
|
se.printStackTrace();
|
||||||
|
}finally{
|
||||||
|
connection.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%
|
||||||
|
if(system_test_target.compareTo("FEP")==0){
|
||||||
|
%>
|
||||||
|
<p>URL Call<br>[<%=sUrl_call_sucess_flag%>]</p>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<p>TMAX WebT Call Request<br>[<%=tp_request.getString()%>]</p>
|
||||||
|
<p>TMAX WebT Call Response<br>[<%=tp_response.getString()%>]</p>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
4
tomcat/webapps/bussiness2/core.properties
Executable file
4
tomcat/webapps/bussiness2/core.properties
Executable file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
# System Target FEP or TMAX
|
||||||
|
system.test.target=FEP
|
||||||
|
#system.test.target=TMAX
|
||||||
171
tomcat/webapps/bussiness2/core_tmax_fep.jsp
Executable file
171
tomcat/webapps/bussiness2/core_tmax_fep.jsp
Executable file
@@ -0,0 +1,171 @@
|
|||||||
|
<%@ page contentType="text/html;charset=euc-kr" %>
|
||||||
|
<%@ page import = "java.rmi.*,
|
||||||
|
javax.naming.*,
|
||||||
|
java.sql.*,
|
||||||
|
javax.sql.*,
|
||||||
|
java.io.*,
|
||||||
|
java.net.*,
|
||||||
|
java.util.*,
|
||||||
|
tmax.webt.*,
|
||||||
|
exem.core.bizerror"
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
//TMAX
|
||||||
|
WebtConnection connection = null;
|
||||||
|
WebtBuffer tp_request = null;
|
||||||
|
WebtBuffer tp_response = null;
|
||||||
|
|
||||||
|
//FEP
|
||||||
|
URL url = null;
|
||||||
|
URLConnection urlConnection = null;
|
||||||
|
String sUrl = System.getProperty("service.call.url");
|
||||||
|
//String sUrl = "http://10.10.52.10:8880/fep/fep_receiver.jsp"; //FEP call
|
||||||
|
String sUrl_call_sucess_flag = sUrl + " URL Call succeeded";
|
||||||
|
|
||||||
|
//Properties pro = new Properties();
|
||||||
|
//pro.load(new FileInputStream("C:/smtest/jsp/core.properties"));
|
||||||
|
//String system_test_target=pro.getProperty("system.test.target");
|
||||||
|
String system_test_target="FEP";
|
||||||
|
|
||||||
|
int random_sleep_milisec = (int) (Math.random() * 13) + 12;
|
||||||
|
String flag = Integer.toString(random_sleep_milisec).substring(0,1);
|
||||||
|
//System.out.println("random_sleep_milisec: " + random_sleep_milisec);
|
||||||
|
//System.out.println("flag: " + flag);
|
||||||
|
//
|
||||||
|
Context ctx=null;
|
||||||
|
DataSource ds = null;
|
||||||
|
Connection con = null;
|
||||||
|
Statement stmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
|
||||||
|
try{
|
||||||
|
Thread.sleep(1);
|
||||||
|
|
||||||
|
ctx=new InitialContext();
|
||||||
|
ds = (DataSource) ctx.lookup("custDS");
|
||||||
|
con = ds.getConnection();
|
||||||
|
stmt = con.createStatement();
|
||||||
|
stmt.setFetchSize(50); // fetch size
|
||||||
|
rs = stmt.executeQuery("select * from( select * from emp order by DBMS_RANDOM.RANDOM ) where rownum < 10");
|
||||||
|
|
||||||
|
rs.close();
|
||||||
|
stmt.close();
|
||||||
|
con.close();
|
||||||
|
}catch(SQLException se){
|
||||||
|
se.printStackTrace();
|
||||||
|
rs.close();
|
||||||
|
stmt.close();
|
||||||
|
con.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if(flag.compareTo("1") == 0){
|
||||||
|
system_test_target = "FEP";
|
||||||
|
}else{
|
||||||
|
system_test_target = "TMAX";
|
||||||
|
}
|
||||||
|
|
||||||
|
//FEP Call
|
||||||
|
if(system_test_target.compareTo("FEP")==0){
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
url = new URL(sUrl);
|
||||||
|
|
||||||
|
urlConnection = url.openConnection();
|
||||||
|
InputStream is = urlConnection.getInputStream();
|
||||||
|
|
||||||
|
/*
|
||||||
|
byte[] buf = new byte[1024];
|
||||||
|
int len = -1;
|
||||||
|
|
||||||
|
try {
|
||||||
|
while((len = is.read(buf, 0, buf.length)) != -1) {
|
||||||
|
System.out.write(buf, 0, len);
|
||||||
|
}
|
||||||
|
} catch(IOException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
bizerror be = new bizerror();
|
||||||
|
be.make_bizerror();
|
||||||
|
|
||||||
|
} catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
sUrl_call_sucess_flag = sUrl + " URL Call failed";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else{ //TMAX Call
|
||||||
|
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
// Tmax<61><78> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ѵ<EFBFBD>.
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
Random random = new Random();
|
||||||
|
String lStr_randum_value=Integer.toString(Math.abs(random.nextInt()));
|
||||||
|
int int_Value_length= lStr_randum_value.length();
|
||||||
|
|
||||||
|
if(int_Value_length > 10){
|
||||||
|
lStr_randum_value = lStr_randum_value.substring(0, 10);
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
for(int i=0; i<10-int_Value_length; i++){
|
||||||
|
lStr_randum_value=lStr_randum_value+"0";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String guid=lStr_randum_value +"_" + System.currentTimeMillis();
|
||||||
|
String txcode="tp_txcode001";
|
||||||
|
|
||||||
|
String sndstr = "[Core -> tmax]tmax call......."+ guid +"................" + txcode ;
|
||||||
|
/////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
//[Core -> tmax]tmax call.......5974573420_1706087409995................tp_txcode
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
try{
|
||||||
|
|
||||||
|
connection = new WebtConnection("10.10.52.10", 8888);
|
||||||
|
WebtRemoteService service = new WebtRemoteService("TOUPPER", connection);
|
||||||
|
tp_request = service.createStringBuffer();
|
||||||
|
tp_request.setString(sndstr);
|
||||||
|
tp_response = service.tpcall(tp_request);
|
||||||
|
System.out.println("tmax request : " + tp_request.getString());
|
||||||
|
System.out.println("tmax response : " + tp_response.getString());
|
||||||
|
|
||||||
|
}catch (WebtIOException ioe){
|
||||||
|
System.out.print("webt connection closed");
|
||||||
|
ioe.printStackTrace();
|
||||||
|
}catch (WebtServiceFailException sfe){
|
||||||
|
System.out.print("tmax server ruturns TP_FAIL");
|
||||||
|
sfe.printStackTrace();
|
||||||
|
}catch (WebtServiceException se){
|
||||||
|
System.out.print("tmax service fail. tperrno = " + se.getTPErrorMessage());
|
||||||
|
se.printStackTrace();
|
||||||
|
}finally{
|
||||||
|
connection.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
%>
|
||||||
|
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<%
|
||||||
|
if(system_test_target.compareTo("FEP")==0){
|
||||||
|
%>
|
||||||
|
<p>URL Call<br>[<%=sUrl_call_sucess_flag%>]</p>
|
||||||
|
<p>service.call.url<br>[<%=System.getProperty("service.call.url")%>]</p>
|
||||||
|
<%
|
||||||
|
}else{
|
||||||
|
%>
|
||||||
|
<p>TMAX WebT Call Request<br>[<%=tp_request.getString()%>]</p>
|
||||||
|
<p>TMAX WebT Call Response<br>[<%=tp_response.getString()%>]</p>
|
||||||
|
<%
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
1
tomcat/webapps/bussiness2/index.jsp
Executable file
1
tomcat/webapps/bussiness2/index.jsp
Executable file
@@ -0,0 +1 @@
|
|||||||
|
welcome tomcat index.jsp
|
||||||
40
tomcat/webapps/bussiness2/mci_core.jsp
Executable file
40
tomcat/webapps/bussiness2/mci_core.jsp
Executable file
@@ -0,0 +1,40 @@
|
|||||||
|
<%@ page contentType="text/html;charset=euc-kr" %>
|
||||||
|
<%@ page import = "java.rmi.*,
|
||||||
|
javax.naming.*,
|
||||||
|
java.sql.*,
|
||||||
|
javax.sql.*,
|
||||||
|
java.io.*,
|
||||||
|
java.net.*,
|
||||||
|
java.util.*"
|
||||||
|
%>
|
||||||
|
<%
|
||||||
|
|
||||||
|
URL url = null;
|
||||||
|
URLConnection urlConnection = null;
|
||||||
|
String sUrl = System.getProperty("service.call.url");
|
||||||
|
//String sUrl = "http://10.10.52.10:8880/cor/core_tmax_fep.jsp"; //CORE call
|
||||||
|
String sUrl_call_sucess_flag = sUrl + " URL Call succeeded";
|
||||||
|
|
||||||
|
Thread.sleep(1);
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
url = new URL(sUrl);
|
||||||
|
|
||||||
|
urlConnection = url.openConnection();
|
||||||
|
InputStream is = urlConnection.getInputStream();
|
||||||
|
|
||||||
|
} catch(Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
sUrl_call_sucess_flag = sUrl + " URL Call failed";
|
||||||
|
}
|
||||||
|
%>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<p>URL Call<br>[<%=sUrl_call_sucess_flag%>]</p>
|
||||||
|
<p>service.call.url<br>[<%=System.getProperty("service.call.url")%>]</p>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user