aspose file tools*
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
JavaRanch » Java Forums » Java » Servlets
Bookmark "P3P compliance-Tomcat HTTP response headers" Watch "P3P compliance-Tomcat HTTP response headers" New topic
Author

P3P compliance-Tomcat HTTP response headers

Joe D
Greenhorn

Joined: Jun 26, 2001
Posts: 1
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

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.
Thanks.


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

Joined: Mar 22, 2000
Posts: 12769
    
    5
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

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