In your backing bean method loginaction
, instead of returning null (which means that you are telling the JSF to stay at the current view) you should return a string object, where the name of the page on which you want the function to redirect should be included. This format should work if you are working on a faces application (otherwise it should be similar, just check online):
return "/faces/nameOfPageToRedirect.jsf?faces-redirect=true";