Javafx 2.0 deployment request to the server web and accsess by URL

Hi all

I built a JavaFx 2.0 using Netbeans 7.1 application. He created an html file, a jar jnlp file a file with the name of the project. Now, I want to deploy my application on a server for example glassfish or tomcat so that any user can access the URL.

Is it possible to deploy the application on the server. If so, how?

I found a link
http://docs.Oracle.com/JavaFX/2.0/deployment/deploy_overview.htm
Here he described various mode of executions. In a run mode it say that we can launch the application from a remote server using Web Start. But I'm not able to get the steps how to achieve this.


Thank you
Vikas

You deploy a client application via a network, you cannot be sure that the computer that is running the client application will have the configuration property file in the location you are trying to access (unless your application he wrote). Even if the file is there that you must sign your application deployed to have access to it, which is usually an unnecessary hassle.

As an aside, use the code format specifiers (see thread sticky at the top of the forums) to apply inlining code in forum posts because it makes the code more readable.
-----
For that to work, you must package configuration properties inside your pot with the rest of your resources, then you can load it via:

pro.load(LoginPage.class.getResourceAsStream("config/config.properties");

OR, if you can't bundle configuration properties in the pot, for example because you want to vary the configuration regardless of deployment of a new pot, you can host on your Web server configuration to a relative location where host you your application and get it from here:

HostServices hosting = getHostServices();
pro.load(new URL(hosting.resolveURI(hosting.getDocumentBase(), "config/config.properties")).openStream());

For example, if the application jar is located in the ROOT/webapps of tomcat directory, and you want to access config/config.properties using HostServices, then place config.properties in the webapps/ROOT/config/config.properties

Now, if you have specific user rather that wide application configuration, you will need to implement a web service for storing specific user configuration and to read and write from that or you need read and write the configuration of the user on the local drive by using the jnlp FileService for unsigned application , or any where on the disk if you have a signed application.

However, it seems that your configuration is to store only a hostname, the port and service network app path. If you can make the path to the app for your network service in relation to where you deploy your application and save the relative path as a constant in your application, you could get only the information of:

HostServices hosting = getHostServices();
URL serviceURL = new URL(hosting.resolveURI(hosting.getDocumentBase(), APP_PATH));
ServiceCommunicator.HOSTNAME = serviceURL.getHost();
ServiceCommunicator.PORT = serviceURL.getPort();
ServiceCommunicator.SERVER_APP_PATH = serviceURL.getPath();

In this way, you wouldn't have to define, maintain and load a separate config.properties file.
In addition, with the path of the service against your deployment application facilitates application host elsewhere and denies the need to sign the application for network services to work when the application is deployed in embedded mode webstart or browser.

Published by: jsmith on January 20, 2012 01:11
I thought that you could load a properties with just a url string, but it must in fact be a stream, so I've updated the call to load the properties in order to take a course of water.
Has changed

pro.load(hosting.resolveURI(hosting.getDocumentBase(), "config/config.properties");

TO

pro.load(new URL(hosting.resolveURI(hosting.getDocumentBase(), "config/config.properties")).openStream());

Tags: Java

Similar Questions

  • Problem in sending HTTP request on the server.

    Hello
    I have dveloped a script ant for deployment of the sar.

    I have deployed an endangered species to my server local soa with ant script. He has successfully deployed me...
    but when I try to deploy it to a remote server, get the below error...
    "The problem by sending the HTTP request on the server. Please make sure that the server is in place or check the code of standard HTTP response for a 404 "

    but the server is up and runnig and I am able to ping my machine and also access the console...

    Here's my script


    Build.Properties
    ------------------------------------------------------

    WN.bea.Home=C:/Oracle/middleware
    All.needed.Jars.Path=D:/Sourcecode/neededJAR
    Oracle.SOA.Home=C:/Oracle/middleware/Oracle_SOA1
    Java.Passed.Home=C:/Oracle/middleware/jdk160_24

    #Deployment environment
    Deployment.plan.Environment = dev

    #Deploy action
    deployAction = redeploy

    #credentials
    user = weblogic
    password = BIENVENUE1

    #For Composite deployment
    serverURL = http://10.177.154.6:7001
    forceDefault = true
    Server = 10.177.154.6
    port = 7001
    sarLocation = D: / code source/JAR


    Build.Xml
    ------------------------------------------------------

    <? XML version = "1.0" encoding = "iso-8859-1? >
    < project default = "soaDeployAll" name = "deployAll" >
    < echo > basedir ${basedir} < / echo >
    < environment property = "env" / >
    < echo > classes folder ${basedir} < / echo >
    < file="${basedir}/build.properties"/ property >
    "< taskdef resource="net/sf/antcontrib/antlib.xml ">
    < classpath >
    < pathelement location="${all.needed.jars.path}/ant-contrib.jar"/ >
    < / classpath >
    < / taskdef >
    < target name = "init" >
    < tstamp >
    < form property = "timestamp" reason = "yyyy-MM-dd_HH-mm-ss" / >
    < / tstamp >
    < name = "build.log.dir property" location ="${basedir} / buildlogs" / > "
    < dir="${build.log.dir}"/ mkdir > < property name = "build.log.filename" value = "build_$ {timestamp} .log" / > "
    {< record name="${build.log.dir}/${build.log.filename}" loglevel = "verbose" append = "false" / > ".
    < echo message = "Build connected to ${build.log.filename}"/ > "
    < / target >

    < target name = "deployAll" depends = "init" >
    < echo > deploy environment ${deployment.plan.environment} < / echo >

    < antcall target = "deployAllComposites" / >

    < / target >

    <! - the following Actions are performed for Composite files to the server run - deploy, redeploy - >
    < target name = "deployAllComposites" depends = "init" >
    < foreach target = "deployComposites" param = "File" >
    < fileset dir casesensitive = "${sarLocation}" = "no" includes = "*.jar" / >
    < / foreach >
    < / target >

    < target name = "deployComposites" depends = "init" >
    < file basename property = "${file}" = "basename" / >
    deploy < echo > ${name} of the environment project $ {deployment.plan.environment} < / echo >
    < if >
    < equals arg1 arg2 = "${deployAction}" = "deploy" / >
    < do >
    < echo message = "deployment of composites in Managed server...". "/ >
    "< antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml ant "inheritAll ="true"target ="deploy">
    < property name = "ServerUri" value = "${ServerURI}" / >
    < property name = "user" value = "${user}" / >
    < property name = "password" value = "${password}" / >
    < property name = "overwrite" value = "false" / >
    < property name = "forceDefault" value = "${forceDefault}" / >
    < property name = "sarLocation" value = "${sarLocation} / ${basename}" / >

    < / Ant >
    < / may >
    < other >
    < echo message = "redeployment of composites in Managed server...". "/ >
    "< antfile="${oracle.soa.home}/bin/ant-sca-deploy.xml ant "inheritAll ="true"target ="deploy">
    < property name = "ServerUri" value = "${ServerURI}" / >
    < property name = "user" value = "${user}" / >
    < property name = "password" value = "${password}" / >
    < property name = "overwrite" value = "true" / >
    < property name = "forceDefault" value = "${forceDefault}" / >
    < property name = "sarLocation" value = "${sarLocation} / ${basename}" / >
    < / Ant >
    < / else >
    < /if >
    < / target >
    < / project >



    Help, please...

    Hello

    Give the serverURL as http://:/ soa-infra/deployer and try.

    for example. http://10.177.154.6:8001 / soa-infra/Deployer

    Kind regards
    Neeraj Sehgal

  • Problem in sending the request to the server, MDS started after expired connection error

    Hello

    I have a problem when sending request to the server. I need to manage the time of connection error. When I send a request from my device to serve and connection time-out error, I need to send the request back to the server.  To test this error, before sending the request, the MDS quit and then I try sends the request to the server. After 2 minutes, the appliance up Connection Timed out Error.

    Now when I start the MDS and refer the request to the server, the request sent when the connection has expired also reached the server. (Totally 2 request are sent to the server).

    What is the behaviouir of MDS? If so how should I handle this.

    or have I missed something on my side?

    I use BlackBerry 4.2.1 JDE with SDM (4.5.0)

    Thanks in advance.

    (Note: see this link for the behavior of MDS.)

    Hi all,

    I finally found the solution.

    Everytime I go to start the net, I check that the connection is available or not by using below codes...

    HttpConnection conn=null;try    {    conn = (HttpConnection) getConnection(myURL);      if(conn == null)     {           Inform the user the process is in offline       }     catch(Exception e)      {      }      finally      {                try                {                    conn.close();                    conn = null;                }                catch (Exception e)                {                    conn = null;                }            }
    

    When this function is execute the connection is not closed properly.

    After that I got the connection error, start the MDS, meanwhile runs unclosed connection.

    Now, I removed the check above, its works very well.

    I made a mistake. Finally, I saw that and correct it.

    Once again thanks for all your opinions and answer.

    Sorry for my English.

  • How can I locate the server info and start it I can send documents

    I can't send or send my 'file documents' file incorrect server. How can I locate the server info and start it I can send documents

    I have a problem, find out who is my server and then set this info in my PC so that I can send or send my files that are in my Document folders

    http://www.SimpleHelp.NET/2007/02/07/a-beginners-guide-to-setting-up-Windows-Mail/

    Link above has an easy to follow Guide to set up Windows Mail.

    Contact your ISP (Internet Service Provider).

    They offer your broad band/Dial-up connection.

    Ask them to:

    username
    password for your service account to wide band/Dial-Up with them

    Server of incoming POP3 mail
    outgoing mail SMTP server

    The above information is required to set up Windows Mail.

    ISPS are usually happy to help you set up your email account.

    See you soon.

    Mick Murphy - Microsoft partner

  • can not display the webpage error something about the Server internal and 500 are down for maintenance

    can not display the webpage error something about the Server internal and 500 are down for maintenance? Yahoo search option and can get to Web site but trying to post comments online and get this message.  tried to restart and got the same answer.  Just set Windows to update when I logged on tonight.

    Hi ginnypierson,

    Thanks for posting in the Microsoft community.

    I understand that you are facing the issue with can not display the webpage and you are wrong about 500 and internal server being down for maintenance.

    Before you start the troubleshooting steps, I need the information required

    1. what web browser do you use?

    2. have you made any changes to the computer?

    3. this problem occurs only with the particular website?

    Method 1:

    If you use Internet explorer, I suggest you to see link and check.

    Get help with the Web site (HTTP error) error messages.

    http://Windows.Microsoft.com/en-us/Windows-Vista/get-help-with-website-error-messages-HTTP-errors

    Method 2:

    I suggest you to see link and check.

    How to optimize Internet Explorer

    http://support.Microsoft.com/kb/936213/ro

    WARNING: Reset Internet Explorer settings can reset security settings or privacy settings that you have added to the list of Trusted Sites. Reset the Internet Explorer settings can also reset parental control settings. We recommend that you note these sites before you use the reset Internet Explorer settings

    Please follow these recommended steps, review the additional information provided and after back if you still experience the issue. I will be happy to provide you with additional options available that you can use to get this resolved.

  • How do I open the browser web blackberry with a url given by a click of a button.

    Hi all

    I'm developing an application in which I want to open the browser web blackberry with a URL given using a click of a button. How can I do that. I use this code inside the earpiece button

    ' Public Sub fieldChanged (field field, int context) {}
    TODO self-generating method stub
    Private private = Browser.getDefaultSession ();
    browserSession.displayPage ("http://www.google.com");
    }

    What is a good way to do this? Please help me...

    Yes

  • often a note: size of bad request to the server to a large part

    When I click in my emails on a link to a Web site, I often get a note:

    Bad request

    Your browser has requested that this server could not understand.
    Size of a request header field exceeds the limit of the server.

    I asked my provider KPN if they can solve this problem, but they informed me that this problem is related to the browser I use, in this case Firefox.
    To this effect, they cannot support me with this.
    I've already updated Firefox to version 4.0 but they problem resists.

    Can anyone please help me, as I had this problem in the past.

    Thanks in advance.

    This problem may be caused by corrupted cookies.

    Clear the cache and cookies from sites that cause problems.

    • "Clear the Cache": Tools > Options > advanced > network > storage (Cache) offline: 'clear now '.
    • 'Delete Cookies' sites causing problems: Tools > Options > privacy > Cookies: "show the Cookies".
  • Printer Officejet Pro 8620: How to reset the Server Web integrated (built-in web server) on the printer Officejet Pro 8620 Pro?

    The password has been reset, but we cannot go beyond the server request the user name and password to change the other settings.  We have not had any problems to set up the printer to the computer and we are able to print and use the printer.  We just need to find EWS to change other settings.  We use Windows 7.

    Hi there @Mariko23

    Welcome to the forums,

    I understand the SAP you request a user name and password and you're looking to reset the built-in Web server to access accordingly.

    I suggest try to restore default network settings on the device, which should help you.

    On the printer, select Setup, network configuration, network by default, Yes, restart the printer.

    Good luck, I hope this helps

  • You can install the server connection and security on the same virtual machine Server?

    I was looking around and found an old post that says that you could do.

    I tried the documentation view 5 but not a lot of luck there.

    If the deployment is small say 20 users view total.

    Could install you the connection and security on the same VM Server?   W2K8R2 64-bit?

    I certainly understand some of the security risks.

    TIA

    Marc Alumbaugh says:

    Any other ideas?

    No other ideas, but we have should stick to previous ideas and continue to work through them. You make progress in this analysis - continue! When it is correctly configured, you have configured the firewall/proxy etc don't not to block PCoIP and that you use at least seen 4.6 on the Client and the server, it does not work.

    It always seems that there's something blocking PCoIP in your environment - where the black screen.

    So when 'PCoIP external URL' on the login server is defined on InternalIP:4172, your View on the internal network Client connects fine. If you run Wiresahrk on your connection to the server to capture the connections, you will see a connection HTTPS turns on TCP 443. Then when you select a pool of offices you will see a PCoIP connection come in. It comes to 4172 TCP from the customer to the login server, then UDP 4172 also from the Client to the server connection as well as UDP 4172 in reverse. For this reverse part, the source UDP port will be 4172 and corresponds to the destination UDP port source on the incoming UDP packets. Check that this is the case. This will prove that the login server is gateway your PCoIP correctly.

    So far so good.

    Then, you switch to your remote Client to view from on the Internet. To do this, you assign the URL of the "external" ExternalIP:4172 PCoIP. Note that you don't need to restart the login server for this to take effect. It takes effect immediately. This IP address will be the public IP address which will probably through a NAT/firewall to access your connection to the server. You can start by checking that the IP address is correct using to connect to the server address when you satrt the customer to view. When you use the same IP address to the Client and through the authentication step, it will prove that it is set up correctly in terms of Routing/NAT etc. Then follow with Wireshark on the login server and observe what happens when you select a pool of virtual offices and get the black screen. You should see the same activity PCoIP on your login server model as in the case of internal test (i.e. starting with the incoming TCP connection on port 4172). View Client will use the ExternalIP address that you specified in the "URL external PCoIP ' to establish the PCoIP connection to connect to the server. So if you don't see this com 4172 TCP on the login server, or you do not see the packets UDP 4172 then something is blocking. This is usually caused by a firewall or a proxy blocking PCoIP.

    If this is the case and you do not see these packets to connect to the server, then run Wireshark on the Windows Client to view and see if you can see 4172 TCP and/or UDP sent to this ExternalIP 4172. If Yes, then you know that something (such as a firewall or proxy) between the Customer View and the view connection server it blocks.

    Let us know what it was.

    Hope it will be useful.

    Select this option.

  • How to reset the server information and the port in Windows Mail?

    Original title: I can't answer or before my incomming emails

    I have windows mail-how reset incomming server info and port info?

    Hello

    Are you aware of any changes made to the computer, before the show?

    I suggest you check out the following link.
    Solve problems with Windows Mail
    http://Windows.Microsoft.com/en-us/Windows-Vista/troubleshoot-problems-with-Windows-Mail

    See also,
    Messages may be stuck in the Outbox when you use Windows Mail on a computer that is running Windows Vista
    http://support.Microsoft.com/kb/941090

    I hope this helps.

  • "Problem connecting to the Server Web Services." - HP Envy 100

    Hello world

    I wonder if anyone has the same problem as me. I just got a HP Envy 100 and went through the process of setting up without problem. The printer is connected via Wi - Fi for wireless network, I can ping the printer from my Mac successfully and I can print within the network without problem.

    However, regarding ePrint and Web features, it seems that nothing really works. I can't even turn on Web services, I always get the message "problem connecting to the Web Services server.

    I tried the following:

    -Restart the router and printer

    -Change the manual IP address and manually set the DNS server

    -Reapply automatic IP and set the Google DNS (8.8.8.8 and 8.8.4.4) servers

    .. .with no chance whatsoever. If this is a problem with the firmware (from what I understood, I do not have the latest firmware, but I can't ask her update, because it requires, you guessed it, a connection on the server of web services, that is the whole of the problem.)

    Anyone else having the problem? Everyone had it and fixed it? Is this just a temporary problem with HP servers?

    Thanks in advance!

    Hey, for me it works as well, and I didn't, just retried that I had tried before and it connected to the Web Services without problem.

    So I think it's safe to say that the original problem in this topic only lied to a HP Server-side problem. Not cool it took so long for them to solve and in particular the fact that we did not really have feedback appropriate about the problem.

    Anyway, I solved (for now, at least).

  • E-mail from Q10 peripheral blackBerry control the Server - / unread and delete!

    My problem is that my BB Hub seems to have complete control over my web mail server.  In other words, whenever I delete an email in my Inbox BB Hub, it removes the enamel on my server as well.  It is a huge problem for me, with regard to the last ten years, I was in the habit of deleting e-mails on my device once I read them and then to remedy later in my office, where messages were also pulled down by Outlook (or, when I travel, I can go online and see the messages online through my web server directly).  It is more than a mere preference: it is essential to be able to read some emails on a normal sized screen.  The small screen of a phone just doesn't cut it sometimes.

    Another problem I have is that my BB Hub inbox marks all messages as "read", before even that I read them.  And, when I mark not 'read', it makes them pop back up on my server.  It is also more than a minor annoyance: when you get 300-500 emails per day, it's really hard to keep track of what you've read and what you do not have when all of them are marked as 'read '.

    Is it possible to divorce my server online ordering of the Q10?  Put on 'manual' and 'push' sync will not work.

    If you are unable to use Outlook and BB10 and yet messages come not "read" for your device, then that adds a major drawback.  Maybe I'm not fairly warned with Outlook, but I don't think that it will allow you to pull down messages from the server and let them still "no read" on this server.  You can leave a copy of the original message on the server, but you can't leave it in a State "unread".  This will prevent the Z/Q10 have unread messages on its screen (if you use Outlook on your desktop).

    And you're on the dangerous territory to be able to permanently delete the messages from the server, removing them from your device.  The BB has always been an additional tool, not a replacement for the desktop environment.  If I can no longer delete messages I've read the until I'm sure that they have been pulled down from the server and saved by Outlook, this will result in a much more crowded Inbox on a daily basis and so more time it cleaning at the end of each day.  BB was supposed to add for convenience, not diminish it.

    Hello

    BB10 is nothing like inheritance, so expect that it would work as legacy is for the disappointment. Legacy devices used BIS, which provided all the functions you mention. BB10 doesn't use BIS and instead has a client full email on the device, which works the way it is designed.

    It is clear from everything you describe, WAD - works as expected. The mailbox on the device and the server are supposed to now be images of mirror each other... whatever you do one account to another. There is no way to replace it, since it's WAD.

    Workarounds exist using the server folders to move things rather than delete them. Workarounds are heavy, but they are what they are. The design of the device, it's what it is.

    Many hope that future updates can bring some of these features to the BB10 platform, but no one can say if/when this will happen. For now, it is what it is.

    Good luck!

  • Running the server failed and BitLocker on Win 7 Ultimate

    I'm having the following problem:
    When I try to launch windows explorer once the connection, I always get the error:
    "Server execution failed".
    So I can't open my D drive since the Explorer (corresponding to all my data and that is encrypted with BitLocker in Windows 7 Ultimate 32-bit).

    I recently found a work around. I start FreeFileSync (no error) which is a program that compares and allows the synchronization of two directories. I can with the right button on the D drive and unlock the drive by providing the BitLocker password. No matter what program with an order opening the file would work too.
    After I unlock the D drive, Windows Explorer gives me no more problems until I restart.

    It is a permanent way of this problem. I'd appreciate any help.

    A little history:
    ----------------
    The problems started after I changed the location of the directories under my user name (desktop, Documents, pictures, etc.) the disk hard D. aware that this could be the cause, I back return office locations, links, Contacts, & research (using a default restore). The rest is media (for example, photos etc) so I left it to D.

    This has not solved the problem.

    I checked thekeys in the registry, they are correct:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal
    HKEY_CURRENT_USER folders

    Thanks for your help Elsa,

    Unfortunately, the fix didn't settle. I got a: "update is not applicable to your computer".
    However, when I read the 244677 support document, I noticed checking option: option of folder windows in a separate launch process has been involved in the issue. Then, when I checked it offshore (I usually check it out on when I install Windows) everything returned to normal.
    That does for me, it is not essential for me to have it on even though I usually do, but it might be something to look at...
    Thanks again.
    Jack

  • How to find 'the server address' and 'domain' outlook configuration in mail account name?

    Now mail to install on my new laptop that runs Windows 8.  I used outlook on my old laptop to access an email account @iolfree.ie.  The mail app asks me to enter the address of the server and domain, but I don't know where to find these.  Any help would be greatly appreciated.

    You will need to find this information on the site iolfree.ie.  There should be a section in their FAQ section or help telling you this information.

  • How to remove a web page from the server web host via dreamweaver


    We have made significant changes to our Web site and need to delete a number of web pages that have been published on our web server.  While these retired web pages cannot be publicly accessed via links in the Web site, that have been deleted, web pages remain on the site and can be accessed if their specific URL is directly indexed.

    1. In the files Panel, select the remote server in the drop-down next to the site name and click the icon to connect to the remote server.
    2. Browse for the files you want to delete and press delete.
    3. Confirm that you want to delete the selected files.

Maybe you are looking for

  • Not compatible with all web pages.

    The following web page is not displayed correctly. Chrome and IE are OK.

  • How can I use the copy of Windows XP from the desktop on the laptop?

    loading xp with a different product code I have a laptop that works under XP. I lost track of the original disc. I also have an office which was under XP but Win 7 is working now. I have the XP installation disc. How can I use the drive of the deskto

  • Solution Center did not offer my solution, one that worked. HP Photosmart c510 NET

    I was a paper get stuck in the setting duplex, followed instructions well depicted on the Zeen, authorized and continued to pursue my impression. But nothing does not print. Solution Center says "unable to print Documant. [BIG surprise} Clicked & rec

  • BlackBerry Leap leap and Hotmail

    Hey any help would be greatI'm trying to connect to my Hotmail account in the normal way using add email in the settings and when prompted, he returned as incorrect user name password. I checked all the info via the connection through the Internet, a

  • Write the QList &lt; Message &gt; in the file

    Hi all As API ContactService we method contactToVcard, which converts the table QByte contact which may be subsequently written to the file. There is none of these methods in the MessageService API https://developer.BlackBerry.com/native/reference/Ca