How to get HttpServletRequest Object in JSF


So you’re using JSF and Spring. You thought your application is modern but then you hit a showstopper bug from either library that you could not retrieve the request parameters. Time to use some old-school Servlet/JSP API. This article demonstrates how to retrieve HttpServletRequest object in JSF.

Software Environment

  • Windows 7 Professional SP1
  • Eclipse – Kepler Release
  • Java 1.7 (1.7.0_67 – Windows x86)
  • JSF 2.1.26
  • Spring 3.2.8

The Codes

Karl San Gabriel

Karl San Gabriel

Java and Enterprise Technologies Expert