在ARest服务器中提供Tomcat JVM选项

时间:2017-09-17 00:40:50

标签: java apache tomcat cookies jvm

我想在我的Tomcat jvm选项中提供“-Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_EQUALS_IN_VALUE = true”,这样即使Cookie中存在“=”,也可以解析HttpServletRequest cookie。我在下面尝试了几个选项 -

1 - 在TomcatJvmOptions opconfig中指定它。

2 - 在服务器目标

中添加了以下行
[Required]
[DisplayName("Date of Birth")]
public DateTime DOB
{
    set { }
    get { return DOB.Date; }
}
public int Age
{
    get { return Convert.ToInt32(DateTime.Now.Year) - Convert.ToInt32(DOB.Year); }
}

3 - 在服务器目标

中添加了以下行
<jvmarg value="-Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_EQUALS_IN_VALUE=true" />
 <jvmarg value="-Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0_COOKIE_READS=true" />

4 - 在build.xml中添加以下行

  

     值= “ - Dorg.apache.tomcat.util.http.ServerCookie.ALLOW_HTTP_SEPARATORS_IN_V0_COOKIE_READS =真”/&GT;

上述方法都没有奏效。如果我犯了一些错误,你能指导一下吗?

感谢。

0 个答案:

没有答案