sharing data between javabeans and servlets

G

Gary N

Hi -

Is it possible to share information between javabeans and regular
servlets?

I have an application that sets/stores WEB data using beans (in one
frame). In another frame, engineering graphs are displayed using a
servlet. The servlet really needs some of the bean data. Can I
obtain the bean data in the servlet without first passing it back to
the jsp and then submitting it to the servlet?

Thanks for the help?

Gary
 
H

Herman Timmermans

Gary said:
Hi -

Is it possible to share information between javabeans and regular
servlets?

I have an application that sets/stores WEB data using beans (in one
frame). In another frame, engineering graphs are displayed using a
servlet. The servlet really needs some of the bean data. Can I
obtain the bean data in the servlet without first passing it back to
the jsp and then submitting it to the servlet?

Thanks for the help?
Gary,
One of the ways of achieving this could be the usage the ServletContext, and
depending on the scope (or life span) of the data that needs to be shared
you ould also use a Session object. You just pass the object to the bean,
and the bean can read and write back to it.
Hope this helps,
Brgds Herman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top