This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes setAttribute method not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "setAttribute method not found" Watch "setAttribute method not found" New topic

setAttribute method not found

santromeer pantronova

Joined: Jun 19, 2001
Posts: 2
Hi everybody
I am getting a problem while using session object in a jsp page.
I am binding an object with current session using
session.setAttribute(String str, Object obj); method to use this object in other pages , but it is showing an page translation error setAttribute(String str, Object obj) not found in javax.servlet.HttpSession interface.
Could any body solve this problem .I am using Javawebserver 2.0.

Thanks in advance.
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
It's because JWS is not using the latest version of the servlet API. setAttribute is new with version 2.2. You can use putValue() instead, if you can not get a hold of the latest servlet API.


So much trouble in the world -- Bob Marley
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
subject: setAttribute method not found