request.setAttribute

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • padmarajaiah
    New Member
    • Mar 2007
    • 2

    #1

    request.setAttribute

    Hi ALL,


    I want to use request.setAttr ibute and request.getAttr ibute.In the same jsp.




    I want to set the valuein jsp,
    setAttribute('k ey", value);

    and use in the samepage script.
    getAttribute("k ey");


    Can any one help me pls, I tried request.getAttr ibut("key");

    iam getting the error request not found ,

    pls help ASAP.

    thanks
    raj
  • DeMan
    Top Contributor
    • Nov 2006
    • 1799

    #2
    Can I suugest JavaScript Question to the JavaScript forum....

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by DeMan
      Can I suugest JavaScript Question to the JavaScript forum....
      It's actually a JSP question and so perhaps belongs here.

      @OP You can use
      Code:
      request.getAttribute("key");
      inside a jsp. Just post the code for the JSP using code tags.

      Comment

      • DeMan
        Top Contributor
        • Nov 2006
        • 1799

        #4
        Sorry....my bad

        Comment

        • r035198x
          MVP
          • Sep 2006
          • 13225

          #5
          Originally posted by DeMan
          Sorry....my bad
          There have been suggestions of having a separate forum for jsp/jsf/servlets/ejbs but we decided against it for now.

          Comment

          Working...