if (act == null)
act = "";
else
if (act.equals("new message")) {
try {
Date date = new Date();
Message msg = new Message();
msg.name = req.getParameter("author");
msg.subject = req.getParameter("subject");
msg.message = req.getParameter("message");
msg.replayID = Integer.parseInt( req.getParameter("messageID") );
msg.date = date.toString();
String forumName = req.getParameter("forumName");
if ( (msg.subject == null) || ( msg.subject.length() == 0 ) ){
req.setAttribute("e" , "Field 'Subject' is empty");
req.getRequestDispatcher( "/forum.jsp?forumName=" + forumName + "&messageID= " + 0 )
.forward( req, res );