Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2004
    Location
    Newcastle, England
    Posts
    72
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Servlet setAttribute issue with ints

    Hi,

    I'm trying to pass an int to a jsp script using the following line:

    req.setAttribute("first", firstRowNumber);

    firstRowNumber is an int defined above. However, it will not allow me to compile this. I am aware that the API says Object not int, however a fellow coder has basically exactly the same code, and exactly the same line, in a piece of his code and it works. How can I get this to work? And if no one knows how to get it working directly, could you tell me how to get around this problem?

    Thanks in advance
    Beauty is in the eye of the beer-holder

    Man who smoke pot, choke on handle

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    are you sure int is the correct datatype? Or must it be an Integer?
    I am the luckiest man in the world


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •