• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 235
  • Last Modified:

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.
0
mikehalfsheen
Asked:
mikehalfsheen
  • 2
1 Solution
 
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.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now