Áú¹®>¼­ºí¸´ °ü·Ã Áú¹®ÀÔ´Ï´Ù.


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]

±Û¾´ÀÌ :±èÇýÁ¤ 1999³â 9¿ù 10ÀÏ 11:51:20

¾È³çÇϼ¼¿ä?
Àú´Â ¼­ºí¸´À» °øºÎÇÏ´Â ÇлýÀÔ´Ï´Ù.
ÇÁ·Î±×·¥À» Â¥´Â ÁßÀä....
ÄÄÆÄÀϽÿ¡ ¿¡·¯´Â ¾ø´Âµ¥, ½ÇÇàÀ» ½ÃÅ°¸é 500Internal Server error°¡ ³³´Ï´Ù.
Á¦ °Ô½ÃÆÇ¿¡¼­ (´Ù¸¥ ȨÀÇ)»óÀÌÇÑ Çü½ÄÀÇ °Ô½ÃÆÇÀ¸·Î Á¦°¡ ÀûÀº ³»¿ë(µ¥ÀÌŸ)°¡
»Ñ·ÁÁö°Ô µË´Ï´Ù.
°³¹ß ȯ°æÀº jsdk2.0ÀÔ´Ï´Ù. Á¦°¡ ¿øÇϴ´ë·Î µ¥ÀÌŸ°¡ console¿¡¼­´Â º¸ÀÌ°í.
¸ñÀûÁöÀÇ webÀ¸·ÎºÎÅÍHTTP/1.1 200 OK¶ó´Â ÀÀ´äÀ» ¹Þ¾Ò½À´Ï´Ù.
´ÙÀ½ÀÇ ¼Ò½º´Â temp(StringBuffer)¿¡ µ¥ÀÌŸ°¡ ÀúÀåµÇ°í, ±× dataµéÀÌ º¸³»Á®¾ßÇÒ ºÎºÐÀÔ´Ï´Ù.
±Ùµ¥, Á¦°¡ ÀǵµÇÑ´ë·Î µ¥ÀÌŸ°¡ »Ñ·ÁÁöÁú ¾Ê½À´Ï´Ù. ÄÚµå»ó¿¡ ¹«½¼ ¹®Á¦°¡ ÀÖ´ÂÁöµµ ¸ð¸£°Ú½À´Ï´Ù. À߸øµÈ ºÎºÐÀ» °íÃÄÁÖ¼¼¿ä,
¾Æ´Ï¶ó¸é, Âü°íÇÒ¸¸ÇÑ ½ÎÀÌÆ®³ª Ã¥À» ÃßõÇØ Áֽʽÿä. ºÎŹÇÕ´Ï´Ù. ±ÞÇϰŵç¿ä.

StringBuffer temp=new StringBuffer();
String keyName="";
String dataValue1="",dataValue2="";

boolean notEnd=true;



while( notEnd ){
try{
myUrl=new URL(Prop.getProperty("cgi_name"));
HttpURLConnection connection=(HttpURLConnection)myUrl.openConnection();
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setAllowUserInteraction(false);
Enumeration keys=Prop.keys();
Enumeration Pkeys=Prop.keys();
Enumeration Vkeys=values.keys();


while(Pkeys.hasMoreElements()&&Vkeys.hasMoreElements()){
PkeyName=(String)(Pkeys.nextElement());
VkeyName=(String)(Vkeys.nextElement());

if(!PkeyName.equals("cgi_name")){

if(PkeyName.toUpperCase().startsWith("HIDDEN")){

dataValue1=Prop.getProperty(PkeyName);

temp.append(dataValue1);
temp.append("&");
}
else{
dataValue2=Prop.getProperty(PkeyName);

temp.append(PkeyName);
temp.append("=");
temp.append(values.getProperty(dataValue2));
temp.append("&");
}
}
}


try{

System.out.println(temp.toString().substring(0,temp.length()-1 ));
String content=temp.toString().substring(0,temp.length()-1 );
//String sPost="POST /servlet/search.class HTTP/1.0";
PrintWriter out;


request.getContentType();
System.out.println("cont-type="+request.getContentType());
respon.setContentType(request.getContentType());
respon.setContentLength(content.length());

out = respon.getWriter();
out.print(URLEncoder.encode(content));
out.flush();
out.close();
System.out.println("OUT closing");

notEnd=false;


}catch(Exception e){
try{
Thread.currentThread().sleep(10000);
}catch(InterruptedException ex){}
}
} catch(MalformedURLException e){
System.out.println("CGI is Trouble!!!");
e.printStackTrace();
return;
} catch(IOException e){
System.out.println("Connection has Trouble...");
e.printStackTrace();
return;
}
}
}

}






´ÙÀ½ ±Ûµé:



À̾ ±Û¿Ã¸®±â(´äÇϱâ)

À̸§:
E-Mail:
Á¦¸ñ:
³»¿ë:
HTML ÅÂ±× Æ÷ÇÔ ¿©ºÎ: HTML ¹®¼­ÀÏ °æ¿ì üũ
°ü·Ã URL(¼±ÅÃ):
URL Á¦¸ñ(¼±ÅÃ):
°ü·Ã À̹ÌÁö URL:


[ ´ÙÀ½ ±Ûµé ] [ À̾ ±Û¿Ã¸®±â(´äÇϱâ) ] [ ÀÚ¹Ù ¹¯°í ´äÇϱâ ]