Passing Value to REST Java and Redirection from REST

I would like to know the following scenario would work, when I tested I have had issues in re-directing to another resource.

I have a JSP page where userid is being passed from a URL(domain authenticated user) and receiving this value in JSP. Once I have this, I am doing a submit and pass values to server side REST Java by submitting the form

$(document).ready(function () { ..... $("#domainUser").val(user) submitDomainData(); document.frm.submit(); }); function submitDomainData() { var postUrl = 'rest/domain/user/'; var frm = $("#myform").serializeArray(); $.ajax({ .....

In REST Java, I am checking whether this is a valid user or not and redirecting to appropriate pages.

@POST @Path("/user") public void findDetails(@FormParam("userName") throws URISyntaxException { URI location = UriBuilder.fromUri("domain.jsp").build(); .... .... .... return Response.temporaryRedirect(location).build(); }

Problem I am facing is in REST Java, I'm unable to redirect, which means it is not navigating to domain.jsp and there are no errors in browser console.

Is this because I am not doing this process in a Servlet?

Category:java Views:6 Time:2018-12-29
Tags: java rest

Related post

Copyright (C), All Rights Reserved.

processed in 0.155 (s). 11 q(s)