Requirements:
Should be open source.
Don't necessarily need to connect to an existing IM server, and can run my own so long as it can run in a Linux OS.
Needs to support SSO with the app deployed in JBoss.
Should be able to either skin the chat client to look the same as the app or better still, embed it without any borders or decorators.
Thoughts?
There is a sample chat client with the Jetty webserver you can adapt.
Related
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'm thinking about what might be the best solution to create a standalone client-server application in java with these features:
Server: it must provide APIs (probably rest?)
Client: javafx webview with angularjs to make requests to webserver.
Loader; it starts the server and the client;
The user can then manage the application directly from the webview or from the browser (to the server port)
This would also be able to create in the future a "cloud" version of the application, the client instead to query the localhost will perform to a remote server.
A solution of this type is correct?
What might be useful tools for its realization and how could it be structured?
I would like in particular a solution which does not require the use of a large Java Application Server, but something more simple that it can be included as a library.
I thought same architecture which you think because it's easy. localhost binding, angularjs, bootstrap in java Webview. one of solutions is Spring MVC Rest API with embedded tomcat. it may be not lightweight.
I am really new to web apps and web services... But i have created a webservice and it's working in localhost(apache glassfish) but i need to deploy this thing in an external se(in java)rver so that every one can consume that web service via my app..Unfortunately am unaware of this technique.
so can anybody help in this problem ? Can i host this webprogram in normal godaddy webserver or is there any other way for this..in fact, my app is a small one and i need the solution for small apps or startups
thank you
GlassFish hosting will be hard to find. If your application is not GlassFish specific and can be run on JBoss, then you might try RedHat OpenShift. They have free plan for small application load and you get for free server administration, database administration, deployment is easy, you might concentrate on coding only.
Another option is to use Heroku. You will also need to neglect GlassFish, but they have easy path to creation of REST web service backend.
I recommend renting a server at amazon:
http://aws.amazon.com/ec2/pricing/
You can take already existing images with GlassFish and a Database or take a naked CentOs/ Red Hat Image and install your GlassFish manually. The link provides a table with all prices. A m3.medium costs $0.070 per Hour. It's super fast and flexible and you have high availability.
In NetBeans you can deploy on a remote server via: Services -> Servers -> Add Server:
Just enter your ip, username and password for the GlassFish Server:
Or
You can host your Project on a Raspberry Pi. Maybe the power is enough for a small Web App:
http://www.thehecklers.org/2013/10/27/glassfish4-raspberrypi/
Advantage: It's cheap and you can learn and control a lot.
What approach can I take to solve my problem such that my Android app hosts a website (on whatever port > 1024) and also features a way to allow/block incoming client. So far i have tried manually opening a ServerSocket and injecting html then closing the socket, however it only works most of the time and only with Google Chrome...anyone have other ideas?
You could use some small servlet container like jetty - pure java and lightweight enough to fit a phone. Then you can register your servlets and maybe deploy complete war archive
Checkout iJetty. They basically ported a fully-functional Jetty implementation to Android. I've used it before both as a servlet container (deploying WAR files to it) and as an embedded server in an application I wrote. Getting it to work inside of another application takes some doing, but can definitely be done. You also have access to the source code so you can modify as needed.
I want to create a simple server application which runs on the desktop, and when I type my ip and port on the web browser, it connects to the server client which then opens a webpage with appropriate displays coded on the server application.
I read online that I need to use servlet and Apache Tomcat to make a webpage using Java.
I am wondering if there are any easier way to make a simple webpage which can contain buttons without using servlet and Apache Tomcat?
For example, I can use sockets to communicate between server and client applications. Could I change this client into typing the ip address and port on the web browser which will display a webpage created and contained in the server application and remove the need for servlet and tomcat? If so, how do I create a button on the server application so that web browser can see the button when connecting to the server application?
Thank you very much.
If I understand you correctly, you want to have a web page, but you don't want to use Tomcat (or any other servlet engine).
Although it is technically possible to write your own little web server (using server sockets etc), but what you're basically doing then is rewriting Tomcat. Writing a good web server is a daunting job, and should not be taken lightly. I think you are underestimating that. Instead, use what is already there. Tomcat is really quite easy get running.
Creating the server piece could be done with raw sockets, but I would look at at an embedded server like Jetty. I think it will save you a lot of time and headache.
http://docs.codehaus.org/display/JETTY/Embedding+Jetty
You should look into Play Framework. It will be easier then implementing Tomcat or Apache.
Version 1.2.4 is stable and feature-complete for Java, version 2.x is focused on Scala and doesn't have all the features of 1.2.4 yet.
You don't have to create a servlet. But, you need something that can parse a jsp page - it could be tomcat or some other server which has the same capabilities as tomcat. Though I am not sure if I understood your question correctly.