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

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,813
Latest member
lawrwtwinkle111

Latest Threads

Top