Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Servlets and the fly likes Document moved error from servlet using tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Document moved error from servlet using tomcat" Watch "Document moved error from servlet using tomcat" New topic
Author

Document moved error from servlet using tomcat

christine lorraine
Greenhorn

Joined: Sep 03, 2001
Posts: 20
hi i developed a servlet using resin and the servlet worked well. but when i tried to run it in tomcat, a "Document Moved" error occurred then displays a hyperlink to the correct page and the page is correctly displayed.
is there a workaround here?
thanks.
christine lorraine
Greenhorn

Joined: Sep 03, 2001
Posts: 20
hi folks,
got the solution...
i just placed

out.close();
return;
i discovered that after send.Redirect(url) displays the url, it still performs the operation after the statement. although out.close() is enough to solve the "Document Moved" problem i still opted to include the return statement so the servlet will stop executing the rest of the statements after send.Redirect.
hope this will also help others.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Document moved error from servlet using tomcat
 
Similar Threads
Funny Error in the Servlet Spec
cannot excute servlet examples in tomcat
using RequestDispatcher.forward()
Null pointer exception ?
Help on Servlets- web.xml not working