Window / Components not visible

Hi!

I made a servler forward from my application to a HttpServlet. Unfortunately when I start the application no components are visible in the browser.
If I take away the servlet forward all components are visible. There is no problem with
the forwarded servlet everything works fine (I debugged this part).

If I refresh the browser all components appear. Is that a bug or did I make something wrong?

Here is the init method of the application:

public void init()
{
setTheme(“websale”);

	mainWindow = new Window("Paxwebsale");
	Label label = new Label("Hello Vaadin user");
	Button button = new Button("Ok");
	
	mainWindow.addComponent(label);
	mainWindow.addComponent(button);
	
	
	ApplicationContext ctx = getContext();
	WebApplicationContext webCtx = (WebApplicationContext) ctx;
	servletContext = webCtx.getHttpSession().getServletContext();
	
	RequestDispatcher dispatcher = servletContext.getRequestDispatcher("/servlet/ch.pax.websale.server.ServletConnect");
	try { dispatcher.forward(request, response); } 
	catch (ServletException e) { e.printStackTrace(); } 
	catch (IOException e) { e.printStackTrace(); }
	setMainWindow(mainWindow);
}

Greetings
B. Call

Here are additional informations:

if I make a forward call in the init() method
directly
to a servlet of another project (older programm) → it works

if I make a forward call in the init() method
first
to a http servlet of my vadin project and
then
from this vadin project a forward to a servlet of another project (older programm)-> it doesn’t work

:frowning: