Thanks I look at that method




Wendy Smoak <[EMAIL PROTECTED]>
12/19/2003 12:47 PM
Please respond to "Struts Users Mailing List"

 
        To:     Struts Users Mailing List <[EMAIL PROTECTED]>
        cc: 
        Subject:        RE: Best practice for handling Action Init Parameters


> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
> What is the best practice in Struts for handling application 
> parameters. Do I put my parameter in the Action init parms 
> and then pull the parameter in at every Action class I use?
> Basically I have a JSP page with Java mail tags that requires 
> a host name and I do not want to hard code the 
> smtp host name into the JSP.

Wouldn't this be more appropriate as a context parameter, since it's not
really Struts-specific?  If I knew how to use Action init parameters,
I'd save them for things that only a Struts Action would care about.
But the smtp host could be used by anything-- JSP, Servlet, etc.  I have
something similar for the URL that users need to be redirected to for
login, and use:

   <context-param>
      <param-name>edu.example.auth.url</param-name>
      <param-value>http://www.example.edu/auth</param-value>
   </context-param>

-- 
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to