• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

set bean property with request attribut

 
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ranchers,

I got this little problem:
I have

and I want to replace curent property of session scoped attribute "user" - users list.

my bean "user" is:

How can I do that within JSTL?
I supose with useBean and setProperty, but I am confused with getting list from request scope and puting her on the right place in user bean from session scope.

Because I cant do this:


please help,
regardes,
Marko
 
Sheriff
Posts: 67747
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if this is exactly what you are after, and you haven't provided enough info for a definitive answer, but something in the form of:



may be what you are asking.
 
Marko Debac
Ranch Hand
Posts: 121
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think not, because I have two beans, but one bean HAS A list[] of second beans for his property. And I have instance of that first bean filled up from database (and all his property), and set in session scope.

Now, I get new list[] from somewhere (web services operation called from jsp)and I set it like request attribute by name "list".
Further, I need to put (replace existing) list in session scope attribute (upper described instance - session.setAttribute("user", user)), with no scriptlet

cheers,
Marko
 
Bartender
Posts: 1845
10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Surely this does it?



its approximately equivalent to user.setList(request.getAttribute("list"));
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic