Deploying the frontend(ReactJS) and backend(SpringBoot) build on the Tomcat server - java

I have deployed the frontend (ReactJS) and backend build(war) on the Tomcat server in the ubuntu machine.
I copied both build in /var/lib/tomcat/webapps folder.
In ReactJS source code I have added
Pckage.json: "homepage": "http://localhost:8080/buildFolderName"
Index.js: axios.defaults.baseURL = 'https://serverUrl/warfilename/api/'
For this configuration, my application is working fine.
But when we are replacing the serverUrl to localhost:8080 the frontend application is not communicating with the backend APIs.
Showing the error on the browser console: net::ERR_CONNECTION_REFUSED
We want to deploy the same build on a deferent tomcat server rather than creating a build for each server

Related

Heroku + java 17 - Server startup but I canĀ“t find URLs

I deployed an application server on heroku, but I cannot find URLs of my application. On my desktop it's working
localhost:8080/cep/teste/ https://holidayws.herokuapp.com/cep/teste/

Running multiple Spring boot executable jars on self contained server as Linux services

I have deployed my first spring boot web application executable jar in self contained tomcat server successfully and accessing it on port 8080 but when I deployed my second app on different port using init.d on port 42000 I am unable to access it. I have looked the log in /var/log the application starts successfully without any errors. What would be the causes for my problem?

spring boot fat jar register to eureka with a weird port

I encountered a weird problem with spring cloud. I run a spring cloud project defined server port as 8888 in eclipse as run as java application, and register this project to the remote eureka server, it's working fine. but when I package the project and run as java -jar, will register to eureka server with 8080 port, so other service access this service will get a connection refused error.

Deploy webapp project on tomcat instead of glassfish in Netbeans

I have been trying to deploy my project on a Tomcat server but I keep getting this message on Netbeans
Could not start GlassFish Server: HTTP or HTTPS listener port is
occupied while server is not running
I have already tried to shutdown and remove Glassfish but it keeps printing the same message.
Just ran into the answer
Choose your NetBeans project > properties > run > server > (select) Apache Tomcat or TomEE

How I can seen my created page of site on my OpenShift?

I try create site on Java with Spring help on OpenShift.
I did some actions:
-Registered an account at OpenShift
-Set it
-Created application 'myapp' with 'Tomcat 7 (JBoss EWS 2.0)' Cartridge
-Cloned it by git
-Edited myapp by NetBeans(made simple index.jsp page which can saw by NetBeans Tomcat Local Server 8.0).
-Pushed this project to OpenShift server by 'git push'(there's this data with changes on the server at this moment)
-Deployed on the server(used 'gear deploy' command)
And now I want seen my page on server but can seen only it:
myapp-masakra.rhccloud.com
what I have to do or change?

Categories