jsp파일을 올립니다.
/////////////////////////////////////////////////////
// /WrongAction.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<html>
<head>
<title>Index</title>
</head>
<body>
잘못된 주소입니다.
</body>
</html>
/////////////////////////////////////////////////////
// /exception.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>예외</title>
<script>
function onLoad(){
alert("예외상황이 발생하였습니다.\t\r\n 관리자에게 문의하세요");
}
</script>
</head>
<body onLoad="onLoad()">
<!--<s:property value="%{exceptionStack}"/>-->
<!--<%=((String)request.getAttribute("exceptionStack")).replace("\n", "<br>")%>-->
</body>
</html>
/////////////////////////////////////////////////////
// /board/Board.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<html>
<head>
<title>테스트 게시판</title>
</head>
<frameset cols="200,*" frameborder="yes" frameborder="1" bordercolor="#888888">
<frame src="/board/left.jsp" name="left" scrolling="NO" noresize marginwidth="0" marginheight="0" >
<frame src="/board/BoardMgr.jsp" name="body" frameborder="NO" border="0" framespacing="0" scrolling="AUTO">
</frameset>
<noframes></noframes>
<body>
</body>
</html>
/////////////////////////////////////////////////////
// /board/BoardInsert.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<title>BoardInsert</title>
<link href="/common/common.css" rel="stylesheet" type="text/css">
<script src="/common/common.js"></script>
<script>
/*
* 게시물 입력
*/
function insertBoard(){
var form = BoardInsertForm;
form.target = "body";
form.action = "/board/insertBoard.action";
form.forward.value = "mgr_ready";
form.page.value = "1";
form.isBackToList.value = "Y";
form.keyword.value = "";
form.searchType.value = "title";
form.submit();
}
</script>
</head>
<body>
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- Top 시작 -->
<table>
<tr>
<td class="td_header">
게시물 입력
</td>
</tr>
</table>
<!-- Top 끝 -->
<hr width="100%">
<!-- 입력폼시작 -->
<table width="760">
<form name="BoardInsertForm" method="post">
<input type="hidden" name="forward">
<input type="hidden" name="isBackToList">
<input type="hidden" name="page" value='<s:property value="%#parameters.page"/>'>
<input type="hidden" name="searchType" value="<s:property value="%#parameters.searchType"/>">
<input type="hidden" name="keyword" value="<s:property value="%#parameters.keyword"/>">
<tr>
<td width="50">
작성자
</td>
<td>
<input type="text" name="writer" size="20">
</td>
</tr>
<tr>
<td>
제목
</td>
<td>
<input type="text" name="title" size="50">
</td>
</tr>
<tr>
<td colspan="2" style="font-family: 샘물체; background-color:#EEEEEE; text-align:center; color:#000000; border:0px">
내용
</td>
</tr>
<tr>
<td colspan="2">
<textarea name="contents" cols="105" rows="20"></textarea>
</td>
</tr>
</form>
</table>
<!-- 입력폼끝 -->
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- 버튼 시작 -->
<table>
<tr>
<td>
<a href="javascript:insertBoard()"><img src="/images/button/insert.gif" border="0"></a>
</td>
<td>
<a href='javascript:backToList(this.BoardInsertForm)'><img src="/images/button/list.gif" border="0"></a>
</td>
</tr>
</table>
<!-- 버튼 끝 -->
</body>
</html>
/////////////////////////////////////////////////////
// /board/BoardList.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<title>BoardList</title>
<link href="/common/common.css" rel="stylesheet" type="text/css">
<script>
/*
* 화면 초기화
*/
function onLoad(){
var form = BoardListForm;
var result = parent.SearchResultForm.searchResult;
if(form.size.value == "0"){
result.value = "조회결과가 없습니다.";
}else{
result.value = "총 " + form.size.value + "건이 검색되었습니다.";
}
}
/*
* 게시물 조회
*/
function viewBoard(sn, page){
var form = parent.BoardMgrForm;
form.target = "body";
form.action="/board/viewBoard.action";
form.forward.value = "viewBoard_success";
form.sn.value = sn;
form.page.value = page;
form.submit();
}
</script>
</head>
<body onLoad="javascript:onLoad()">
<!-- 목록 시작 -->
<table width="760">
<form name="BoardListForm">
<input type="hidden" name="forward">
<input type="hidden" name="size" value="<s:property value="boardVO.count" />">
<input type="hidden" name="sn">
<input type="hidden" name="page">
<s:iterator value="boardVO.boardCol">
<tr>
<td class="td_title">
<a href="javascript:viewBoard('<s:property value="sn"/>', '<s:property value="%#parameters.page"/>')">
<s:property value="title" />
</a>
</td>
</tr>
<tr>
<td width="150">
작성자 : <s:property value="writer" />
</td>
</tr>
</s:iterator>
</form>
</table>
<!-- 목록 끝 -->
<!-- 페이지 결과 시작 -->
<s:property value="boardVO.resultPageStr" escape="false"/>
<!-- 페이지 결과 끝 -->
</body>
</html>
/////////////////////////////////////////////////////
// /board/BoardMgr.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<title>BoardMgr</title>
<link href="/common/common.css" rel="stylesheet" type="text/css">
<script src="/common/common.js"></script>
<script>
function onLoad(){
var form = BoardMgrForm;
// 게시물 조회화면에서
if(form.isBackToList.value == "Y"){
form.page.value = <s:property value="%#parameters.page"/>
form.keyword.value = "<s:property value="%#parameters.keyword"/>";
if("<s:property value="%#parameters.searchType"/>" == "title"){
form.searchType.selectedIndex = 0;
}else{
form.searchType.selectedIndex = 1;
}
searchBoard(BoardMgrForm.page.value);
}
}
// 검색
function searchBoard(page){
var form = BoardMgrForm;
form.target = "BoardList";
form.action = "/board/searchBoard.action";
form.forward.value = "searchBoard_success";
form.page.value = page;
form.submit();
}
// 입력
function insertBoard(){
var form = BoardMgrForm;
form.target = "body";
form.action = "/board/forward.action";
form.forward.value = "insert_ready";
form.submit();
}
// 삭세
function deleteTest(){
alert("deleteTest");
}
</script>
</head>
<body onLoad="javascript:onLoad()">
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- Top 시작 -->
<table>
<tr>
<td class="td_header">
Test Board
</td>
</tr>
</table>
<!-- Top 끝 -->
<hr width="100%">
<!-- 조회 폼 시작 -->
<table width="500">
<form name="BoardMgrForm" method="post">
<input type="hidden" name="forward">
<input type="hidden" name="paramArr" value="1">
<input type="hidden" name="paramArr" value="2">
<input type="hidden" name="page" value="1">
<input type="hidden" name="sn">
<input type="hidden" name="isBackToList" value="<s:property value="%#parameters.isBackToList"/>">
<tr>
<td width="250"><b class="bodycopy">검색어:</b></td>
<td width="150"><b class="bodycopy">섹션:</b></td>
</tr>
<tr>
<td><input type="text" name="keyword" size="40" value="<s:property value="%#parameters.keyword"/>"></td>
<td>
<select name="searchType" style="font-family: 샘물체; width: 60px;">
<s:if test="%#parameters.searchType == 'title'">
<option value="title" selected>주제 </option>
<option value="contents">내용 </option>
</s:if>
<s:elseif test="%#parameters.searchType == 'contents'">
<option value="contents" selected>내용 </option>
<option value="title" selected>주제 </option>
</s:elseif>
<s:else>
<option value="title" selected>주제 </option>
<option value="contents">내용 </option>
</s:else>
</select>
<a href="javascript:searchBoard('1')"><img src="/images/button/search.gif" align="absmiddle"></a>
</td>
</tr>
</form>
</table>
<!-- 조회 폼 끝 -->
<!-- 게시물 목록 시작 -->
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<form name="SearchResultForm">
<tr bgcolor="#EEEEEE">
<td colspan="2" class="bodycopy" align="right" nowrap>
<input type="text" name="searchResult"
style="font-family: 샘물체; background-color:#EEEEEE; text-align:right; width:300px; color:#000000; border:0px">
</td>
</tr>
</form>
</table>
<iframe name="BoardList" frameborder=0 width="100%" height="630"></iframe>
<!-- 게시물 목록 끝 -->
<!-- 버튼 시작 -->
<table>
<tr>
<td>
<a href="javascript:insertBoard()"><img src="/images/button/insert.gif" border="0"></a>
</td>
</tr>
</table>
<!-- 버튼 끝 -->
</body>
</html>
/////////////////////////////////////////////////////
// /board/BoardUpdate.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<title>BoardUpdate</title>
<link href="/common/common.css" rel="stylesheet" type="text/css">
<script src="/common/common.js"></script>
<script>
/*
* 게시물 수정
*/
function updateBoard(){
var form = BoardUpdateForm;
form.target = "body";
form.action = "/board/updateBoard.action";
form.forward.value = "mgr_ready";
form.isBackToList.value = "Y";
form.submit();
}
</script>
</head>
<body>
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- Top 시작 -->
<table>
<tr>
<td class="td_header">
게시물 수정
</td>
</tr>
</table>
<!-- Top 끝 -->
<hr width="100%">
<!-- 입력폼시작 -->
<table width="760">
<form name="BoardUpdateForm" method="post">
<input type="hidden" name="forward">
<input type="hidden" name="isBackToList">
<input type="hidden" name="page" value="<s:property value="%#parameters.page"/>">
<input type="hidden" name="searchType" value="<s:property value="%#parameters.searchType"/>">
<input type="hidden" name="keyword" value="<s:property value="%#parameters.keyword"/>">
<input type="hidden" name="sn" value="<s:property value="boardVO.sn"/>">
<tr>
<td width="50">
작성자
</td>
<td>
<s:property value="boardVO.writer" />
</td>
</tr>
<tr>
<td>
제목
</td>
<td>
<input type="text" name="title" size="50" value="<s:property value="boardVO.title" />">
</td>
</tr>
<tr>
<td colspan="2" style="font-family: 샘물체; background-color:#EEEEEE; text-align:center; color:#000000; border:0px">
내용
</td>
</tr>
<tr>
<td colspan="2">
<textarea name="contents" cols="105" rows="20"><s:property value="boardVO.contents" /></textarea>
</td>
</tr>
</form>
</table>
<!-- 수정폼끝 -->
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- 버튼 시작 -->
<table>
<tr>
<td>
<a href='javascript:backToList(this.BoardUpdateForm)'><img src="/images/button/list.gif" border="0"></a>
</td>
<td>
<a href="javascript:updateBoard()"><img src="/images/button/update.gif" border="0"></a>
</td>
</tr>
</table>
<!-- 버튼 끝 -->
</body>
</html>
/////////////////////////////////////////////////////
// /board/BoardView.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<html>
<head>
<title>BoardView</title>
<link href="/common/common.css" rel="stylesheet" type="text/css">
<script src="/common/common.js"></script>
<script>
// 수정화면으로 이동
function updateBoard(){
var form = BoardViewForm;
form.target = "body";
form.action = "/board/viewBoard.action";
form.forward.value = "update_ready";
form.submit();
}
// 삭제
function deleteBoard(){
var form = BoardViewForm;
form.target = "body";
form.action = "/board/deleteBoard.action";
form.forward.value = "mgr_ready";
form.isBackToList.value = "Y";
form.submit();
}
</script>
</head>
<body>
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- Top 시작 -->
<table>
<tr>
<td class="td_header">
Test Board
</td>
</tr>
</table>
<!-- Top 끝 -->
<hr width="100%">
<form name="BoardViewForm">
<input type="hidden" name="forward">
<input type="hidden" name="isBackToList">
<input type="hidden" name="page" value='<s:property value="%#parameters.page"/>'>
<input type="hidden" name="searchType" value="<s:property value="%#parameters.searchType"/>">
<input type="hidden" name="keyword" value="<s:property value="%#parameters.keyword"/>">
<input type="hidden" name="sn" value="<s:property value="boardVO.sn" />">
</form>
<!-- 게시물 번호, 제목 시작 -->
번호 : <s:property value="boardVO.sn" /><br>
제목 : <s:property value="boardVO.title" /><br>
<!-- 게시물 번호, 제목 끝 -->
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- 내용 헤더 시작 -->
<table width="760" border="0" cellpadding="3" cellspacing="0">
<tr bgcolor="#EEEEEE">
<td align="center">
내용
</td>
</tr>
</table>
<!-- 내용 헤더 끝 -->
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- 내용 시작 -->
<s:property value="boardVO.contents" />
<!-- 내용 끝 -->
<!-- 여백시작 -->
<table cellspacing="0" height="10"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<!-- 버튼 시작 -->
<table>
<tr>
<td>
<a href='javascript:backToList(this.BoardViewForm)'><img src="/images/button/list.gif" border="0"></a>
</td>
<td>
<a href="javascript:updateBoard()"><img src="/images/button/update.gif" border="0"></a>
</td>
<td>
<a href="javascript:deleteBoard()"><img src="/images/button/delete.gif" border="0"></a>
</td>
</tr>
</table>
<!-- 버튼 끝 -->
</body>
</html>
/////////////////////////////////////////////////////
// /board/left.jsp
/////////////////////////////////////////////////////
<%@ page contentType="text/html; charset=EUC-KR" pageEncoding="EUC-KR"%>
<html>
<head>
<title>Left</title>
<link href="/common/common.css" rel="stylesheet" type="text/css">
<script src="/common/common.js"></script>
<script>
function forward(){
var form = forwardForm;
forwardForm.target = "body";
form.action="/board/forward.action";
form.forward.value = "mgr_ready";
form.submit();
}
</script>
</head>
<body>
<!-- 여백시작 -->
<table height="35"><tr><td></td></tr></table>
<!-- 여백 끝 -->
<table>
<tr>
<td>
<a href="javascript:forward()">
<h2> >> 테스트</h2>
</a>
</td>
</tr>
</table>
<form name="forwardForm" method="post">
<input type="hidden" name="forward">
</form>
</body>
</html>
댓글 없음:
댓글 쓰기