[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

useBeans persistence problem?



hey Atlanta

I have been trying to learn how bean persistence and useBean directive
works.  The problem I have is to get some data from a browser submitted form
and put into a request processing bean, using the setProperty "*" method,
which must stay available (persist) once its validated, so I can use the
bean more than one request later(other validations are being conducted).

I wonder if  I can change the bean scope parameter in my useBean directives
(like I saw in a book)
( ignore case)

<usebean:whatever   id= "foo" class= "blahblah" scope= "request">
<usebean:whatever   id= "foo" class= "blahblah" scope= "session">

I think this does not convert the first foo to session level scope, as the
book infers.
Is this not possible because it makes a unique instance with the same name
but different scope?


Is the preferred alternative to copy the validated Request bean data to a
session object and then brute force use the session.getValue() method in a
later JSP?

Thanks for your help
Noel Susskind