JAR file in Web page execution - executable-jar

Can java application run within web page?
If i create a .jar file and i want it to place it on my website then can it be made available to run in the web page itself i.e. like an applet? Or it can be made available as a downloadable item?

The only way I can think of is using Java Web Start, it will allow you to launch fully-featured application from the Web Browser. It doesn't allow you to run it like an applet but it allows that the end user runs a full java app without needing to install it.
Index of JWS.

Related

Is possible deploy c++ web server on OpenShift3?

I am trying to deploy a c++ Http web server on OepnShift3 then I referred this.
The problem is:
Shall I put the source code on OpenShift or compile it first then put the executable file on OpenShift?
Is possible to access the OpenShift3 server via Xshell or Ftp?
Any way to get the OepnShift2 account?
It is no longer possible to get accounts on OpenShift 2.
For OpenShift 3, if you wanted to use a custom HTTP server you would need to be able to build a Docker image which includes it and any other files you need. If you can get the Docker image built, then you can deploy it to OpenShift 3.
Although you can get an interactive terminal in the container which runs your application, it doesn't work like traditional web hosting. That is, it isn't a shell access account where you would upload files using FTP or some other means.
Can you explain more about what it is you want to host? Depending on what you are doing there may be builder images already supported by OpenShift which can pull down files from a Git repository and build an image for you.
If OpenShift is new to you, I would suggest you try out:
https://learn.openshift.com
so you understand some of what it can do and how you interact with it.
Also grab down the free eBook and read it:
https://www.openshift.com/promotions/for-developers.html

Having RESTful service in RCP application

We have an existing eclipse RCP application that works as a standalone product. At a high level, this product is used to configure a image specification using its UI and we can export a sample Image based on these configuration.
Now we are developing another web application that has several modules and one module of it is to develop something that our eclipse RCP application does.
Just to provide a QUICK integration of the RCP application for demo purpose, I plan to run the RCP application separately in the server machine and expose its static functionality as a RESTful webservice. So the module shall make a RESTful call to the RCP application.
Now just to begin with I tried to embed a jetty server for hosting the REST service during the start of RCP application like below
But the thing is after the Jetty server is started I am not able to access the TestWebService using the path i configured. So I am confused if this is the right approach to have a RESTful service inside a RCP application. Please note that iam able to hit the server with http://localhost:1002, but not the service.
Following is the console log when i hit on http://localhost:1002/hello/test:
It's a really weird architecture you're experimenting with.
I mean to write an RCP-application which listens on a port and offers REST services on it; this could lead to further obstacles.
Instead I would seperate it into two software artifacts: an RCP-app and a web-application (.war).
You could extract a business-logic jar (It can be an OSGi plug-in if necessary) contaning your image manipulation logic.
Then include this plug-in/.jar as a dependency in the webapp and offer out it's functionalities thru a Web-container (Tomcat, GlassFish, etc.)
So your other (third) application will connect to the Web-services offered by this .war file.
opt.1) If you need a single running instance (because of database or other shared resource) then your RCP-app will have to use this REST service too.
opt.2) If not then simple compile the .jar/plug-in containing the business-logic into your RCP-app.

Sublime Text auto touch and upload file

I'm using Sublime text with the FTPSync plugin to develop a Flask web application deployed by Phusion Passenger.
Due to the way my web application is cached on the remote server, whenever I make a change to my actual web application I also need to change the last modified date on a file in Flask's '/tmp' folder on the web server in order for changes to my other web application's files to take effect (this based on advice from How do I clear the cache of Ruby Phusion Passenger in Ubuntu?).
Currently I have a 'restart.txt' in my web application's '/tmp' directory which I 'touch' (add a char/remove a char, then save) and then upload using FTPSync which causes the other changes I've FTP'd to the server to take effect.
I'm looking for a way to automatically touch that 'restart.txt' file and upload it whenever a file in my web app project is uploaded (currently anytime I 'save' a file).
Is there any way in Sublime Text 2 to script an action to automatically touch + upload a file and have that script run whenever a file is being uploaded?

Is it possible to run an application from a remote server on a website?

I have a website that I would like the customers to navigate to a page where it runs a program that I wrote. However, the program is on a separate server. How might I run the application from that remote server onto the server that hosts the website?
It looks like ideally I'll have my web host as GoDaddy.com and I'd like to run my application from that website.
Any thoughts?
What kind of technology are you employing to deploy the apps? ASP? PHP?
It seems that you were actually trying to "Window" the app on another server to your current site, if that's the case you can just simply link the app inside an iframe of your site.
Reference -http://www.w3schools.com/tags/tag_iframe.asp

coldfusion web-inf\web.xml purpose

Im looking at using New Relic for monitoring our coldfusion sites. however it uses the web application display name defined in web.xml to define applications in its admin.
As far as I can work out coldfusion only have the one web.xml file in:
...\ColdFusion9\wwwroot\WEB-INF\web.xml
What is the purpose of this file? and can elements of it be overwritten on a site by site basis?
It looks like New Relic is a tool for monitoring Java (and other) apps. ColdFusion is a Java application. And the way you have it installed (standard) it is a single application with a single web.xml. Regardless of how many ColdFusion sites (apps) you run on it, it is still a single web application.
If you have CF Enterprise you can set up a multi-server install where you can deploy each of your sites as a separate Java app, but the way you have it set up now, you'll probably only be able to monitor CF as a whole vs each individual site.