extjs+spring mvc来开发的问题

前台我是用ExtJs写的一个FormPanel
前台代码如下:
[code="java"]Ext.onReady(function() {
Ext.loginForm = Ext.extend(Ext.form.FormPanel, {
xtype : "form",
title : "登錄",
labelWidth : 100,
labelAlign : "center",
buttonAlign : 'right',
layout : "form",
width : 400,
padding : "10px",
initComponent : function() {
this.items = [{
xtype : "textfield",
fieldLabel : "使用者名稱",
name : "username",
anchor : "95%"
}, {
xtype : "textfield",
fieldLabel : "密碼",
name : "password",
anchor : "95%",
inputType : "password"
}, {
xtype : "checkbox",
boxLabel : "記住登錄狀態",
name : "spring_security_remember_me",
anchor : "100%"
}]
this.buttons = [{
xtype : "button",
text : "登入",
type : "submit",
scope : this,
handler : function() {
this.getForm().doAction("submit", {
url : "/test.htm",
scope : this,
success : function(form, action) {
window.location.href="";//我想在这里获取到Controller返回的结果进行跳转
},
failure : function(form, action) {
Ext.Msg
.alert(
'Warning!',
'Authentication server is unreachable : '
+ action.response.responseText);
}
})
}
}]
Ext.loginForm.superclass.initComponent.call(this);
}
})
var loginForm = new Ext.loginForm({
frame : true,
autoHeight : true,
renderTo : "login"
});
})[/code]

后台代码:
[code="java"]public class TestController {

@RequestMapping(value = "/test.htm", method = RequestMethod.POST)
public String test(HttpSession sesstion, HttpServletRequest request,
        HttpServletResponse response, ModelMap map) {
    //System.out.println("success");
    try {
        String username = ServletRequestUtils.getStringParameter(request,
                "username");
        map.addAttribute("username", username);
        response.getWriter().write("{success:true,url:'portfolio/test'}");
    } catch (Exception e) {
        e.printStackTrace();
    }

    return "portfolio/test";
}

}[/code]我在后台应该返回些什么才可以让extjs的success属性接收到从而进行跳转啊

Map map = new HashMap();
map.put("success", true);
map.put("msg", msg);
JSONObject obj = JSONObject.fromObject(map); out.print(obj);
return null;