4

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 1

4

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();
%>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.