=== /WEB-INF/spring/appServlet/servlet-context.xml =================
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:util="http://www.springframework.org/schema/util"
xsi:schemaLocation="http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-3.2.xsd">
...
...
<util:properties id="properties" location="/WEB-INF/xml/properties.xml" />
=======================================================================
└ 빨간색 글 추가
=== index.jsp ==========================================================
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ page session="false" %>
<h1>
<br/>
Hello world!
</h1>
<br/>
<P> The time on the server is ${serverTime}. </P>
<spring:eval expression="@properties['code']"/>
=======================================================================
└ 빨간색 글 추가
=== properties.xml ======================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd" >
<properties>
<comment>설정파일</comment>
<entry key="code">02123</entry>
</properties>
=======================================================================
└ 빨간색 글 추가
'홈페이지 만들기 > Spring' 카테고리의 다른 글
스프링 action-servlet 위치 및 파일명 변경 (0) | 2015.04.15 |
---|---|
스프링 한글 인코딩으로 만들기 (0) | 2015.04.15 |
spring 컨테이너 구동 및 객체검색 (0) | 2015.04.14 |
Log4j 간단 정리 (0) | 2015.04.14 |
스프링 Aspect 정리 (0) | 2015.04.14 |
댓글