HEARTBEAT not found

Hi,

I am getting the following error: VAADIN/HEARTBEAT not found

I mapped vaadin servlet to /VAADIN/* because I want to use static files too.

my web.xml:
[i]

VaadinServlet
com.vaadin.server.VaadinServlet

Vaadin UI class
UI
com.coupoholics.ui.admin.AdminUi



VaadinServlet
/VAADIN/*

[/i]

How can i fix it up?

Regards,
Arnold

Is this your whole mapping?
You need to Map the /VAADIN/* AND your normal Servlet where you request the UI


<servlet-mapping>
    <servlet-name>VaadinServlet</servlet-name>
    <url-pattern>/app/*</url-pattern>
  </servlet-mapping>

  <servlet-mapping>
    <servlet-name>VaadinServlet</servlet-name>
    <url-pattern>/VAADIN/*</url-pattern>
  </servlet-mapping>

and now your UI is under /app server static files and Heartbead under /VAADIN

I am a little bit confused. Could you tell me why I need to map twice the VaadinServlet?
I mapped it once and everything is working very well except the HEARTBEAT.

And if the HEARTBEAT uses /VAADIN and I mapped the vaadinServlet to /VAADIN why HEARTBEAT is not working?

Apparently, I had the same problem, I repeated that twice and it worked:


	<servlet-mapping>
		<servlet-name>Vaadin Application Servlet</servlet-name>
		<url-pattern>/check/*</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>Vaadin Application Servlet</servlet-name>
		<url-pattern>/VAADIN/*</url-pattern>
	</servlet-mapping>

/VAADIN/* is
only
for static files. It needs to be available in addition to wherever your application is mapped.

HEARTBEAT should not be accessed from /VAADIN/ but from where you are running the application. However, you tried to access the application from the same location as the static resources. The Vaadin servlet uses special handling of resources in /VAADIN, serving static files faster and bypassing much of the other processing for it intentionally, which is why requests for HEARTBEAT (and many other things) at that path do not work. The application is not designed to run there.

The normal setup is mapping /* to a Vaadin servlet, in which case both the application (at the context root) and static resources (in VAADIN) get served by it. If for some reason you don’t map /* (and aren’t serving static resources in some other way bypassing the servlet), you should provide two separate mappings to the servlet: one for the application path and one for /VAADIN/* as noted in a previous post.

The most common reason for wanting to map the servlet somewhere else than the root would be having also other servlets in the same WAR, in which case providing the additional /VAADIN mapping should not be a problem. Is that the case for you or do you map it elsewhere for some other reason? I don’t really see any reason why the users would want to see /VAADIN/ in the servlet URL, at least.