I'm using javax.ws.rs-api
and javax.mvc
maven libraries to build an mvc restful web based app.
but i cant return view.the preAdd
method return view just as a simple string. it does'nt return actual view.
my webserver is glassfish4
@Path("/home")
public class HomeController {
@Controller
@Path("new")
@GET
public String preAdd() {
return "/WEB-INF/jsp/edit.jsp"; // it echo the exact string on the screen: "/WEB-INF/jsp/edit.jsp"
}
}