% // I know, I know. I should use the XML JSP tags. boolean isNewFeedback = true; boolean failed = false; if(request.getMethod().equalsIgnoreCase("post")) { String origin = request.getHeader("Referer"); if(origin.indexOf(request.getServerName()) >= 0) { isNewFeedback = false; // process // Get name, email, comment, article String name = request.getParameter("name"); String email = request.getParameter("email"); String comments = request.getParameter("comments"); String article = request.getParameter("article"); // Open the comments file butiki.Comments commentsObj = new butiki.Comments(article); // Post to the comments file try { commentsObj.add(name, email, comments); } catch(java.io.IOException e) { failed = true; isNewFeedback = false; } } } %>
(This page will look better if you use a browser that supports web standards, although it can be accessed by most browsers. Upgrading to a standards-compliant browser will enhance your reading experience.)
Thank you for your feedback. I really like to hear from people who read my stuff. In the future, I will be incorporating your comments into the pages.
In the meantime, thanks once again for dropping a line.
<% if(isNewFeedback) { %>Sorry, your comment wasn't posted. There seems to be a problem on my server. Try dropping me a note at my email address instead.
<% } %> back to top