<%@ page import="java.sql.*,com.jspdev.ch9.*,java.util.*,java.sql.*" %>
<jsp:useBean id="messageVo" class="com.jspdev.ch9.MessageVO" scope="page">
<jsp:setProperty name="messageVo" property="*"/>
</jsp:useBean>
<jsp:useBean id="messageBean" class="com.jspdev.ch9.MessageBean" scope="page"/>
<HTML>
<HEAD>
<TITLE>add  message into table </TITLE>
</HEAD>
<BODY>
<%
try
{

messageBean.setMessage(messageVo);
messageBean.addMessage();
}
catch(Exception e)
{
e.printStackTrace();
}
%>
<jsp:forward page="viewMessages.jsp" />
</body>
</html>