Dakshinamurthy Babu

Greenhorn
+ Follow
since Oct 17, 2012
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dakshinamurthy Babu

I am doing a sample springs extjs application. In that i have a text box and submit button in front end. And i used the handler function as


handler : function()
{

var user=Ext.getCmp('username').getValue();
alert(user);
Ext.Ajax.request({
url : '/hi.do'
})
}


and my controller is


public class HelloWorldController {


@RequestMapping(value = "/hi", method = RequestMethod.POST)
public void display(@RequestParam("username") String name, Model model) {
String message = "Hi " + name + "!";
System.out.println(message);

}

My web.xml is

<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>

<servlet>
<servlet-name>HelloWorldController</servlet-name>
<servlet-class>
org.springframework.web.servlet.DispatcherServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>HelloWorldController</servlet-name>
<url-pattern>/HelloWorldController</url-pattern>
</servlet-mapping>




But i couldnt getting that textbox value in controller.

Am new to springs.. SO please help me. Thanks in advance....

Regrads,
Dakshina
12 years ago