스프링

 

 

_header.jspf

 

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<link href="/stylesheets/bootstrap.css" rel="stylesheet">
<link href="/stylesheets/bootstrap-responsive.css" rel="stylesheet">
<link href="/stylesheets/docs.css" rel="stylesheet">
<link href="/stylesheets/main.css" rel="stylesheet">
<style>
	body{
		padding-top:40px;
	}
</style>

 

_top.jspf

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<div class="navbar navbar-inverse navbar-fixed-top">
	<div class="navbar-inner">
		<div class="container">
			<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
				<span class="icon-bar"></span>
			</button>
			<a class="brand" href="/">지속가능한 삶, 프로그래밍, 프로그래머</a>
			<div class="nav-collapse collapse">
				<ul class="nav">
					<li><a href="/">Home</a></li>
					<li><a href="">로그인</a></li>
					<li><a href="">회원가입</a></li>
					<li><a href="">로그아웃</a></li>
					<li><a href="">개인정보수정</a></li>
				</ul>
			</div>
		</div>
	</div>
</div>

 

 

home.jsp

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>SLipp</title>
<%@ include file="../commons/_header.jspf" %>
</head>
<body>
<%@ include file="../commons/_top.jspf" %>

<header class="jumbotron subhead" id="overview">
	<div class="container">
		<h1>SLipp</h1>
		<p class="lead">Sustaninable Life, Programming, Programmer</p>
	</div>
</header>
<div class="container">
	<div class="container-fluid">
		<div class="row-fluid">
			<div class="span6">
				<h1>메인 페이지</h1>
			</div>
		</div>
	</div>
</div>


</body>
</html>

 

 

 

slipp-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:mvc="http://www.springframework.org/schema/mvc"
	xmlns:p="http://www.springframework.org/schema/p"
	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">
	<context:component-scan base-package="net.slipp.web"/>
	<mvc:annotation-driven />
	
	<mvc:resources location="/images/" mapping="/images/**"  />
	<mvc:resources location="/stylesheets/" mapping="/stylesheets/**"  />
	<mvc:resources location="/javascripts/" mapping="/javascripts/**"  />
		
	
	<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"
		p:prefix="/WEB-INF/jsp/" p:suffix=".jsp"/>
	
	
		
</beans>




 

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
	version="3.0">
	<display-name>QnA</display-name>

	<servlet>
		<servlet-name>slipp</servlet-name>
		<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
	</servlet>

	<servlet-mapping>
		<servlet-name>slipp</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>
	
	
	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

</web-app>

 

 

 

about author

PHRASE

Level 60  머나먼나라

Money makes the mare (to) go. (黃金萬能. = 돈이면 안되는 일이 없다.)

댓글 ( 4)

댓글 남기기

작성