0

我试过这个这个,但我有同样的问题。登录后,URL没有改变。这是我的代码:

@RequestMapping(value="/login", method = RequestMethod.POST)
public String processLogin(@ModelAttribute("login") Login login,BindingResult result, SessionStatus status) throws ServiceException, RemoteException{
    loginValidator.validate(login, result);
if (result.hasErrors()) {
        //if validator failed
        return "login";
    } else {
        status.setComplete();
        AdministrationServiceResponse rs = null;
        AdministrationServiceRequest rsr = new AdministrationServiceRequest();
        AdministrationServiceService ts = new AdministrationServiceServiceLocator(Config.HOST, Config.PORT, Config.LOCATION, false);
        AdministrationServiceSoapBindingStub rssbs = (AdministrationServiceSoapBindingStub) ts.getAdministrationService();

        rsr.setLoginId(Config.USERNAME);
        rsr.setPassword(Config.PASSWORD);
        rsr.setOrgId(new Integer(1));
        rsr.setFunction("VALIDATEUSER");

        AdministrationPerson ap = new AdministrationPerson();
        ap.setUserId(login.getUsername());
        ap.setPassword(login.getPassword());
        rsr.setPerson(ap);
        rs = rssbs.remoteAdministrationCall(rsr);
        if ("SUCCESS".equals(rs.getStatusCode()) ) {
            return "redirect:/WebBI/report";
        } else {
            return  "login";
        }
    }
}

如何更改我的网址?

4

0 回答 0