wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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="http://somesite.com/P3P/PolicyReferences.xml",
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 http://www.javaranch.com/name.jsp . 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 frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12758
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.
I agree. Here's the link: http://aspose.com/file-tools
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