I am developing a web service using Eclipse, and in order to try it I launch the tomcat server and try an http request with parameters. The problem is that it seems that the parameters I give are ignored :
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
HttpSession session = request.getSession();
if(session.getAttribute("lat") == null && session.getAttribute("lon") == null) {
session.setAttribute("lat", request.getAttribute("lat"));
session.setAttribute("lon", request.getAttribute("lon"));
response.setContentType("text/plain");
response.getWriter().append("RECEIVED");
}
else {
With the debugger, I can see that the object request
doesn't contain my parameters.