Publishing a site with Tomcat - java

I am working on an open source project that written in Java.
I am using Tomcat server,Mysql and Java,
with writing
http://localhost:8080/Projectname,
I can run this project
But I must open this project to other users,
I have a constatnt Id, I have done it with using IIS before many times.
How can I do it with Tomcat server,
Is there anyone who has experince on this matter
Thanks for your helping

You Should replace localhost with your IP and check firewall exception for this 8080 port.

Related

database postgresql on apache tomcat server

I don't find the solution for my specific problem, therefore, I ask for you help.
I developed a java application using Spring, JPA/Hibernate and Vaadin. The database is on PostgreSQL.
The application on my computer run on localhost:8080 and bind the database on localhost:5432;
In order for my colleagues to use it, I need now to deploy my application on a virtal server Tomcat. The address of this Tomcat is like 10.152.487.12:8080...
I want to create a war of my application in java and deploy it on Tomcat. But, where I can put the database and how ?
Apache Tomcat allow the creation of a Postgresql server on 8080 port ?
Apache Tomcat allow the installation of a Postgresql server on 5432 like 10.152.487.12:5432 ?
Please, I need help, thank you in advance !
I found the solution !
Yes, I am a newbie, but I think another peoples can be in the same situation, therefore...
You open the "Remote Desktop" on windows if the server where Tomcat turn on is Windows Server. Then, you enter the IP address of the server (without the port 8080 of course). Then, you arrive on the server, you can go on Internet for download PostgreSQL (warning, desactivate the security of the browser, it not allow you to surf !).
Finally, install, enjoy !

WebSockets not working on OpenShift Tomcat 7.0 and WildFly Application Server 8.1.0.CR1

I 've spent the whole night trying to run a simple echo test on Tomcat 7.
The test I try to run runs locally as expected. But when deployed to the openshift the connection opens and then immediately closed. I've been looking for the right setup on the internet and found questions and answers for them for exactly the same problem but the solutions don't work for me.
The example of what I have as a test can be checked at http://pureikka-belgampaul.rhcloud.com/pi-8/index.html
At the bottom of the viewarea there's a debug console reporting the statsus of the websocket.
So I feel like I have not made a simple mistake in the setup and it runs locally with only the change of the host name and the port number for the websocket.
Could it be a routing trouble after the upgrade of the connection?
I deploy my war file directly to the webapps directory.
I also think I got websockets working at one moment but i'm not so sure anymore. I could be looking at the localhost after all.
Eventually I decided to try wildfly8 gear because it ships with support for websockets. I checked out the https://github.com/javaee-samples/javaee7-samples repo and deployed the chat demo to the local wildfly8 and the example worked from the first run as it is supposed. Great. But the same war file fails to work correctly on the openshift (http://wildfly8-belgampaul.rhcloud.com/chat3/)
I tried to use ports 80 or 8000 in both setups.
Need someone's help? advice or question to send me back to the right direction
Maybe someone has solved a similar issue?
Web Sockets on OpenShift work over ports 8000 for ws and 8443 for wss, it is not a "work around" it's the way websockets work on this system.
Here are the most useful links providing just enough light about the problem
https://www.openshift.com/blogs/paas-websockets (general info about websockets on openshift)
https://www.openshift.com/blogs/deploy-websocket-web-applications-with-jboss-wildfly (diy example)
to summarize:
websocket support out-of-the-box is the most reliable with node.js.

Can't connect to tomcat webservice

So I've been doing a java webservice in Eclipse in which I have launched on a localhost tomcat from Eclipse. This has worked very good as long as I've been connecting to the tomcat started from Eclipse.
However now I want to try deploy it on my tomcat separated from Eclipse but still on localhost. So I exported my web project to a .war file and deployed it with the tomcat manager app. However now I cant reach it from my client any longer. I'm running the tomcat on port 8080, just as my Eclipse tomcat did. BUT I can go to a reasource URL from my web browser and receive proper information, so the service is running(which the manager app is saying as well).
The client is a android device connected to the same network. The service fetches information from a MySQL database on the same machine. This connection worked fine before exporting it to war on my other tomcat
What am I doing wrong here? Just ask if you need any further information!
Ok so after testing I found it strange that I got connection time-outs and not something else. It also took at least 10 seconds before any feedback occurred. Sooo it felt like a firewall problem which indeed it was.
First I needed to portforward the tomcat port in my router to the machine ip that was hosting it. Then I remembered I had Windows firewall on that very machine which was also blocking conenctions on that port. So I allowed connections on tomcat port and BAM! It worked.
Thanks for all your comments, of course I should have thought about opening my ports before coming here.

GWT run on External Server

I need to test my client application on an external server, with the development mode to a better debug.
i try to run in eclipse the application on the external server, but it doesn't run.
i realy need a step-by-step example
thanks for the help
Check out THIS page. There they have a command how to start your server with GWT debug mode on.
Than make sure your URL is pointed to the right server.
This is how it should look on your machine:
http://{local ip or host name}:8080/AppName/?gwt.codesvr=127.0.0.1:9997
This is what should be entered on the external clint on the same network:
http://[YOUR-IP]:8080/AppName/?gwt.codesvr=[YOUR-IP]:9997
Make sure both ports are matching. Mine is running 8080 because I'm running Java server, you might have different port.

how to setup tomcat and eclipse for centralized evironment

I have a linux server where tomcat server is installed I can access it by http://omx.td.com:8080 from my LAN. I have 20 computers in LAN and 16 developer for a enterprise project which is deployed on that tomcat server. In each machine eclipse is installed.
I want my developers will work on that project not creating any local instance of tomcat or I dont want local project like every machine should be installed with tomcat.
Can anyone please help me how to setup this centralized environment ?
I have tried with eclipse remote debug on tomcat but no luck.
I want my developers should update on the same single server.
Please help !!!
Thanks
While I concur with user1291492 about source control, you had specific requirements. In each developer's eclipse machine,
Click Window/Show View/Servers
Right-click in the servers pane (window):
New/Server
From the List, click on Apache, then click on the tomcat that's on the server.
For server's host name, type the ip address of the server.

Categories