George Andrews

Greenhorn
+ Follow
since Feb 24, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by George Andrews

Below you can find the code I was able to get to work:



Hi Tomasz,

Actually, I was able to get this to work and posted the solution I am currently using. Thanks!
10 years ago
Below you can find the code I was able to get to work:

web.xml:



WrapperServlet.java:



ParameterSubstituter.java:



Props to M Simpson in this post for giving me some direction: https://coderanch.com/t/79094/Websphere/environment-variable-referance-Web-xml
10 years ago
I am currently trying to use System Properties to determine which property file to load for a Generic Servlet as described below. I would like to access the System Property "platform.type" in particular, though if this is possible, I will also use others such as "serverName".



I have already been through multiple posts regarding the following: ContextLoaderListener and ContextLoaderServlet. They will not work for this case because I need those properties accessible when the Generic Servlet accesses the above listed Context Parameter.

I have even created a Wrapper Servlet, let's call it GenericInitializationServlet, in which I attempt to replace the properties by: using a ServletConfig Proxy to access the Context Properties using the getContextParameter method and then substituting the property value with the matching System Property.

Example:



Does anyone know of a way to accomplish this? To reiterate, I need to perform property replacement on a Context Parameter that will be used by a Servlet.

Thanks!
10 years ago