Re: Initializing Parameters
"Daniel Jaffa" <[email protected]> Mon, 30 Sep 2002 10:07:18 -0400
| Newsgroups | gmane.comp.web.mvc.devel |
|---|---|
| Message-ID | <[email protected]> |
HttpSession session = request.getSession();
ServletContext ctx = this.getServlet().getServletContext();
setter = (String) ctx.getInitParameter("name of value"));
----- Original Message -----
From: Andy Schrader
To: [email protected]
Sent: Sunday, September 29, 2002 10:36 PM
Subject: [MVC-Programmers] Initializing Parameters
I'm writing a web application using Tomcat and Struts. I'm trying to place parameters in my web.xml file for use in the application (DB username, smtp server, etc). I'm having trouble finding examples of the use of context-params and init-params, which one do I use?
I think I use context-params but I have an HttpServletRequest which doesn't have the getInitParamater() method. is that even the right direction?
I'm just looking for a way to pass some variables in without have to recompile every time I change one. Any help in the way of example code would be much appreciated.
Thanks,
Andy
To unsubscribe from this group, send an email to:
[email protected]
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.