I am using Cuba framework to develop application: My application contains core,global,web and front module using react. I have a problem when I deploy war file to tomcat server. If I build uberjar, I can access both web module and front module. But I can not access front module if I build war file and deploy to tomcat server.
Do you know what I need to do or notice when I deploy whole applicaiton contains front module to tomcat server?
For example: If I run local, I can access localhost:8080/myApp and localhost:8080/myApp-front. When I deploy war file to tomcat server, I only can access host/myApp and not possible for host/myApp-front. I saw in tomcat servermanager, it contains only application myApp in the list of application, I guess it could be a reason.
Many thanks in advance
Creating a single WAR file
If the application project contains the front module, it becomes accessible at
/<appName>/frontpath. In order for the frontend interface to work correctly in the single WAR, you should change the environment variable
PUBLIC_URL= /app/front/during build (for example, in the
It works so because when you are deploying one WAR file (“app.war”) then context path of any content inside of this WAR becomes starting with “/app/”.