access httpServletRequest

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mfsiddiq
    New Member
    • Aug 2007
    • 17

    access httpServletRequest

    Hi Everyone

    I need help regarding how to get the handle for httpServlet while using webService.Sinc e we are using webservice,i am not able to get handle of httpServletRequ est and httpServletResp onse.Both httpServletRequ est and httpServletResp onse returns null.
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by mfsiddiq
    Hi Everyone

    I need help regarding how to get the handle for httpServlet while using webService.Sinc e we are using webservice,i am not able to get handle of httpServletRequ est and httpServletResp onse.Both httpServletRequ est and httpServletResp onse returns null.
    Perhaps if you post the codes you used and show us how they gave null?

    Comment

    • mfsiddiq
      New Member
      • Aug 2007
      • 17

      #3
      As i said we are not using HTTP service.This is the sample code.


      HttpServletRequ est req=ServletActi onContext.getRe quest();
      HttpServletResp onse res=ServletActi onContext.getRe sponse();
      HttpAuthenticat or.authenticate (req, res, userName, password);
      String requestingPage = (String) getSession().ge tAttribute(Veri fyTokenFilter.O RIGINAL_URL);
      if (requestingPage != null) {
      securityDTO.set IsAccessable(fa lse);
      System.out.prin tln("when authentication fails");

      } else {

      securityDTO.set IsAccessable(tr ue);
      securityDTO.set UserName(userNa me);
      securityDTO.set Password(passwo rd);
      System.out.prin tln("when authentication is successful");

      }

      Comment

      Working...