• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

SuccessView isn't set

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.



 
They weren't very bright, but they were very, very big. Ad contrast:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic