I’ve tried to deploy my application as an uberJar. It works fine locally when run via Intellij and the internal Tomcat server. I have the following in my .env.production.local file:
PUBLIC_URL=/pasweb/front/
REACT_APP_CUBA_URL=/pasweb/rest/
REACT_APP_REST_CLIENT_ID=[...]
REACT_APP_REST_CLIENT_SECRET=[...]
However, I can not reach my application via …/pasweb/front or …/pasweb-front. I see this in the app.log file when I try to access it:
2021-02-09 15:03:35.033 INFO [main] org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@30130a31{/pasweb,jar:file:/opt/app_home/pasweb/pasweb.jar!/LIB-INF/app,AVAILABLE}
2021-02-09 15:03:35.040 INFO [main] org.eclipse.jetty.webapp.StandardDescriptorProcessor - NO JSP Support for /pasweb-front, did not find org.eclipse.jetty.jsp.JettyJspServlet
2021-02-09 15:03:35.048 INFO [main] org.eclipse.jetty.server.handler.ContextHandler.pasweb_front - Initializing Spring AppFrontServlet 'app_front_servlet'
2021-02-09 15:03:35.048 INFO [main] com.haulmont.frontservlet.AppFrontServlet - Initializing Servlet 'app_front_servlet'
2021-02-09 15:03:35.432 DEBUG [main] com.haulmont.frontservlet.AppFrontServlet - Published WebApplicationContext of servlet 'app_front_servlet' as ServletContext attribute with name [org.springframework.web.servlet.FrameworkServlet.CONTEXT.app_front_servlet]
2021-02-09 15:03:35.432 DEBUG [main] com.haulmont.frontservlet.AppFrontServlet - enableLoggingRequestDetails='false': request parameters and headers will be masked to prevent unsafe logging of potentially sensitive data
2021-02-09 15:03:35.432 INFO [main] com.haulmont.frontservlet.AppFrontServlet - Completed initialization in 384 ms
2021-02-09 15:03:35.433 INFO [main] org.eclipse.jetty.server.handler.ContextHandler - Started o.e.j.w.WebAppContext@6c4c4df8{/pasweb-front,jar:file:/opt/app_home/pasweb/pasweb.jar!/LIB-INF/app-front,AVAILABLE}
2021-02-09 15:03:35.463 INFO [main] org.eclipse.jetty.server.AbstractConnector - Started ServerConnector@490ab905{HTTP/1.1, (http/1.1)}{0.0.0.0:8300}
2021-02-09 15:03:35.464 INFO [main] org.eclipse.jetty.server.Server - Started @19074ms
2021-02-09 15:03:36.919 WARN [qtp95395916-22] com.vaadin.server.DefaultDeploymentConfiguration -
=================================================================
Vaadin is running in DEBUG MODE.
Add productionMode=true to web.xml to disable debug features.
To show debug window, add ?debug to your application URL.
=================================================================
2021-02-09 15:05:27.741 DEBUG [qtp95395916-20] com.haulmont.frontservlet.AppFrontServlet - Completed 302 FOUND
2021-02-09 15:05:27.782 DEBUG [qtp95395916-21] com.haulmont.frontservlet.AppFrontServlet - GET "/pasweb-front/index.html", parameters={}
2021-02-09 15:05:27.936 DEBUG [qtp95395916-21] com.haulmont.frontservlet.AppFrontServlet - Completed 200 OK
If I try to access “/pasweb/front/”, which is what I expected, I get my backend GUI and not the React front end. If I try “/pasweb-front”, as you can see, it served a file called “/pasweb-front/index.html”, but I got back an empty screen.
How do I set the deployment URL properly in an uberJar or, alternatively, what URL do I need to use to access my application as it is current configured?