Menu

HttpServletRequest and getHeaderNames

2003-01-16
2003-01-17
  • Erik Ramfelt

    Erik Ramfelt - 2003-01-16

    Im using the servletunit to test most of my servlets, and its runs great. But I wonder one thing with the getHeaderNames() method. This method always returns NULL.

    The javadoc explains it by "Some servlet containers do not allow do not allow servlets to access headers using this method, in which case this method returns null."

    Is this going to change in any future upgrades? Which servlet containers return null, and is it still necessary to always return null?
    Its sad that some (badly implemented) servlet containers must limit all other servlet implementations (as long as you would like to do unittesting).

     
    • Russell Gold

      Russell Gold - 2003-01-17

      As it happens, I recently received a contribution which implemented this method. The code is in cvs. Let me know if you need a build.

       
    • Erik Ramfelt

      Erik Ramfelt - 2003-01-17

      Ok, great!
      And no I dont need any implementation right now, but thanks anyway.

       

Log in to post a comment.

Auth0 Logo