Results 1 to 3 of 3

Thread: Elementary questions about beans and scope for struts user

  1. #1
    Join Date
    Dec 2004
    Location
    London
    Posts
    51

    Default Elementary questions about beans and scope for struts user

    Hi,

    What is the basic premise in spring as far as scoping and storage of beans is concerned?

    For example:

    If I defined beans in applicationContext.xml will spring instantiate and store them in a particular scope such as request/session/application? How do the applicationContext.xml and ${name}-servlet.xml files relate - just a logical explanation.

    I think I need some basic documentation that tells me a few of the elementaries (i.e. not the advanced uses) of spring concepts. For example, I can't find an explanation, anywhere, of what an 'applicationContext.xml' file is and how it is supposed to be used. Also, by defining these beans in xml, is this a replacement for creating classes manually? Or am I supposed to create both to mirror each other?

    Is there a fasttrack doc somewhere. Whenever I read the manual I get a sense of there being one hell of a gradient when all I need to get started is confirmation of the elementary but main concepts.

    Maybe I'm missing something here. Can anyone spare some advice?

    Jim

  2. #2
    Join Date
    Aug 2004
    Location
    Toronto, ON, Canada
    Posts
    101

    Default Re: Elementary questions about beans and scope for struts us

    Quote Originally Posted by jim
    If I defined beans in applicationContext.xml will spring instantiate and store them in a particular scope such as request/session/application?
    No, they are part of the Spring application context and have nothing to do with the servlet container.

    Quote Originally Posted by jim
    How do the applicationContext.xml and ${name}-servlet.xml files relate - just a logical explanation.
    You can have as many spring bean.xml files as you want. It is nothing more than a convention to put web related beans in -servlet.xml and application/logic ones in applicationContext.xml.

    Quote Originally Posted by jim
    I think I need some basic documentation that tells me a few of the elementaries (i.e. not the advanced uses) of spring concepts. For example, I can't find an explanation, anywhere, of what an 'applicationContext.xml' file is and how it is supposed to be used. Also, by defining these beans in xml, is this a replacement for creating classes manually? Or am I supposed to create both to mirror each other?

    Is there a fasttrack doc somewhere. Whenever I read the manual I get a sense of there being one hell of a gradient when all I need to get started is confirmation of the elementary but main concepts.
    There is the reference documentation on the Spring site, which is pretty extensive. The JavaDoc which has many more hints and a couple of books. I got Spring Live online as a PDF. It has good info.

  3. #3
    Join Date
    Dec 2004
    Location
    London
    Posts
    51

    Default Assistance

    Stefan,

    Thanks for the advice - thats what I was looking for. :wink:

    Jim

Similar Threads

  1. Application Scope beans are not found by Servlet
    By Michael Kastner in forum Web
    Replies: 1
    Last Post: Jul 1st, 2005, 03:31 PM
  2. Accessing methods from beans in the Flow Scope
    By jackcholt in forum Web Flow
    Replies: 4
    Last Post: May 26th, 2005, 10:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •