I am new to spring framework and hibernate. I want to Access Two Controllers in same view. Here is my Dispatcher Servlet code.
<bean name="/EditTask.htm"
class="HumanResource.FindTaskController"
p:HResourceService-ref="hresourceService" />
<bean name="/EditTask.htm"
class="HumanResource.UpdateTaskController"
p:HResourceService-ref="hresourceService" />
I have EditTask.jsp view. I want to access FindTaskController when user hits first submit and access UpdateTaskController when user hits second submit button in the same jsp.
I can’t map Dispatcher Servlet as above because it genarates an exception Bean name '/EditTask.htm' is already used in this file.
Please help me.
You need two
<form>s in your jsp – one withaction="/findTask"and the other withaction="/updateTask. (assuming you map your two controllers / controller methods to these urls).