This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes P3P compliance-Tomcat HTTP response headers Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "P3P compliance-Tomcat HTTP response headers" Watch "P3P compliance-Tomcat HTTP response headers" New topic

P3P compliance-Tomcat HTTP response headers

Joe D

Joined: Jun 26, 2001
Posts: 1
I am in the process of making our site P3P compliant. We are running Tomcat 3.2.2(stand alone) on a Linux box. I am looking for information regarding adding data to HTTP header responses(see example below). One of the aspects of P3P compliancy is referencing where a Policy is located and referencing the "Compact Policy" via the "CP" tag. I need to add these values and as I am new to Tomcat I need know where to find the header information.
<!-- example -->
HTTP/1.1 200 OK
P3P: policyref="",
Content-Type: text/html
Content-Length: 8104
Server: ...
<!-- end example -->
Any suggestions would be appreciated.
Frank Carver

Joined: Jan 07, 1999
Posts: 6920
"Joe D",
The Java Ranch has thousands of visitors every week, many with surprisingly similar names. To avoid confusion we have a naming convention, described at . We require names to have at least two words, separated by a space, and strongly recommend that you use your full real name. Please log in with a new name which meets the requirements.

Read about me at ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12761
Hi Joe D
Use the response.setHeader( name, value ) method to set your required header.
Use the request.getHeader( name ) if you need to locate a header.
Joe Dale

Joined: Jun 27, 2001
Posts: 1
Thanks for the reply, I really need a "server-wide" solution. I am looking for something similar to modifying a header on Apache. I am using Tomcat stand-alone, so there is no Apache interaction.
wood burning stoves
subject: P3P compliance-Tomcat HTTP response headers
Similar Threads
IE Silently Rejects Cookies, then Denies Doing So
P3P Policies
Adding cookies and headers (P3P) error
P3P Policies
how do i find the referring page in struts