Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: Getting the ApplicationContext in the Struts Form

  1. #11
    Join Date
    Aug 2004
    Posts
    16

    Default

    irbouho,

    Now I'm on the same page with you. Just defer you initilization from the constructor of your action form to the setServlet method. As you can see from the code I previously posted, no interaction occurs with the action form between instantiation and the call to setServlet.

    Mike

  2. #12
    Join Date
    Aug 2004
    Location
    Herndon, Virginia
    Posts
    28

    Default

    Quote Originally Posted by futang
    irbouho,

    Now I'm on the same page with you. Just defer you initilization from the constructor of your action form to the setServlet method. As you can see from the code I previously posted, no interaction occurs with the action form between instantiation and the call to setServlet.

    Mike
    I actually tried that after seeing the code and it actually work for the reason you mentioned. My only issue probably may just be one of semantics. With the Action, setting the webAppContext seems(IMO anyway) natural and intuitive. But for the form doing this AND initializing that data object seems...weird. Plus, I've got a minor concern about that particular assumption changing.

    Other than my particular usage, the setServlet does work as adverstised for anyone else who is wondering. Thanks for the post.
    ---------------------------------
    David H. McCoy


    ----------------------------------

Similar Threads

  1. Replies: 3
    Last Post: Jun 8th, 2010, 03:27 AM
  2. Replies: 9
    Last Post: May 4th, 2006, 09:53 AM
  3. Replies: 0
    Last Post: May 27th, 2005, 09:21 AM
  4. Inject into a Struts form bean?
    By azzoti in forum Web
    Replies: 1
    Last Post: Apr 5th, 2005, 11:49 AM
  5. Replies: 10
    Last Post: Nov 2nd, 2004, 09:38 AM

Posting Permissions

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