티스토리 뷰

Programing

[Java] replaceAll

애플자라 2008. 4. 17. 15:30
반응형

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);  

반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함