Hello, I have a vaadin application thar runs embeded inside many different pages . The vaadin application needs to know the URL from the page that it is inside.
When I try Application.getURL(); I get the applications URL, not the hosing pages URL.
How could I get the host URL ?
Thank you
Yorgos
Aha! OK this is a possible solusion… (I repply to myself)
Overwrite ApplicationServlet (and declare it in web.xml)
public class MyAppSerlet extends ApplicationServlet { static public String m_path; protected Application getNewApplication(HttpServletRequest request) throws ServletException { m_path = request.getHeader("Referer"); return super.getNewApplication(request); } }
and now m_path contains the url of the content page!