»Ë»Ñ Æ÷·³
°³¹ßÀÚÆ÷·³ ÀÔ´Ï´Ù.
  • ºÏ¸¶Å© ¾ÆÀÌÄÜ

JSP ¹æ¹®ÀÚ Ä«¿îÆ®¼Ò½º Áú¹®µå¸³´Ï´Ù!1

  • [* ºñȸ¿ø *]
  • µî·ÏÀÏ 2015-10-09 13:34
  • Á¶È¸¼ö 929
jsp¸¦ È°¿ëÇؼ­ ¹æ¹®ÀÚÄ«¿îÆ® ¼Ò½º¸¦ Â¥°íÀִµ¥¿ä ÀÚ²Ù ¿À·ù°¡³ª¼­ Áú¹®µå¸³´Ï´Ù. ÀÏ´Ü ÀÌ ¼Ò½ºÀÇ Á¶°ÇÀº »õ·Î°íħÇßÀ»°æ¿ì Áߺ¹µÇ¾î Ä«¿îÆ® µÇÁö¾Ê°í, Çϵå¾ÈÀÇ count.txtÆÄÀÏ¿¡ Ä«¿îÆÃÀÌ ÀúÀåµÇ¼­ ÅèĹÀÌ »õ·Î ÀÛµ¿µÇ´õ¶óµµ Ä«¿îÆ®°¡ ¸®¼ÂµÇÁö¾Ê´Â Á¶°ÇÀÇ ¼Ò½ºÀÔ´Ï´Ù. <%@ page contentType="text/html; charset=utf-8"%> <%@ page import = "java.io.*" %>
<% String readResourcePath = "/ch08/count.txt"; String writeResourcePath = readResourcePath; String realReadPath = //application.getRealPath//(readResourcePath); String realWritePath = //application.getRealPath//(writeResourcePath); BufferedReader br = null; PrintWriter pr = null; String count = null; try { br = new BufferedReader(new FileReader(realReadpath)); count = br.readLine().trim(); br.close(); //if (session.isNew()) {// pr = new PrintWriter (new FileWriter(realWritePath)); //int num = Integer.parseInt(count);// pr.println(num+1); pr.close(); } }catch(IOException ex) { out.println("¿¹¿Ü¹ß»ý: " + ex.getMessage()); } %> ¹æ¹®ÀÚ¼ö : <%= count %>¸í
//·Î Ç¥½ÃµÈºÎºÐÀÌ Á¦°¡ ä¿ö³Ö¾î¾ßÇÏ´Â ºóÄ­Àε¥ ¾Æ¹«·¡µµ if¿Í intºÎºÐ¿¡¼­ ¿À·ù°¡ ¹ß»ýÇϴ°Ͱ°Àºµ¥ ¾î¶»°Ô°íÄ¡¸é ¿À·ù°¡ ¾øÀ»±î¿ä? Á¤´äº¸´Ùµµ ¿ø¸®¿Í Çؼ®ÀûÀÎÀÌÀ¯¸¦ ¼³¸íÇØÁÖ½Ã¸é °¨»çÇÏ°Ú½À´Ï´Ù(__)

0
ÃßõÇϱ⠴ٸ¥ÀÇ°ß 0
|
°øÀ¯¹öÆ°

´Ù¸¥ÀÇ°ß 0 Ãßõ 0 ºÎ²ô·±»óµð
  • ¾Ë¸² ¿å¼³, »óó ÁÙ ¼ö ÀÖ´Â ¾ÇÇÃÀº »ï°¡ÁÖ¼¼¿ä.
©¹æ »çÁø  
¡â ÀÌÀü±Û¡ä ´ÙÀ½±Û