| Author |
How to retrieve context parameter?
|
Taka Chan
Ranch Hand
Joined: Aug 19, 2004
Posts: 33
|
|
I am using Struts and Tomcat 5 and I have setup a parameter in web.xml as context parameter. I will like to know, is there any way I can retrieve value of this parameter from a class that is not inheriting HttpSerlvet ? As I am a newbie and just know that I can retrieve this from the context of the web application. I would like to write a DAO class that does not inherite any class to retrieve the context paramter. Any suggestion? Thank you in advance.
|
SCJP 1.4<br />SCWCD 1.4<br />SCBCD 1.3<br />SCEA(old version)...Part 1 Cleared<br />BearSoft Technology Group
|
 |
Marc Peabody
pie sneak
Sheriff
Joined: Feb 05, 2003
Posts: 4725
|
|
Your DAO probably shouldn't know anything about the code between it and the user. I say it's a better idea to design the methods of the DAO so they accept that context value as a parameter.
|
A good workman is known by his tools.
|
 |
 |
|
|
subject: How to retrieve context parameter?
|
|
|