Forum Discussion
JRahm
Admin
Aug 02, 2006WebLogic information extraction
Our weblogic servers will give me an active list of servers in the X-WebLogic-Cluster-List header if I supply the X-Weblogic-Request-ClusterInfo header with a value of true. This is the missing piece...
JRahm
Admin
Aug 03, 2006partially...I would like to first split the content by server:
set server_mappings [split [HTTP::header "X-WebLogic-Cluster-List"] "|" ]
Then set an array with the first two fields in each index value, so that the array looks like this:
{
"-306262974 server_a-93"
"-572170000 server_c-93"
"-851958269 server_b-91"
"-896443913 server_d-93"
"-937189304 server_b-90"
}
However, the ultimate goal is to replace that server_a-93 with a real IP address. I have that information in a class:
class server_name_to_IP {
"server_a-93 10.1.1.10"
"server_c-93 10.1.1.11"
"server_b-91 10.1.1.12"
"server_d-93 10.1.1.13"
"server_b-90 10.1.1.14"
}
So, what I'm trying to get my very tiny brain around is take the header information for each server and build an array so that when I receive requests from clients with cookie or URI with this information:
jsessionid=Gsfsafavlaeruae!-306262974!-851958269
I can extract the 2nd and 3rd values in this information and forward requests appropriately.
I'm not sure if I should just use two arrays, or do a search/replace function, or possible and array of arrays. And of course, the coding skills to get there, of which I have none. So before I spun myself in circles, I thought I'd reach out to the community for some advice.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects