File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Adding cookies and headers (P3P) error 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 "Adding cookies and headers (P3P) error" Watch "Adding cookies and headers (P3P) error" New topic

Adding cookies and headers (P3P) error

J.H.B. Oosterlaar
Ranch Hand

Joined: Sep 12, 2002
Posts: 41
I have the following piece of code implemented within a servlet:

I get a 503 error from TomCat when requesting the servlet. When I remove one of the two (cookie of header addition) it works fine. It doesn't matter whether I add the cookie first, or the header. What's wrong here?
chanoch wiggers
Ranch Hand

Joined: May 24, 2001
Posts: 245
i looked into this when i first saw this problem. Have you tried swapping round the code so that you add all headers before adding the cookie?

chanoch<p><a href="" target="_blank" rel="nofollow">Author of Professional Apache Tomcat</a></p>
I agree. Here's the link:
subject: Adding cookies and headers (P3P) error
Similar Threads
How do I enable cookie for third party website in IE from java
how to send session info from Applet to servlet?
Use of Logic equal tag
Tomcat refusing to set a cookie...
session mismanagement in Netscape using HttpURLConnection