-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
blank login page for non-empty context root / url mapping #6
Comments
The response to Looks like according to this guide, certain requests will always be made from the root context root, regardless of the mapping? vaadin/flow-and-components-documentation#1273 |
A workaround would be to set |
I've checked out https://vaadin.com/docs/v14/flow/spring/tutorial-spring-configuration.html#using-spring-boot-properties and added the following to @Bean
public ServletRegistrationBean frontendServletBean() {
ServletRegistrationBean bean = new ServletRegistrationBean<>(new VaadinServlet() {
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
if (!serveStaticOrWebJarRequest(req, resp)) {
resp.sendError(404);
}
}
}, "/frontend/*");
bean.setLoadOnStartup(1);
return bean;
} |
I asked @paulroemer about this, and he thinks that getting this setting to work is indeed tricky. He thus suggests using a different SpringBoot app instead of having different servlets in one app. |
@tarekoraby could you please post Paul's answer on why exactly is this tricky? Perhaps that could provide some info for some Spring user which might be able to dwell deeper... |
I don't have the reasoning behind Paul's suggestion I'm afraid. |
@tarekoraby @mvysny I can't create two applications because we are using Camnuda Java API from Vaadin. So this is not a valid solution. |
You need to use |
I use |
I can just say, that |
I'm the originator of this issue and discussed this with @mvysny in the expert chat. We use |
Add the following line to |
@Frettman That helped! Thank you very much. |
I'm trying to run this example Vaadin app in the
/app
context root. Steps I've taken:login-overlay-form
branchvaadin.url-mapping=/app/*
inapplication.properties
.SecurityConfiguration.java
and set the login URLs as follows:However, the login page comes in blank. There are the following errors in the JS console:
The text was updated successfully, but these errors were encountered: