All pastes #960803 Raw Edit

Stuff

public text v1 · immutable
#960803 ·published 2008-03-28 13:55 UTC
rendered paste body
<%@page import="java.util.Vector"%>
<jsp:useBean id="post" type="Post" scope="page" class="Post" />
<jsp:useBean id="readWrite" scope="page" class="readWrite" />
<% if (session.getAttribute("status") == "pass" ) { %>

<html>
<head>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <title>Welcome to Your Blog</title>



</head>

<body >
<table width="775" border="0" bgcolor="EBEBEB">
  <tr> 
    <td background="images/tophead.gif" height="31"> <table width="100%" border="0">
        <tr> 
          <td width="581"> </td>
          <td width="96"><font color="#FFFFFF">Setting</font></td>
          <td width="78"><font color="#FFFFFF"><a href="./logout.jsp">Log Out</a></font></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td colspan="3" background="images/subheadbg.gif" height="100" width="775"></td>
  </tr>
  <tr> 
    <td colspan="3" bgcolor="305E91" height="31" width="775"> <table width="100%" border="0">
        <tr> 
          <td width="20%" align="center" valign="middle"><font color="#FFFFFF"><a href="./userPage.jsp">Home</a></font></td>
          <td width="20%" align="center" valign="middle"><font color="#FFFFFF">New 
            Post</font></td>
          <td width="20%" align="center" valign="middle"><font color="#FFFFFF">Post 
            List</font></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td colspan="3">
<table width="100%" border="0">
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td>
	<table width="100%" border="2" bordercolor="#305E91">
             
<!-- START HERE HERE HERE HERE--->

             <%
             String userID = (String)session.getAttribute("userName");
             readWrite.readPost(userID);
             Vector posts = readWrite.getPosts();
             for(int i=0; i < posts.size(); i++){ 
                post = (Post)posts.get(i);                 
             %>
                   <tr>
                       <td width="15%">
                            <%= post.getTime() %>
                        
                       </td>
                            
                       <td width="50%">
                           <%= post.getTitle()  %>
                       </td>
                            
                       <td width="20%">
                           <%= post.getCategory() %>
                       </td>    
                            
                       <td width="5%">
                           view
                       </td>
                       <td width="5%">
                           edit
                       </td>
                       <td width="5%">
                           post
                       </td>  
                   </tr>
             <% } %>
             

`       </table>
    </td>
    <td></td>
  </tr>
  <tr>
    <td></td>
    <td></td>
    <td></td>
  </tr>
</table>

	</td>
  </tr>
  <tr>
    <td colspan="3" bgcolor="305E91" height="50"><font color="#FFFFFF">Copyright 
      2008. By Edy Chandra</font></td>
  </tr>
</table>
</body>
</html>

<% } else {
    session.setAttribute("status", "expired");
    response.sendRedirect("out.jsp");}%>