• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

P3P compliance-Tomcat HTTP response headers

 
Joe D
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello
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",
CP="NON DSP COR CURa ADMa DEVa CUSa TAIa OUR SAMa IND"
Content-Type: text/html
Content-Length: 8104
Server: ...
...content...
<!-- end example -->
Any suggestions would be appreciated.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"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.
Thanks.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Bill
 
Joe Dale
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic