I am having problem in some request access, in my web application. I am not able to figure out the issue.
In my we application servlet mapping configuration is like 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 the spring configuration for dispatcher servlet is like 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 I make some API request, the call goes to the method and method sout
also print in server log.But no response comes out.
For information I am deploying the application on glassfish server.
I am not able to get the issue reason also. If any one knows then help 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;
}