java - Server not responding for some request -
i having problem in request access, in web application. not able figure out issue.
in application servlet mapping configuration this..
<servlet> <servlet-name>default</servlet-name> <servlet-class>org.eclipse.jetty.servlet.defaultservlet</servlet-class> <load-on-startup>0</load-on-startup> </servlet> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping>
and spring configuration dispatcher servlet this.
in webapplicationinitializerconfig
annotationconfigwebapplicationcontext dispatchercontext = new annotationconfigwebapplicationcontext(); dispatchercontext.register(dispatcherconfig.class); dispatcherservlet dispatcherservlet = new dispatcherservlet(dispatchercontext); servletregistration.dynamic dispatcher; dispatcher = servletcontext.addservlet("api/", dispatcherservlet); dispatcher.setloadonstartup(1); string apimappingpath = /api/*; dispatcher.addmapping(apimappingpath);
when make api request, call goes method , method sout
print in server log.but no response comes out.
for information deploying application on glassfish server.
i not able issue reason also. if 1 knows me out.
method code:
@requestmapping(value = "/email", method = requestmethod.post) public map passwordresetmail(@requestbody(required = false) string email, httpservletrequest request, httpservletresponse response) { system.out.println("email"+email); map map = new hashmap(); map.put("email",email); return map; }
Comments
Post a Comment