Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to install a rest webservice on a server  RSS feed

 
Sven Kastens
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
i have been able to write a simple rest webservice on eclipse and deploy it on my localserver via tomcat. now i would like to have that webservice running on a server in the web. i have the right to access the server that i want it to run on. means i can upload data via for example winscp(sftp) to it. i have no idea though how to start though. any help or a link to a tutorial would be so great, because i can't find anything
 
Joe Harry
Ranch Hand
Posts: 10128
3
Eclipse IDE Mac PPC Ubuntu
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is the same way like you did locally. You need to have Tomcat installed on your server and deploy your Rest WebApp to the Tomcat running on the server.
 
Niiraj Patel
Ranch Hand
Posts: 47
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sven, There is no extra things you have to do. just export your application in eclipse as WAR and put it in webapps in tomcat's home directory and restart the server. (1.Select your project 2.Right Clickt 3.Select Export >> WAR File)
 
Sven Kastens
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your answers,

Tomcat ist now installed on the server(the Admin of the server did that). So now i copied the .war file in the Webapps folder on the Server. On the server in the home directory there is just the Webapps directory. Nothing else. Locally i restart my tomcat server with startup in the bin directory, but that one doesn't exist in the installation on the server. So now i don't know how to restart the server or access the application manager of the tomcat running on the server. I have the ip and the Url of the server but i don't know how to adress my project or the interface of the tomcat of the server.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the manager web app installed? It would generally be at "/manager", and if it's there it's hopefully protected by a good password. If that's not available, and you don't have shell access to run the Tomcat scripts either, ask the sys admin how that works. He's sure to have set up a way how to (re)deploy web apps so that his involvement is not required :-)

It might also be set up so that deleting the war file undeploys the web app, and uploading a new one automatically deploys it.
 
Sven Kastens
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The manager app is installed but how do i start it ?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If it's installed it should be running. What happens if you go to /manager ?
 
Sven Kastens
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well i have tried (given ip):8080/manager but i get a error message that the network doesn't answer or doesn't answer fast enough. Same with (url):8080/manager.
If i try the same without the port (:8080) i just get object not found response.
 
Sven Kastens
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any thoughts on this? I'm quite desperate ...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!