All pastes #960948 Raw Edit

JSP

public text v1 · immutable
#960948 ·published 2008-03-28 15:59 UTC
rendered paste body
HERE IS THE ERROR, Please take a look
<%-- 
    Document   : posts
    Created on : Mar 27, 2008, 12:38:28 AM
    Author     : Wooo's
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">
<%@page import="java.util.Vector"%>
<jsp:useBean id="post" type="beans.Post" scope="page" class="beans.Post" />
<jsp:useBean id="readWrite" type="beans.readWrite" scope="page" class="beans.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">
             
             <%
             String userID = (String)session.getAttribute("userName");
             readWrite.readPost(userID);
             Vector posts = readWrite.getPosts();
             for(int i=0; i < posts.size(); i++){ 
                 
                post = (beans.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</font></td>
  </tr>
</table>
</body>
</html>

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