hyunjeong

Untitled

Aug 29th, 2019
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.91 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=UTF-8"
  2. pageEncoding="UTF-8"%>
  3. <%@ page import = "java.io.PrintWriter" %>
  4. <html>
  5. <head>
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <title>JSP 게시판 웹사이트</title>
  8. <link rel="stylesheet" href="css/bootstrap.css">
  9. </head>
  10. <body>
  11. <%
  12. String userId = null;
  13. if(session.getAttribute("userId") != null ) {
  14. userId = (String) session.getAttribute("userId");
  15. }
  16. %>
  17.  
  18.  
  19. <nav class= "navbar navbar-default">
  20. <div class="navbar-header">
  21. <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
  22. data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
  23. <span class="icon-bar"></span>
  24. <span class="icon-bar"></span>
  25. <span class="icon-bar"></span>
  26. </button>
  27. <a class="navbar-brand" href="login.jsp">JSP게시판 웹 사이트</a>
  28. </div>
  29. <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
  30. <ul class="nav navbar-nav">
  31. <li><a href="main.jsp">메인</a></li>
  32. <li class="active"><a href="bbs.jsp">게시판</a></li>
  33. </ul>
  34. <%
  35. if(userId == null) {
  36. %>
  37. <ul class="nav navbar-nav navbar-right">
  38. <li class="dropdown">
  39. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
  40. aria-haspopup="true" aria-expanded="false" >
  41. 접속하기<span class=caret></span>
  42. </a>
  43. <ul class="dropdown-menu">
  44. <li><a href="login.jsp">로그인</a></li>
  45. <li><a href="join.jsp">회원가입</a></li>
  46. </ul>
  47. </li>
  48. </ul>
  49. <%
  50. } else {
  51. %>
  52. <ul class="nav navbar-nav navbar-right">
  53. <li class="dropdown">
  54. <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button"
  55. aria-haspopup="true" aria-expanded="false" >
  56. 회원관리<span class=caret></span>
  57. </a>
  58. <ul class="dropdown-menu">
  59.  
  60. <li><a href="logoutAction.jsp">로그아웃</a></li>
  61. </ul>
  62. </li>
  63. </ul>
  64. <%
  65. }
  66. %>
  67. </div>
  68. </nav>
  69. <div class="container">
  70. <div class="row">
  71. <form method="post" action="writeAction.jsp">
  72. <table class="table table-striped" style="text-align:center; border:1px solid #dddddd">
  73. <thead>
  74. <tr>
  75. <th colspan="2" style="background-color: #eeeeee; text-align:center;">게시판 글쓰기 양식</th>
  76. </tr>
  77. </thead>
  78. <tbody>
  79. <tr>
  80. <td><input type="text" class="form-control" placeholder="글 제목" name="bbsTitle" maxlength="50"></td>
  81. </tr>
  82. <tr>
  83. <td><textarea class="form-control" placeholder="글 내용" name="bbsContent" maxlength="2048" style="height:350px;">
  84. </textarea></td>
  85. </tr>
  86. </tbody>
  87.  
  88. </table>
  89. <input type="submit" class="btn btn-primary pull-right" value="글쓰기">
  90. </form>
  91. </div>
  92. </div>
  93. <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script>
  94. <script src="js/bootstrap.js"></script>
  95.  
  96. </body>
  97. </html>
Add Comment
Please, Sign In to add comment