这里是春天的新手。我有一个 scheduleLoad.jsp(如下),用于获取用户的下拉列表输入并将其传递给 confirmLoad.jsp 屏幕并更新数据库。
Select Year:<form method="post" action="confirmLoadTest">
<select name="loadScheduleData">
<option value="2010-2011">2010-2011</option>
<option value="2011-2012">2011-2012</option>
<option value="2012-2013">2012-2013</option>
</select>
</form><br><br>
<input type="submit" value="Submit"/>
我在使用 loadScheduleData 传递控制器中的命令对象时遇到问题。这是控制器http://pastebin.com/G044Qn72。底部的注释代码是工作代码,但我试图让未注释的代码工作。当用户点击“提交”并将其传递给我的 confirmLoad.jsp 时,我不确定如何接受命令对象的输入。现在它给了我错误:
SEVERE: Servlet.service() for servlet [springApp] in context with path [/SpringApp] threw exception [No adapter for handler [us.tx.state.tea.tsds.Controller.ScheduleLoadController@7c1b2e27]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler] with root cause
javax.servlet.ServletException: No adapter for handler [us.tx.state.tea.tsds.Controller.ScheduleLoadController@7c1b2e27]: The DispatcherServlet configuration needs to include a HandlerAdapter that supports this handler
我一直在尝试将这两个教程中的代码拼凑起来:http ://www.mkyong.com/spring-mvc/spring-mvc-dropdown-box-example/和http://www.tutorialspoint.com/spring /spring_mvc_form_handling_example.htm
任何帮助将不胜感激!先感谢您!