Skip to content

Commit 3a8dfff

Browse files
ThiagoDosSantosFagnerMartinsBrack
ThiagoDosSantos
authored andcommitted
Document how to make Tomcat 8 to be compliant with RFC6265
Closes js-cookiegh-131.
1 parent a49f53a commit 3a8dfff

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

SERVER_SIDE.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ var PHPCookies = Cookies.withConverter({
4949

5050
Rack seems to have [a similar problem](https://github.com/js-cookie/js-cookie/issues/70#issuecomment-132503017).
5151

52-
## Tomcat 7.x
52+
## Tomcat
53+
54+
### Version >= 7.x
5355

5456
It seems that there is a situation where Tomcat does not [read the parens correctly](https://github.com/js-cookie/js-cookie/issues/92#issue-107743407). To fix this you need to write a custom write converter.
5557

@@ -69,6 +71,17 @@ var TomcatCookies = Cookies.withConverter({
6971
});
7072
```
7173

74+
### Version >= 8.0.15
75+
76+
Since Tomcat 8.0.15, it is possible to configure RFC 6265 compliance by changing your `conf/context.xml` file and adding the new [CookieProcessor](https://tomcat.apache.org/tomcat-8.0-doc/config/cookie-processor.html) nested inside the Context element. It would be like this:
77+
78+
```xml
79+
<Context>
80+
<CookieProcessor className="org.apache.tomcat.util.http.Rfc6265CookieProcessor"/>
81+
</context>
82+
```
83+
And you're all done.
84+
7285
Alternatively, you can check the [Java Cookie](https://github.com/js-cookie/java-cookie) project, which integrates nicely with JavaScript Cookie.
7386

7487
## JBoss 7.1.1

0 commit comments

Comments
 (0)