I added the #comments because the link in the theme says "comments [N]" so it made sense to send the browser to the comments section so they won't have to scroll down through the entry.
One other user experience thing I came across that I didn't like. When a user is done previewing and posts their comment, after the comment is saved CommentServlet uses a RequestDispatcher to forward back to the entry page. I would prefer it to be an HttpServletResponse redirect. You can't just issue a redirect at that point since it seems some headers have already been written. Anyone know if there's a method of issuing a redirect? Might be able to do a forward to the RedirectServlet, then let RedirectServlet do the redirect but this seems a bit inefficient. This may be a small thing but on very popular blogs, I have seen users post their comments and then sit and hit reload every so often to see if there's been a response. Doing a redirect would minimize the risk of having the user submit the same comment twice. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 12, 2008 5:09 PM To: [email protected] Subject: Re: Problem Implementing Threaded Comments ahhh, i know why, it's because we use the servlet path rather than the URI, so #comments wasn't included in the servlet path. either way, you don't need that in there. you are correct that the method must be POST and it must contain a request parameter for "content" in order for the request to get passed to the CommentServlet. Java Web Development wrote: > Actually that wasn't the problem The problem is that The way netbeans knows > a comment form is being submitted and needs to be forwarded to the comment > servlet, is if the http method is post and if there is a "content" > parameter. The #comments works fine for me. > > > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 12, 2008 11:07 AM > To: [email protected] > Subject: Re: Problem Implementing Threaded Comments > > You probably figured this out already, but the problem you were running > into was that you put "#comments" at the end of the forms action url. > you don't want to do that. Just strip that part out and it should work. > > -- Allen > > > Java Web Development wrote: >> I'm working on implementing threaded comments and I'm pretty much done but >> in trying to clean things up I ran into a problem. >> >> I have a form I'm using to submit the reply request. >> <form method="post" action="$url.entry($entry.anchor)#comments" >> name="commentForm"> >> <input type="hidden" name="method" value="reply" /> >> <input type="hidden" name="parentId" value="$comment.id" /> >> <input type="submit" class="button" name="reply" > value=" Reply " >> /> >> </form> >> >> If I run it as is I get the roller page not found page. I haven't been > able >> to figure out how to attach the debugger in netbeans yet to help me trace >> the problem. >> >> The execution doesn't even get to the CommentServlet doPost method and I >> haven't been able to figure out where it's failing. >> >> If I include a hidden input field for content it works. >> >> Anyone know where this might be failing or how to get the debugger to work >> in netbeans with roller? >> >> Thanks >> >> > >
