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 8458301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:02:20+00:00 2026-06-10T13:02:20+00:00

I’ve some problems with my English, so I apologize for mistakes. I’m a beginner

  • 0

I’ve some problems with my English, so I apologize for mistakes.

I’m a beginner in Java programming. I use IntelliJIdea as IDE, Vaadin framework to create GUI and tomcat as a web server. Project was generated with maven.
To create an application I use the following sources as example:

From stack overflow

Video tutorial

There is Application class, (it’s not com.vaadin.Application inheritor), but singleton.

package com.exadel.dinnerorders.vaadinwindow.application;
import com.exadel.dinnerorders.entity.Order;
import com.exadel.dinnerorders.entity.User;
import com.exadel.dinnerorders.service.TasksManagerService;
import com.google.common.eventbus.EventBus;

public class Application {
    private EventBus eventBus = new EventBus();
    private static Application INSTANCE = new Application();
    private User user;
    private Order order;
    private TasksManagerService tasksManagerService = new TasksManagerService();

    private Application() {
        tasksManagerService.start();
    }

    public synchronized static Application getInstance(){
        return INSTANCE;
    }

    public EventBus getEventBus() {
        return eventBus;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public User getUser() {
        return user;
    }

    public Order getOrder() {
        return order;
    }

    public void setOrder(Order order) {
        this.order = order;
    }

    public TasksManagerService getTasksManagerService() {
        return tasksManagerService;
    }
}

And there is WebApplicationController class, which extends com.vaadin.Application.

package com.exadel.dinnerorders.vaadinwindow.application;

import com.google.common.eventbus.EventBus;
import com.google.common.eventbus.Subscribe;
import com.vaadin.terminal.Sizeable;
import com.vaadin.ui.*;

import java.util.Collection;

public class WebApplicationController extends com.vaadin.Application {
    private EventBus eventBus = Application.getInstance().getEventBus();
    private Layout loginLayout;
    private String datePattern = "YYYY-MM-DD";

    @Override
    public void init() {
        createLayouts();
        createMainWindow();
        eventBus.register(this);
        setTheme("apptheme");
    }
    //some another methods for initialization main window and layouts
}

So, it seems my application works fine. But I faced the next problem:
I run application in idea on Tomcat 7 configuration. It launches without any problems. I open Opera as browser and log in as, for example, user1. Everything seems to work correct. Then I open Google Chrome or another browser and log in as user2. And if refresh window in Opera, it will show that know user2 logged in, but not user1. I had tried to do the same in different computers, and I got the same result. (on one machine log as user1, on another as user2).
Firebug shows that sessionsID are different in different browsers.

It seems that the problem are in web.xml file, where I configure servlets. But I had tried different configuration examples, and always got the same result.

Unfortunately, I didn’t manage to find answer in google or another forums.

  • 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-06-10T13:02:21+00:00Added an answer on June 10, 2026 at 1:02 pm

    I would say that your problem is related to the static Application singleton. Statics are shared among all the users inside a JVM.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have thousands of HTML files to process using Groovy/Java and I need to
I am writing an app with both english and french support. The app requests
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka

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.