I have a HTML page that allows me to use JSP code. I was able to print some output using some basic Java. But How do I obtain a HttpServletRequest object so I can print some of its properties onto the HTML page?
1 Answer
Just use the request variable (HttpServletRequest instance). It is one of implicit objects in JSP. Check properties here: http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServletRequest.html
<%
request.getHeader();
%>