RE: Maverick servlet init parameter name constants should be public?
"Eelco Hillenius" <[email protected]>
| Newsgroups | gmane.comp.web.maverick.general |
|---|---|
| Message-ID | <[email protected]> |
Eerhm... ooops. Once again I am too quick to answer... sorry for the mailing list polution. I agree with your proposal (but am not a maintainer). Eelco -----Original Message----- From: [email protected] [mailto:[email protected]]On Behalf Of [email protected] Sent: donderdag 24 april 2003 10:56 To: [email protected] Subject: [Mav-user] Maverick servlet init parameter name constants should be public? Hi, In one of my Maverick applications, the Dispatcher servlet is running in Jetty (www.mortbay.org). It is configured programmatically, rather than by a web.xml file. I need to set a value for the "configFile" servlet initialisation parameter. I hoped to be able to use the constant INITPARAM_CONFIG_FILE, defined in Dispatcher, in my call. For instance: - mavHolder.setInitParameter(INITPARAM_CONFIG_FILE, "foo"); But I cannot do that, because INITPARAM_CONFIG_FILE is declared "protected", not "public". So I have to: - mavHolder.setInitParameter("configFile", "foo"); This works fine, but is a bit less tidy, probably wastes a few bytes of memory, and would break if you changed the parameter name (though perhaps that's unlikely). So my suggestion for a very simple improvement for a future version would be to make this constant, and similar ones, public. This would tidy up code for people doing programmatic configuration, like me. #:^P ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER] ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf [INVALID FOOTER]