0

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"
    }
}
alex
  • 7,551
  • 13
  • 48
  • 80
  • 1
    Try Glassfish 5. Glassfish 4 still uses EE 7. Maybe that has something to do with it. Just a guess. Does `@Inject Models` work? Also what are your dependencies? – Paul Samsotha Nov 27 '20 at 22:47
  • 1
    @PaulSamsotha YOU SAVED MY LIFE.IT WORKED!.it was 2 days i was crawling the web for the solution – alex Nov 27 '20 at 23:23

0 Answers0