String excerpt = request.getParameter("excerpt");
String trackBackResponseMessage;
Integer trackBackResponseCode;
BlogService service = new BlogService();
BlogEntry blogEntry = null;
if (entryId != null) {
try {
blogEntry = service.getBlogEntry(blog, entryId);
} catch (BlogServiceException e) {
throw new ServletException(e);
}
}
if (blogEntry == null) {
// the entry cannot be found - it may have been removed or the
// requesting URL was wrong
return new NotFoundView();
} else if (trackBackUrl == null || trackBackUrl.trim().length() == 0) {
getModel().put(Constants.BLOG_ENTRY_KEY, blogEntry);
return new TrackBackFormView();
} else {
// extract the information to send in the trackback
String title = blogEntry.getTitle();
String blogName = blogEntry.getBlog().getName();
String url = blogEntry.getPermalink();
// now send the trackback
try {
HttpClient httpClient = new HttpClient();
PostMethod postMethod = new PostMethod(trackBackUrl);