[Java] replaceAll

Programing 2008.04.17 15:30 Posted by 애플자라

String contents_body = Locale.fromWeb(req.getParameter("contents_body"));

   SQL_PARAM.setProperty("POST_ID", post_id);
   DBUtil.executeQuery(con, m_sQUERY_SELECT_MASS_MAILINFO, SQL_PARAM, null, actionForm);

   String sFileName = actionForm.get("content_path");  
   String readHtml = "";
   String sContent = actionForm.get("content_map");
   
   try {
    if( sFileName.toLowerCase().startsWith("http://") ) {
     readHtml = FileUtil.readUrl(sFileName);
    }
    else {
     readHtml = FileUtil.readLocal(sFileName);
    }
   }
   catch(Exception ex) {
    readHtml = ex.toString();
   }
   
   readHtml = readHtml.replaceAll("[$][{]CONTENT_MAP[}]", sContent);
   
   actionForm.set("contents_body", readHtml);  

TAG

댓글을 달아 주세요