[Áú¹®]JRun¿¡¼­ servlet°£ÀÇ ÀÚ·á ±³È¯(propertiesÆÄÀÏ)


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

±Û¾´ÀÌ :ÀÓ±âÇö 1999³â 6¿ù 16ÀÏ 13:47:07

ÀÌ ±ÛÀ» Àд ¸ðµç ºÐ²² °¨»çµå¸³´Ï´Ù.


Àú´Â IIS 4¿¡ JRun2.3 build 145¸¦ »ç¿ëÇÕ´Ï´Ù. ±¸ÇöÇÏ°íÀÚ ÇÏ´Â ÇÁ·Î±×·¥ÀÌ À¥ ¾îÇø®ÄÉÀ̼ÇÀ̶ó
¼­ºí¸´°£ÀÇ ÀÚ·á ±³È¯ÀÇ Çʿ伺ÀÌ ÀÖ½À´Ï´Ù.
ÀڷḦ ã´Ù°¡ JSDK¿¡¼­ ÀڷḦ ÁÖ´Â ÂÊ¿¡¼­´Â
public class TestProps extends HttpServlet
{
public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{
Hashtable message=new Hashtable();
System.getProperties().put("message",message);
PrintWriter out=new PrintWriter(new OutputStreamWriter(res.getOutputStream(),"KSC5601"));
message.put("°æ°í","µÉ¶ó³ª ¸ô¶ó");
message.put("Á¤»ó","Àß µÇ¾ß ÇÒÅÙµ¥");
res.setContentType("text/plain");
out.println("ÁغñµÇµû~");
out.close();
}
}
ÀڷḦ Àд ÂÊ¿¡¼­´Â
public class TestGetProps extends HttpServlet
{
Public void doGet(HttpServletRequest req,HttpServletResponse res)
throws ServletException,IOException
{
Hashtable isit=(Hashtable)System.getProperties().get("message");
PrintWriter out=new PrintWriter(new OutputStreamWriter(res.getOutputStream(),"KSC5601"));
res.setContentType("text/plain");
Enumeration test=isit.keys();//keyÀÇ À̸§À» ³ª¿­ÇüÀ¸·Î ¹Þ´Â´Ù.
out.println("µÉ±î");
while( test.hasMoreElements() )
{
String name=test.nextElement().toString();
String value=isit.get(name).toString();
out.println("ºÒ·¯¿Â Á¤º¸"+name+":"+value);
}
out.close();
}
}
À¸·Î ÇÏ¸é µÈ´Ù°í ÇÕ´Ï´Ù.
ªÀº ÀúÀÇ ½Ä°ßÀ¸·Î´Â ÀÌ·± °æ¿ì JSDKÀÇ °æ¿ì servlet.properties ÆÄÀÏÀ» »ç¿ë ÇØ¾ß µÈ´Ù°í ¾Ë°í ÀÖ½À´Ï´Ù.
¸Â´Ù¸é, JRun¿¡¼­´Â properties ÆÄÀÏÀ» ¾î¶»°Ô ó¸®ÇØ¾ß ÇÏ´ÂÁö¿ä?
ÆÄÀÏ ¸íÀº ¹«¾ùÀ̸ç, ¾îµð¿¡ À§Ä¡½ÃÄÑ¾ß ÇÏ´ÂÁö ¾Ë°í ½Í½À´Ï´Ù.


¶Ç, ÀÌ ¿ÜÀÇ ¹æ¹ýÀ¸·Î ÀڷḦ ±³È¯ÇÒ ¼ö ÀÖ´Ù¸é, ±× ¹æ¹ýµµ ¾Ë·Á Áֽøé ÁÁ°Ú½À´Ï´Ù.


´ÙÀ½ ±Ûµé:



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

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


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