logo
JBStrap(current)
  • Overview
  • Features
  • Docs (current)
  • Demo
  • Showcase
  • Pricing
  • Log in
JBStrap icon
JBStrap
Learn JBStrap
  • Framework Overview
  • How To Use Jbstrap
    • Setting Up The Environment
    • Maven Archetypes
    • How to deploy a JBStrap application on Wildfly
    • Create Your First App
      • Step 1 Creating Your Project With A Maven Archetype
      • Step 2 Eclipse Project Setup
      • Step 3 Create A New Page
      • Step 4 Create A New Menu Item
      • Step 5 Compile The Application
      • Step 6 Install Your Application
      • Step 7 Run Your Application
    • Step By Step Guide
      • Step 1 Requirements
      • Step 2 Create A Project
      • Step 3 Database Setup
      • Step 4 Domain Classes
      • Step 5 Datadescriptors
      • Step 6 Constants
      • Step 7 The User Interface
      • Step 8 Parameters
      • Step 9 Testing
  • User Interface Structure
    • Client
    • Ui
    • Pages
    • Client Events
    • Executing Javascript
    • Cookie Handling
  • Application Startup
  • Navigation
    • How To Use Jbstrap Pages
    • Navigation Between Pages
    • Pagecache
    • Softlink Url Rewrite
    • Hardlink
  • Building A Page
  • Components
    • General Component Utilities
    • Custom fetch event
    • Layout Components
      • Card
      • Column
      • Container
      • Div
      • Horizontalsplitter
      • Ibox
      • Row
      • Tab
      • Tabpage
      • Verticalsplitter
    • Navigation Components
      • Breadcrumb
      • Navbar
      • Menubar
    • Simple Components
      • Alerts And Notifications
      • Badge
      • Blockquote
      • Button
      • Codeviewer
      • Contextmenu
      • Dropdownbutton
      • Header
      • Htmlflow
      • Image
      • Link
      • Listbox
      • Loadbutton
      • Paragraph
      • Progressbar
      • Small
      • Span
      • Statictext
      • Toolbar
      • Videobox
    • Complex Components
      • Activitystream
      • Calendar
      • Fileminiature
      • Modalwindow
      • Sparkline
      • Table
      • Timeline
      • Treeview
      • Wizard
    • Listgrid Component
      • Filtering In The Listgrid
      • Listgrid Data Management
    • Form Component
      • Creating A Form
      • Calculating Form Fields
      • Form Change Handler
      • Form Rendering
      • Sending A Form To A Servlet
    • Formitem Components
      • Checkboxitem
      • Colorpicker
      • Comboboxitem
      • Datepicker
      • Daterangepicker
      • Duallistbox
      • Fileitem
      • Hiddenitem
      • Integeritem
      • Numberitem
      • Passworditem
      • Radiobutton
      • Selectoritem
      • Statictextitem
      • Switchitem
      • Textitem
    • Filter Components
      • Advanced Filter
      • Simple Filter
      • Text Filter
    • Charts
      • Area Chart
      • Bar Chart
      • Bubble Chart
      • Bullet Chart
      • Donut Chart
      • Dot Chart
      • Funnel Chart
      • Gauge Chart
      • Horizontal Bar Chart
      • Horizontal Stacked Bar Chart
      • Line Chart
      • Pie Chart
      • Population Pyramid Chart
      • Stacked Area Chart
      • Stacked Bar Chart
  • Event Management
    • Component Event Matrix
    • Creating Custom Events
  • Data Management
    • Data Management Entities
    • Jpa
      • Jpa Dao
      • Jpa Entity Class
      • Native Sql
      • Transaction Handling
    • Jpa Additional Annotations
      • Audit
      • Foreign Key
      • History
      • Scd
      • View Mapping
    • Elasticsearch
      • Elasticsearch Dao
      • Elasticsearch Entity Class
      • Elasticsearch Annotations
      • Elasticsearch Transaction Handling
      • Searching In Multiple Indexes
    • Ldap
      • Ldap Connection
      • Ldap Dao
    • Rest
      • Rest DAO
  • Datadescriptor Solution
    • How To Use A Jbstrap Datadescriptor
    • Datadescriptor Metadata Structure
      • Editor Types
    • How To Create A Datadescriptor Programmatically
    • Jpa Datadescriptor
    • Sql Datadescriptor
    • Elasticsearch Datadescriptor
    • Ldap Datadescriptor
    • Inmemory Datadescriptor
    • Rest DataDescriptor
      • Rest handlers example
      • Rest utils
  • Access Control And Security
    • User Handling
    • User Roles
    • User Login And Logout
    • Component Level Permissions
  • File Handling
    • Filestoreapi
    • File Storage
    • Uploading A File Programmatically
    • Form File Handling
  • Message Bus
    • Using the Message Bus
    • Message based development
  • Geographical Map
    • Adding A Different Base Map Layer
    • Add Shapes To The Map
    • Geocoding
    • Geolocation
    • Map Settings
    • Using The Map With A Datadescriptor
  • Utilities
    • Booleanconverter
    • Utils
    • Validators
    • Multi Language Support
    • Mailapi
    • Parameters
    • Icons
    • Using Custom Javascript
  • Custom web components
    • Component extensibility
    • Component interfaces
    • Reusing components
    • Create a new component
    • Javascrip based components
    • Custom filter components
    • Creating a custom FormItem
  • Working With Jbstrap Plugins
    • Creating Your Own Plugin
    • Elasticsearch Plugin
    • Geographical Map Plugin
    • Ldap Plugin
    • Rest Plugin
  • Testing Debug Support
  • Themes And Styles
    • Style Customization
    • Themes
    • Sass Variables
      • Bootstrap Variables
      • General Variables
      • Component Specific Variables
  1. Learn JBStrap
  2. User Interface Structure
  3. JBStrap cookie handling

JBStrap cookie handling

A Client object is the representation of a client and it handles cookies. Cookies are stored in the client browser. Cookies may contain user preferences and we can use them to detect recurrent user activity.

By default, the cookie service is enabled in JBStrap, with cookies having 30 minutes of timeout interval. Within 30 minutes a user may freely close the current page and open it elsewhere, without having to log in.

When dealing with user cookies, the following two parameters are very important to keep in mind:

  • USER_COOKIE_TIMEOUT : the timeout interval of a user cookie,
  • USE_USER_COOKIE : sets whether the entire cookie service is active.

Also note that the parameter value must be an integer that specifies the duration in minutes. Modify cookie expiration interval to 1 month:

Disable user cookies:

Additionally, you can create your own cookies through the client object. These cookies can have any content, and they can be read or deleted. The duration of the custom cookies must be specified in seconds. Creating a cookie in the client:

Querying the cookie value:

Deleting a cookie from the client:

Previous page Next page