Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Method setAttribute() not found

 
Sylvia Wang
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I'm learning JSP using Jbuilder3.5 Enterprise.
when I run my sample codes from the localhost builded in Jbuilder, it come out following error:
Method setAttribute(java.lang.String, java.lang.String) not found in interface javax.servlet.http.HttpSession.
session.setAttribute( "theName", name );
is there anything wrong with the code ? or some limitation of Jbuilder3.5 ?
Pls help...Thanks a lot!
 
Bosun Bello
Ranch Hand
Posts: 1511
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SetAttribute is only available with version 2.2 of servelts and above. You must be using a version less than 2.2. You can use the putValue() method instead.

Bosun
 
Sylvia Wang
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it works after I upgrade to Jbuilder4.0
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic