-
Notifications
You must be signed in to change notification settings - Fork 569
Closed
Description
Having hundrerds of Jersey endpoints where ServletContext and HttpServletResponse is inyected, when using 'aws-serverless-java-container' I have to modify the code in order to obtain the Servlet context from the Request.
Could be simpler if the ServletContext and HttpServletResponse could be inyected as HttpServletRequest is.
@Context
private ServletContext myContext;
@Context
private javax.servlet.http.HttpServletRequest myServletRequest;
@Context
private javax.servlet.http.HttpServletResponse myServletResponse;
@POST
@Consumes({MediaType.APPLICATION_JSON})
@Produces({MediaType.APPLICATION_JSON + ";charset=UTF-8"})
public Response execute( com.awslambdatest.simpletest_RESTInterfaceIN entity )
{
..
..
}
I'm already inyecting HttpServletRequest this way:
https://github.com/awslabs/aws-serverless-java-container#jersey-servlet-request