How to define welcome file list in spring 4 using java config annotation -
i trying load welcome file using spring java config annotation. read document google , got idea if used index.html or index.jsp our webcontent folder load automatically. using login.jsp page.
so not loaded automatically.
i have tried loaded login.jsp file using below code unable load.
my attempt :
@bean public internalresourceviewresolver viewresolver() { internalresourceviewresolver viewresolver = new internalresourceviewresolver(); viewresolver.setviewclass(jstlview.class); viewresolver.setprefix("/web-inf/views/"); viewresolver.setsuffix(".jsp"); return viewresolver; } @override public void addviewcontrollers(viewcontrollerregistry registry) { registry.addviewcontroller("/").setviewname("login"); } @override public void configuredefaultservlethandling(defaultservlethandlerconfigurer configurer) { configurer.enable(); }
every time getting 404 exception. missing?
below image showing place of login.jsp
Comments
Post a Comment