Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

setAttribute(String, Object) error

843838Oct 15 2006 — edited Sep 25 2007
Hello Guys,

I have in my jsp page something like this.

request.setAttribute("variable",0). When i load the page, it comes with an error saying that

Generated servlet error:
The method setAttribute(String, Object) in the type HttpSession is not applicable for the arguments (String, int)


I tried various things like
Integer v = new Integer(0);
Integer.valueOf(0).
But it comes up with the same error.

Any ideas?

Help would be appreciated.

Kay
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2007
Added on Oct 15 2006
4 comments
519 views