forked from dilipchandima/Blog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
view.jsp
82 lines (70 loc) · 2.61 KB
/
view.jsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<html>
<head><title>view_post</title>
<style>
body{
font-family:"RobotoDraft","Roboto",'sans-serif','Open Sans';
color: #404040;
background-color: #ebebeb;
padding: 0;
margin: 0 auto;
left: 50%;
width: 1000px;
}
.aa{
background-color: #364956;
color: #ebebeb;
padding: 10px;
font-size: 60px;
margin: 0 auto;
}
.mnubtn{
background-color: #364956;
color: #ebebeb;
height: 50px;
width: 200px;
padding: 5px;
font-size: 16px;
text-decoration: none;
line-height: 38px;
}
.tit{
background-color: #16a085;
color: #ebebeb;
height: 30px;
padding: 5px;
font-size: 20px;
text-decoration: none;
}
</style>
</head>
<body>
<%
String author = request.getAttribute("author").toString();
String title = request.getAttribute("title").toString();
String content = request.getAttribute("content").toString();
String[] comments = (String[])request.getAttribute("comments");
String id = request.getAttribute("id").toString();
int count = comments.length;
%>
<div class="aa">ADD FEW LINES</div>
<a style="padding-left:20px;padding-right:20px" class="mnubtn" href="/Blog/" >HOME</a><br>
<br><div style=" background-color: #364956;height:2px"></div>
<div class="tit"><%=title %></div>
<p><%=content %></p>
<h4>by - <%= author%></h4>
<div style=" background-color: #364956;height:2px"></div><br>
<h3 class="tit" style="color: #364956">COMMENTS BY USERS - <%=count%></h3><br>
<% for(int i=0; i<count ; i++){%>
<div><%=comments[i]%></div><br>
<% } %>
<br>
<form method="POST" action="viewpost/post/<%=id%>">
<div style=" background-color: #364956;height:2px"></div><br>
Add your comment:<br><br>
<textarea rows="10" cols="121" name="content"></textarea>
<br><br>
<input type="hidden" name="id" value="cc">
<input type="submit" value="Submit">
</form>
</body>
</html>