Numpty Servlet question -how to return to the same page?

Ok, I know I've used Struts too much :)
If I submit a form to servlet from a jsp and I want to process the form and return to the same page I submitted the form from what do I do with the response? In Struts I'd just return a null ActionForward from the Action execute() method.
mikehalfsheenAsked:
Who is Participating?
 
Weiping DuSenior Web DeveloperCommented:
RequestDispatchher view = getServletContext(().getRequestDispatcher("/yourJSP.jsp");
view.forward(request, response);
0
 
mikehalfsheenAuthor Commented:
mmm, that seems to almost work. The page doesn't like trying to load:-
<script language="JavaScript" src="javascript/mm_rollover.js" type="text/javascript"></script>
It barfs looking for a js function :(
0
 
mikehalfsheenAuthor Commented:
Thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.