Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6947675
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T13:43:24+00:00 2026-05-27T13:43:24+00:00

We have a site which integrates Java web apps under Tomcat with ASP pages,

  • 0

We have a site which integrates Java web apps under Tomcat with ASP pages, including sharing information in cookies in the traditional ASP key/value format:

Cookie: foo=a=b&c=d; ...

As of Tomcat 5.5.26, cookie handling has been altered slightly, with the effect that our cookie value is now enclosed in quotes, which wasn’t the case before:

Cookie: foo="a=b&c=d"; ...

However, we have ASP code that also reads this cookie, and which expects the values in it to be parseable thus:

Response.Write("["+Request.Cookies("foo")("c")+"]");

This now fails to return the expected result:

[d"]

I have read about the use of:

javax.servlet.http.Cookie#setVersion(int)

to modify this behaviour but it doesn’t seem to be what is needed here. I am aware that the quoted value is more “correct”, but try telling ASP that… Is there any trick I have missed about getting ASP (or Tomcat) to play nice? TIA as always.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T13:43:25+00:00Added an answer on May 27, 2026 at 1:43 pm

    Quoted cookies correnspond to cookie version > 1 or 2
    Non-quoted cookies are valid for cookie version 0

    If you have a look at the very interesting discussion over at tomcats bugzilla: https://issues.apache.org/bugzilla/show_bug.cgi?id=44679 there seem to be multiple ways to tune tomcats cookie behaviour.

    If you have control about tomcat setting the cookies then this would be the way to switch to non quoted cookies:

    Cookie cookie = new Cookie(COOKIENAME,COOKIEVALUE);
    cookie.setVersion(0);
    

    This cookie will be be saved unquoted but will also restrict you to a smaller char-set and additional rules like not having any leading/trailing spaces.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the setup. I have web site which is essentially a simple CMS. Here
I have a web site which I download 2-3 MB of raw data from
I have an ASP.Net MVC intranet site which uses Windows Authentication to know who
we have a classic asp web application which has divided into three parts and
I have a legacy (haha) ASP.Net Webforms Web Site Project in Visual Studio 2008
I have a .NET site which integrates with PayPal. I am currently working with
I have a web site solution (asp.net) that runs on a SQL server database.
We have a site in ColdFusion which integrates with a credit card provider using
I have a new MVC application which integrates into a larger pre-existing intranet site.
I have a site which contains around 3000 static and dynamic pages. I think

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.