Encountering session timeout problem post enabling Httponly and secure attributes in Tomcat configuration file

Upon testing the application on an older version of Firefox (v42) as per requirement, I encountered an issue. I made sure to enable the Httponly and secure attributes in my web.xml file:

<session-config>
        <session-timeout>30</session-timeout>
        <cookie-config>
            <http-only>true</http-only>
            <secure>true</secure>
        </cookie-config>
</session-config>

While everything functioned correctly when accessed with newer versions of Firefox/Chrome, I faced a problem with the old version of Firefox (v42). In this case, the session would expire immediately after logging in with my credentials.

I am curious about the cause behind this behavior and whether there is a workaround to address it for older browser versions.

Answer №1

After enabling the secure flag for the cookie, I discovered that it is only valid for https requests. Any session created through an http request will be invalidated, resulting in the session expiring shortly after logging in.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Ways to verify if a user is authenticated in Firebase and using Express/Node.js

How can I determine if a user is authenticated to access a page that requires authentication? I attempted to check with (firebase.auth().currentUser !== null) but encountered an error: TypeError: firebase.auth is not a function This is my current configu ...

Half of the Document properties were not successfully added to a mongoDB collection with the help of Mongoose and Express

A server application built with Node.js is experiencing an issue where the Age field from an HTML form is not being written to the MongoDB document. The application uses ExpressJS and Mongoose for this task. I need assistance in resolving this problem. Be ...

Master Checkbox in HTML Table Not Functioning for Selecting/Deselecting All Items

https://i.sstatic.net/RKWaC.png I'm facing an issue with my code that allows me to select and deselect multiple rows in a table. Specifically, I'm struggling with implementing a SELECTALL/DESELECTALL feature using a master checkbox. You can vie ...

What is the best way to access and utilize variables passed in an app.post request within another app.post request using Node.js

I have encountered an issue with using const variables in my app.post method. I defined these variables to store user input when submitting a form, but when attempting to send the variables back to the user for verification in my app.post method, it throws ...

What is the best way to mock a Typescript interface or type definition?

In my current project, I am working with Typescript on an AngularJS 1.X application. I make use of various Javascript libraries for different functionalities. While unit testing my code, I am interested in stubbing some dependencies using the Typings (inte ...

Error: React is throwing a SyntaxError because a ")" is missing in the argument list

While working on a React-typescript project using Vite, I encountered an issue where my page was displaying blank and showing the error : Uncaught SyntaxError: missing ) after argument list (at main.tsx:6:51) This error was found in the main.tsx file : im ...

Tips for creating a jscrollpane that smoothly scrolls from the beginning to the end

I am attempting to create an automatic scroll feature for a jscrollpane that scrolls smoothly from the beginning to the end. I have tried using the set value method for the vertical bar, but it does not seem to be working as expected. How can I make the ...

How to send emails in the background using a React Native app

I'm looking to incorporate email functionality into a React Native app so that it can send messages automatically when certain actions occur in the background. ...

Using InnerHTML in Javascript within the Quasar/VueJS framework is unsupported

I am looking to dynamically create tables based on the items inside the 'counts' array below. The number of tables and their contents can change. Here is my divContainer, where the innerHTML will be appended: <div id="divContainer" style="pa ...

Easily iterate through the <li> elements using jQuery and append them to the <datalist> dynamically

My jQuery loop seems to be malfunctioning as it's not showing the values of my li elements. Instead, I'm seeing [object HTMLElement] in my input search bar. <div id="sidebar-wrapper"> <input type="text" list="searchList" class="searc ...

Repairing the orientation in unique threejs capsule geometric shape

Exploring the realm of custom geometry in three.js, I decided to experiment with modifying Paul Bourke's capsule geometry example. However, as I delve into creating my own custom capsule geometry, I have encountered two main challenges: The orienta ...

Is there a way to enhance the visibility of numbers in this HTML/JavaScript list to show more than just two digits

This piece of code is embedded in an HTML file and functions correctly, however, when applied to a numbered list, it displays numbers from "00" to "99" repeatedly instead of continuing indefinitely until the end of the list: function search_animal() { ...

Unveiling the mystery of extracting information from a string post serialization

When working with a form, I am using this jQuery code to fetch all the field values: var adtitletoshow = $("#form_data").serialize(); After alerting adtitletoshow, it displays something like this - &fomdata1=textone&fomdata2=texttwo&fomdat ...

Hibernate update statements allow for changes to be made to records in

In my Hibernate query, I am attempting to update a column in the BudgetAllocatedToFormations table. Here is the query I am using: this.session.createQuery("UPDATE BudgetAllocatedToFormations batf,BudgetAssignedSubHeadOfAccounts bashoa,BudgetSubHeadOfAccou ...

Do overlay elements have to be positioned at the bottom of the HTML body every time?

As I delve into the world of JavaScript frameworks, one common trend I've noticed is that elements like dialogs, tooltips, and alerts usually appear at the end of the body tag. With my own implementation of these UI elements, I am determined to make ...

What is the best way to perform multiple operations on a Java 8 stream?

Imagine you have a list of POJOs that you want to convert into a JSONObject. Each POJO represents a person. To accomplish this conversion, you must utilize the put method provided by the JSONObject class. JSONObject personJson = new JSONObject(); for(Pers ...

Creating Multiple Choice Forms in React: A Guide to Implementing Conversational Form

I've been exploring React (Next.js) and I came across an interesting example of how to use multiple choice in simple HTML on Codepen ([https://codepen.io/space10/pen/JMXzGX][1]). Now I'm curious about how to implement a similar functionality in R ...

What is the process for customizing the default animation in the Dialog component?

Currently I am utilizing the Material UI framework and looking into modifying the default animation for a Dialog opening. Specifically, I would like the Dialog to appear from bottom to top when it opens up. Any suggestions on how this can be achieved? Ap ...

Click event to reset the variable

The code snippet in Javascript below is designed to execute the function doSomethingWithSelectedText, which verifies if any text is currently selected by utilizing the function getSelectedObj. The getSelectedObj function returns an object that contains in ...

Oops, it seems like there is a TypeError with the function window.initMap in Google Maps

For the past week, I have been struggling to update my marks on Google Maps while using AJAX in an HTML page. My controller fetches data from the database and sends it back, but now I am encountering the following error: TypeError: window.initMap is not a ...