sharing data between javabeans and servlets

Discussion in 'Java' started by Gary N, Jan 3, 2004.

  1. Gary N

    Gary N Guest

    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
     
    Gary N, Jan 3, 2004
    #1
    1. Advertising

  2. Gary N wrote:

    > 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

    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
    --
    Suse Linux Professional 8.1 on Athlon 1.1 Ghz 512 Mb
    Anti Spam = remove the "dot" and the "at"
    Registered Linux User #264690
    Visit us : http://users.skynet.be/herman.timmermans
     
    Herman Timmermans, Jan 3, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jason
    Replies:
    1
    Views:
    720
  2. Dennis Gavrilov
    Replies:
    1
    Views:
    1,454
    Dennis Gavrilov
    Jul 24, 2003
  3. thecrow
    Replies:
    24
    Views:
    1,211
    John McGrath
    May 28, 2005
  4. cowboy
    Replies:
    2
    Views:
    802
    panthipa piyasuraprateep
    May 10, 2007
  5. jmDesktop
    Replies:
    3
    Views:
    464
    Kevin McMurtrie
    May 19, 2008
Loading...

Share This Page