aspose file tools*
The moose likes Spring and the fly likes SuccessView isn't set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "SuccessView isn Watch "SuccessView isn New topic
Author

SuccessView isn't set

abhi jitnag
Greenhorn

Joined: Oct 17, 2010
Posts: 13
Hi all,
I am facing a problem when trying to return value from formBackingObject

In Js

function callSearch(){
var empName=document.getElementById("empName").value;
document.forms[0].action = "applicationContextTest.html?empName="+empName;
document.forms[0].submit();
}


In Controller

protected Object formBackingObject(HttpServletRequest request){
String empName = request.getParameter("empName");
NewEmployeeCmd employee = new NewEmployeeCmd();
employee=employeeService.findEmployeeByName(empName);
return employee;
}

In dispatcher-servlet.xml

<bean name="/applicationContextTest.html" class="com.app.controller.ApplicationContextTest">
<property name="employeeService" ref="employeeService"></property>
</bean>

In jsp
<form:form method="post" commandName="employee" action="${FORM_ACTION_PATH}">
<fieldset><legend>${LABEL_NAME} Employee Details</legend>
<table width="90%" border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="right" valign="middle"> </td>
<td align="center" valign="middle"> </td>
<td align="left" valign="middle"> </td>
</tr>
<tr>
<td width="35%" align="right" valign="middle">Employee Name</td>
<td width="5%" align="center" valign="middle"> </td>
<td width="60%" align="left" valign="middle">
<form:hidden path="employeeId" /> <form:input id="empName" path="employeeName" size="35" />
</td>
</tr>..........................

The control is coming to Controller properly but when returning ,it is giving following exception.
22-Apr-2011 21:49:23 org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet dispatcher threw exception
javax.servlet.ServletException: successView isn't set
at org.springframework.web.servlet.mvc.SimpleFormController.onSubmit(SimpleFormController.java:423)....................


Could anyone please suggest.



 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: SuccessView isn't set