I am trying to use Jwebsockets with my existing project. I have done the configuration with my Tomcat Apache server and able to run all the demo application using
http://localhost:8080/jWebSocketAppSrvDemo-1.0/
Its working fine Jwebsocket server is running fine on my machine.
Now I don't know what to do to integrate it with my exiting application how I can send the messages to jwebsockets server and receive messages from server. I am new to this kind of technology. I tried the tutorial mentioned on website but I am not able do that like in first jWebSocket "Hello World" tutorial I don't know where I set the IURL,gUsername,IPassword. Same with the next tutorial I don't know where I can get WebSocketTokenListener interface. I have added jWebSocketServer-Bundle-1.0.jar file to my lib folder. I feel that tutorial is not step by step tutorial.
Can anyone suggest how I can integrate it with my application if I want to post and reply some message on my website.
Is this right to use jWebsockets with the java application? I am using spring and springMVC framework with Apache Tomcate on Ubuntu
Related
I am trying to configure a JAVA client for Hazelcast. I have a web application deployed on tomcat servers. The example that I am following is this
Basic Clients Hazelcast. I have copied the code into my local machine and when I simply run it without running anything else and without the addAddress() step I get a java.net.ConnectionException. My doubts are:
1) What is the client in this case (I am assuming it is the web application that probably means I have to get the Hazelcast server up and running then what is to be done)?
2) How do I establish a link between the web app, the tomcat server and hazelcast cluster? The web app uses MongoDB as the backend. I was able to do a only MongoDB with Hazelcast integration but not the web app on tomcat server integration. What role does tomcat play here in this setup?
3) In the example what are the start.sh and stop.sh supposed to do? Where should I run them? If I simply open the git bash and run it. It doesn't seem to work.
I have looked at the documentation provided in the Hazelcast manual but I wasn't able to understand it as my current level of knowledge is woefully inadequate. If somebody could explain it to me or paste the links to some of the obvious stuff that I should know it would be great.
The answers are inline:
What is the client in this case(I am assuming it is the web
application that probably means I have to get the Hazelcast server up
and running then what is to be done)
The web application can be a Hazelcast client if you would like to use Hazelcast in client-server topology.
How do I establish a link between the web app, the tomcat server and
hazelcast cluster. The web app uses MongoDB as the backend. I was able
to do a only MongoDB with Hazelcast integration but not the web app on
tomcat server integration. What role does tomcat play here in this
setup.
Your web app runs in Tomcat server (web container) and the Hazelcast client you use in your web app can directly connect to the Hazelcast cluster members (server). You will just need to configure your client properly such as adding cluster member address by using clientConfig.getNetworkConfig().addAddress() API. Please see for more details about configuring client in this link: http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#configuring-java-client
In the example what are the start.sh and stop.sh supposed to do.
Where should I run them. If I simply open the git bash and run it. It
doesnt seem to work.
Those are sample start scripts for the sample client and member application. You don't need to use them in your application.
Please see the following guides for using Hazelcast in client-server topology:
https://hazelcast.org/getting-started-with-hazelcast/
http://docs.hazelcast.org/docs/latest/manual/html-single/index.html#getting-started-with-java-client
I need to state up front that I am not a Java developer. So it is fair to assume that I know very little about the tooling etc. that Java dev's will be naturally familiar with.
So, I have created a Jersey web api (2.25.1) on my home server running Windows 2012. It serves data to a Xamarin application. I need to deploy this to a Linux server (Ubuntu) on AWS which my friend spun up.
At the moment, the only access I have is via SSH (Putty).
Tomcat (and Glassfish) have been installed on the Linux machine.
How do I go about deploying that application to that AWS server?
The official Jersey documentation seems to be MIA, and my Googling efforts don't yield much. There's a lot of SO questions with a similar title to this one. But I have not found any of the answers (and in many cases, questions) helpful to my cause.
Cheers
I assume that you are using maven to create your jersey web app .
Upon build you will get a *.war file .Copy the same to tomcat/webapps folder .
Start your tomcat then.
To take your file there on remote use winscp tool with your ssh credentials.
I'm not sure how one goes about using EasyPHP Webserver. Looking around the internet there doesn't seem to be a lot of materials on the matter. Whenever I try to run a php file from the www folder, a new blank tab appears without output from script code (Simple hello world echo). I'm not sure what the problem could be. My Http server and db server is running.
I'm also not sure if EasyPHP devserver is capable of going online. I'm currently in the middle of building an application that requires information to be sent to the server. My android application has been having trouble connecting to the EasyPHP devserver. Will I have more success with EasyPHP Webserver than I will with Devserver?
If you can make a success request using browser, then I think there will be no problem in Android.
Try to debug your webservice using tools like RestClient or PostManager.
Also, when connecting to webservice from Android application, I suggest using third party library like retrofit2. It's quite simple and we will never bothering with parsing json anymore.
In order to get the devserver running, you simply have to right click on the tray icon and select "Open Dashboard". There you can enable and set up all the services such as modules that you need. Please note that EasyPHP devserver is not designed to be used for a production server!
For performance and security reasons, I do strongly recommend to use Apache or nginx with the current stables of PHP 7.0.x and MySQL. If you need some help with that, feel free to ask me in a comment.
EasyPHP Webserver or Devserver are not a web server. It is a manager that installs Apache, PHP, MySQL, and other utilities, just like WAMP or XAMPP.
Just be sure to start the application that loads the Apache server before doing anything.
about your Android device connecting with the server, I'm not sure how that could be done, I have been more lucky using node, gulp and some scripts to generate a web server that is accessible to my devices in my local network.
I want to check deploying procedure of my struts2 web application developed using eclipse juno on local tomcat server. I want to deploy it to a remote host like 000webhost. Can you provide me any information how to do that?
well, I run my application by typing
http://localhost:8080/Struts2starter/
on browser I want to run it by typing
http://myapp.com/Struts2starter
like something on browser. I wanted to know how to do it.
I don't believe you can deploy a Java application in 000webhost. For example, you can deploy on Google App Engine. Here is an example of how to do that: http://www.mkyong.com/google-app-engine/google-app-engine-struts-2-example/
It depends on server in question. Most servers provide some kind of remote deployment using manager applications / rmi connectors / whaever else exitic means , and eclipse can work with most of them. But of course it needs to be configured on both sides in order to work. Be more specific about your server config, and you will surely get proper answer
I have a java web application that I am developing in Netbeans (and running through Tomcat). Is there any way to put this application on Sharepoint?
This is my first time doing this. I've read that to post the application to a tomcat server you just have to copy the .war file over, but I haven't been able to find an easy solution for Sharepoint.
Sharepoint isn't a Java Application Server. You'll have to use Tomcat (or another Java Application Server) to host your application. If you need to interact with Sharepoint from your application, you'll have to use web services, a shared database or something else to communicate.
That's not possible out of the box. SharePoint only runs ASP.NET applications, not java projects.
You can deploy the solution to a Tomcat server and then use the Page Viewer Web Part to show external content.