Meaningless Drivel is fun!
The moose likes Other Application Frameworks and the fly likes Spring MVC problem with AbstractWizardFormCOntroller Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Spring MVC problem with AbstractWizardFormCOntroller" Watch "Spring MVC problem with AbstractWizardFormCOntroller" New topic

Spring MVC problem with AbstractWizardFormCOntroller

murwath ali

Joined: Dec 24, 2008
Posts: 4
I am putting my code,


<?xml version="1.0"?>

<bean name="/controller.spring" class="controller">
<property name="pages">

<!-- code of internalresourceviewresolver -->
<bean id="..."/>
<property name="suffix">

coursename.jsp :

/* CourseName.jsp */
<form action="controller.spring">
CourseName :
<input type="text" name="courseName"/>
<input type="submit"/>

coursefeedback.jsp :

/* courseFeedback.jsp */
<form action="controller.spring">
CourseFeedback :
<input type="text" name="courseFeedback"/>
<input type="submit" value="Next" name="_target1">
<input type="submit" value="Cancel" name="_cancel">
<input type="submit" value="Finish" name="_finish">

/* materialProvided.jsp */

<form action="controller.spring">
MaterialProvided :
<input type="text" name="materialProvided"/>
<input type="submit" value="Back" name="_target0">
<input type="submit" value="Finish" name="_finish">
<input type="submit" value="Cancel" name="_cancel">

/* */
import packages.....;

public class controller extends AbstractWizardFormController
public controller()

protected ModelAndView processFinish(HttpServletRequest request,
HttpServletResponse response, Object command,
BindException errors) throws Exception {
bean b=(bean)command;
System.out.println(b.getCourseName()+" "+b.getCourseFeedback()+" "+b.getMaterialProvided());
return new ModelAndView("success");

protected ModelAndView processCancel(HttpServletRequest request,
HttpServletResponse response, Object command,
BindException bindException) throws Exception {
return new ModelAndView("/CourseName.jsp");
} :

/* */
public class bean
String courseName,courseFeedback,materialProvided;
public void setCourseName(String courseName)
public String getCourseName()
return courseName;

public void setCourseFeedback(String courseFeedback)
public String getCourseFeedback()
return courseFeedback;

public void setMaterialProvided(String materialProvided)
public String getMaterialProvided()
return materialProvided;

The problem is when i deploy my app.. in server and lookup the coursename.jsp ,it comes and later goes to controller and later goes to

coursefeedback.jsp and if i click 'next' button present in coursefeedback.jsp , i am not able to navigate to any other page and i am redirected to same coursefeedback.jsp ,The actual page that must be displayed is materialprovided.jsp
Elie Hirschman
Ranch Hand

Joined: Dec 15, 2005
Posts: 37
Try making _target1 a separate form field, instead of part of the submit button:

This has been working for me.
I agree. Here's the link:
subject: Spring MVC problem with AbstractWizardFormCOntroller
It's not a secret anymore!