?<%@ page contentType="text/html; charset=euc-kr" language="java"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> <%@ page import="java.util.*, java.text.* " %> <%@ page import="kr.co.mcat.pms.util.StringUtils" %> <%@ page import="kr.go.kma.dfs.core.observe.*" %> <%@ page import="java.io.File"%> <%@ page import="java.util.*, java.text.*" %> <%@ page import="kr.co.mcat.pms.meta.domain.*" %> <%@ page import="kr.co.mcat.pms.meta.*" %> <%@ page import="kr.co.mcat.pms.util.*" %> <%@ page import="kr.go.kma.dfs.core.rdr.*" %> <%@ page import="kr.go.kma.dfs.*" %> <%@ page import="kr.go.kma.dfs.rpcsvc.WIDXMLService" %> <%! /*20180313 ???i??팁?t혐뼈??見\?\戈?堡??? */ public String getImageFile(javax.servlet.http.HttpServletRequest request, Calendar pCal, String dir, String prefix) { //String rdrPath = request.getServletContext().getRealPath(dir); String rdrPath = "/n0010/webapps/ROOT_KMA_NEW" + dir; File rdrFilePath = new File( rdrPath ); if ( !rdrFilePath.isDirectory() ) return null; Calendar tCal = Calendar.getInstance(); tCal.setTime(pCal.getTime()); // //tCal.set(Calendar.YEAR, 2018); //tCal.set(Calendar.MONTH, Calendar.MARCH); //tCal.set(Calendar.DATE, 15); //tCal.set(Calendar.HOUR_OF_DAY, 1); //tCal.set(Calendar.MINUTE, 0); // //String prefixFileName = "RDR_CMP_WRC_"; SimpleDateFormat df = new SimpleDateFormat("yyyyMMddHHmm"); //tCal.set(Calendar.MINUTE, tCal.get(Calendar.MINUTE) - tCal.get(Calendar.MINUTE)%5); StringBuffer targetName = new StringBuffer(); targetName.append(prefix) .append(df.format(tCal.getTime())) .append(".png"); File rdrfile = new File(rdrFilePath, targetName.toString()); int limit = 0; do { if ( !rdrfile.isFile() || !rdrfile.exists()){ tCal.add(Calendar.MINUTE, -5); targetName = new StringBuffer(); targetName.append(prefix).append(df.format(tCal.getTime())).append(".png"); rdrfile = new File(rdrFilePath, targetName.toString()); } else break; } while(limit++ < 288 ); return targetName.toString(); } %> <% // ??팁? List satList = ImageHelper.getInstance().getComsCacheToday(); request.setAttribute("satList", satList); // ???팁? Calendar tCal = Calendar.getInstance(); tCal.set(Calendar.MINUTE, tCal.get(Calendar.MINUTE) - tCal.get(Calendar.MINUTE)%5); String rdrImg = getImageFile(request,tCal, "/repositary/image/rdr/img", "RDR_CMP_WRC_"); request.setAttribute("rdrImg" , rdrImg); // ?갭팁? String lightningImg = getImageFile(request,tCal, "/repositary/image/lgt/img", "lgt_kma_"); request.setAttribute("lightningImg" , lightningImg); %> <!DOCTYPE html> <html lang="ko"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <title>$??눗|?폘?/title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="decorator" content="iframe" /> <link rel="stylesheet" type="text/css" href="http://web.kma.go.kr/share/css/import.css?20140917" /> <link rel="stylesheet" type="text/css" href="pub/css/index-now-weather150805.css" /> <!--2018 ????-> <link rel="stylesheet" type="text/css" href="pub/css/new2018_main.css" /> <script src="https://code.jquery.com/jquery-1.12.4.min.js"></script> <script src="pub/js/new2018_main.js"></script> <!--2018 ????-> <script type="text/javascript" src="http://web.kma.go.kr/share/js/common.js"></script> </head> <body style="background:url()"> <div id="weather"> <h3 class="tab1"><a href="index-now-weather_new2018.jsp?gubun=1" alt="(洌?힙???>힙???/a></h3> <h3 class="tab2 "><a href="index-now-special_new2018.jsp" alt="$?껭눗|?폘?????>0?윽稜?/a></h3> <h3 class="tab3 active"><a href="main_left_radar" >???/a></h3> <div class="radar" style=" width: 236px; height: 242px; padding:0px;"> <!-- <a href="/repositary/image/rdr/img/${rdrImg}" target="_blank" title="횬=? ><img src="/repositary/image/rdr/img/${rdrImg}" style=" width: 236px; height: 242px; " alt="???팁? /></a> --> <img src="/repositary/image/rdr/img/${rdrImg}" style=" width: 236px; height: 242px; " alt="???팁? /> </div> <h3 class="tab4"><a href="index-now-forecast_new2018.jsp" alt="??폘?>??폘?/a></h3> </div> </body> </html>

바로가기서비스