I see at least 2 choices:

     1.  You can a static initializer.
     2.  You can do it in the constructor, since action classes are made
only once.

Jason




                                                                                       
                              
                    "Alex Colic"                                                       
                              
                    <alex.colic@pop        To:     "Struts" 
<[EMAIL PROTECTED]>                         
                    -ware.com>             cc:                                         
                              
                                           Subject:     How to pass initialise 
parameters to action class            
                    10/24/2001                                                         
                              
                    09:30 AM                                                           
                              
                    Please respond                                                     
                              
                    to struts-user                                                     
                              
                                                                                       
                              
                                                                                       
                              




Hi,

I have an action class that has a variable that I want set from the web.xml
file. To prevent the action class from reading the xml file everytime it is
accessed I wanted to set the variable once in the action classes init()
method. After looking at the action class I see that there is no init()
method.

Any idea how I can set the value of a variable only once in the action
class?

Regards

Alex




______________________________________________________________________
This message contains information that may be privileged or confidential
and is the property of the Cap Gemini Ernst & Young Group.  It is intended
only for the person to whom it is addressed.  If you are not the intended
recipient, you are not authorized to read, print, retain, copy,
disseminate, distribute, or use this message or any part thereof. If you
receive this message in error, please notify the sender immediately and
delete all copies of this message

Reply via email to