Web Images Videos Maps News Shopping Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
rule to set reponse header to variable?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Anthony J. Biacco  
View profile  
(1 user)  More options Jun 10, 12:17 pm
From: "Anthony J. Biacco" <thelittlepri...@asteroid-b612.org>
Date: Wed, 10 Jun 2009 09:17:58 -0700 (PDT)
Local: Wed, Jun 10 2009 12:17 pm
Subject: rule to set reponse header to variable?
Hi,

I'm using urlrewrite 2.6 on tomcat 6.0.18. I'm attempting to use it to
set a custom HTTP response header. The header is desgined to tell me
which tomcat server my webapp request has been processed by, as
normally i can't tell from the headers (i use apache->mod_jk->tomcat).
I can set the header to a static value in the webapp's WEB-INF, as in:
<urlrewrite>
<rule>
<from>.*</from>
<set type="response-header" name="X-appserver">my-app-server-name</
set>
</rule>
</urlrewrite>
But that means i need a seperate urlrewrite.xml for each tomcat
server, since "my-app-server-name" will be different base on the
server, and therefore i need a seperate .war for each server, and i'd
like to avoid that.
Is there a way to use a variable or get urlrewrite to insert the
hostname or output from a command?
Such as:
<urlrewrite>
<rule>
<from>.*</from>
<set type="response-header" name="X-appserver">${myjvmroute}</set>
</rule>
</urlrewrite>
where ${myjvmroute} is set for tomcat via -Dmyjvmroute=my-app-server-
name on the tomcat startup line?

Or even to put the urlrewrite rules in the tomcat global configs
instead of in the webapp config?

Thanx, and thanx for writing this software.

-Tony


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google