Announcement Announcement Module
Collapse
No announcement yet.
Elementary questions about beans and scope for struts user Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Re: Elementary questions about beans and scope for struts us

    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.

    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.

    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.

    Comment


    • #3
      Assistance

      Stefan,

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

      Jim

      Comment

      Working...
      X