Loading...
Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon
TUTORIAL

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Vaadin 7 deploy to tomcat 7 error with cookies

jorge pinto
9 years ago Apr 08, 2014 12:15am
Teppo Kurki
9 years ago Apr 08, 2014 5:44am
Krishna Kotari
9 years ago Apr 08, 2014 5:50am

Hello There,

I am just making assumptions, I believe you have disabled cookies at Server Level. To check if this is the cause please open  the file under ${CATALINA_HOME}/Conf/context.xml and check if cookies attribute under Context tag is set to true. If set to false then turn it to true. If you do not wish to turn it to true due to other applications running in the same Server, then Create file called context.xml folder under ${APP_HOME}/META-INF/context.xml(In eclipse WebContent/META-INF) and copy the following snippet in to it.

NOTE: This are default contents from my local context.xml file

<Context>

    <!-- Default set of monitored resources -->
    <WatchedResource>WEB-INF/web.xml</WatchedResource>

    <!-- Uncomment this to disable session persistence across Tomcat restarts -->
    <!--
    <Manager pathname="" />
    -->

    <!-- Uncomment this to enable Comet connection tacking (provides events
         on session expiration as well as webapp lifecycle) -->
    <!--
    <Valve className="org.apache.catalina.valves.CometConnectionManagerValve" />
    -->

</Context>

Pls let me know if this doesnt solve the issue.
Also, Check the link Teppo Kurki as posted, it may be of some help.

Thanks.

 

jorge pinto
9 years ago Apr 08, 2014 9:25am
Krishna Kotari
9 years ago Apr 08, 2014 9:36am

Hello There,

What is the version of tomcat you are using?

And secondly, where did you create context.xml?
If you are using eclipse create it under ${PROJECT_ROOT}/WebContent/META-INF if you are using any build tool to create a war ensure that you have the file under ${WAR_ROOT}/META_INF and please try this by removing attribute useHttpOnly.

Also, Please reload your application after making these changes.

Thanks,
Krishna.

jorge pinto
9 years ago Apr 08, 2014 9:57am
Teppo Kurki
9 years ago Apr 08, 2014 10:04am

Hi,

I just looked at your demo app with FireBug's cookie tab. It shows that indeed the HttpOnly is enabled for the cookie, so that definitely seems to be your problem. Unfortunately I don't know if/how you can change that for a specific deployment.

jorge pinto
9 years ago Apr 08, 2014 10:12am
jorge pinto
8 years ago Apr 28, 2014 4:47pm

After a long argument, the company changed the server configurations according to what you guys proposed, problem solved. i thank you.

Freddy Boisseau
5 years ago Aug 03, 2017 7:08pm
Freddy Boisseau
5 years ago Aug 03, 2017 7:22pm
Robert Mikes
5 years ago Mar 07, 2018 5:45pm