This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Wrong Line Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Wrong Line" Watch "Wrong Line" New topic
Author

Wrong Line

Anthony Smith
Ranch Hand

Joined: Sep 10, 2001
Posts: 285
I meant this one. count is an int.
username is a String
data.getSession().setAttribute(username, count);
Junilu Lacar
Bartender

Joined: Feb 26, 2001
Posts: 4118
    
    2

Assuming data is an HttpSession, the second parameter of the setAttribute method needs to be an Object, not a primitive. Try this:
setAttribute(userName, new Integer(count));
Junilu
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Wrong Line
 
Similar Threads
Another way to get the information needed
What will be the most efficient method to solve this?
webapp sql injection
resultset next() returns false and yet record(s) exist
What's wrong with this line?