mercredi 12 août 2015

How do I render a new .jsp file in the browser using Jersey for java?

My site goes to a login page that I want to redirect to another page when the user logs in. I have a "POST" method that sends the "username" and "password" to the server and the server checks if the username and password exist.

Here is my method

@POST
@Path("logIn")
public void signIn(@PathParam("profileName") String profileName, @PathParam("password") String password) {
    if (profileService.getProfile(profileName) != null && (profileService.getPassword(profileName)).equals(password)){
        //Render a new page ex "feed.jsp"
    }
    else {
          //send unsucessful message back to client?? 

}

The Client is able to POST the username and password properly and check if it exists... I just have no idea how to make it render (redirect to???) a new page




Aucun commentaire:

Enregistrer un commentaire