how to upload java web application on server

We develop a lot of java projects specially in eclipse but only few know how to upload those developed application on server.
In this tutorial we will learn how to upload java web application on server .

We will start from the beginning.Requirement to upload java application on remote server are :-
1)Domain Name
A domain name is a unique name that identifies a website.Each website has a domain name that serves as an address, which is used to access the website.
Whenever you visit a website, the domain name appears in the address bar of the web browser.
When you access a website, the domain name is actually translated to an IP address, which defines the server where the website located.
Domain names are relatively cheap to register but nearly all domain names with common words have already been registered. So, if you want to register a custom domain name, you may need to think of a creative name. Once you decide on a domain name and register it, the name is yours until you stop renewing it. When the renewal period expires, the domain name becomes available for others to purchase.

To register your domain name you can do a google search.There are lot of site to register your domain name.E.g :- bigrock, godaddy, hostingraja etc.
These all site are very popular for domain registration .

I prefer bigrock because provide domain name registration at cheap rate.

Do google search as follow to get .com domain @ Rs 99 .



domain search



Type the domain name in the search box and click at Go button as shown in fig.




spring tutorial

spring tutorial




If the domain name has already been registered by someone else then it will be show  as unavailable as shown below –



domain name search



If domain name is unavailable then go back and  try similar name or any other name until you get a suitable domain name.

When domain name that you have searched is available then  it come with checkout button as highlighted as shown below



domain name.



Click on checkout button.

If you are new user then then click create an account button as shown below



domain name



Fill up the form of registration .Keep in mind if you are a new user then only you will get coupon of cheap domain.If you are a registered user and want coupon of cheap domain name then register with different E-mail Id.

Note -note down the password and username because this will be needed in further process.



domain name



After creating an account in some site  you need to verify your email address.So login in your email account and verify your email address and Login in your account to proceed.

If you are new user then coupon will be applied automatically  and the amount will come down Rs 99  as shown in below fig.



Domain name




Click on check out .You will be asked to select payment method as shown below.Select your payment method and click pay now  as shown below.



Domain Name



After clicking in Pay Now you will directed for payment .Fill up all the information required information .

Now we are done with with registration of domain name.

The second step is to purchase server where we will install our application.

To purchase server do a google search for web hosting sites for java.There are three main type of hosting 1)public 2)private 3)dedicated

Select private because in public the server is shared between multiple application and you do not have complete control over the server.To start or to stop server first you will have to request to the hosting provided.So it is batter  to choose private hosting.

There are lot of hosting provider like bigrock ,godaddy ,hostingraja etc.You can choose any . I have choose cyberhost .



Java Hosting




Go to hosting site home page >go to java hosting >private jvm Linux hosting.

Do not worry because i selected linux .Actually there is no difference between linux and window hosting.In both Linux and window hosting you will get the same Cpanel to work with server.The cost of linux hosting is much low and it take less time to start and stop  server in linux Cpanel .The are other advantages of Linux hosting in terms performance.




java hosting



You can see the different plans and features and cost.You can do google for more detail about the features .I suggest to select the basic plan that provide 128 Mb of jvm size.The other feature does not matter too much.Click on Order button.




java hosting


After clicking on order button you will directed for configuration .If you have not register your domain name then click on the first radio button.If you already have registered domain name that was previously used at some other server and you want to transfer it to some another server then check the 2nd radio button.

If you have a registered domain name and and not used till now then check the 3rd radio button.

After checking the  radio button fill up the Text Box with the domain name and click at the button Click To continue as shown below –



java hosting





Next you just need to click at add to cart button.



How to upload java web application on server




Click on the checkout button as shown in the fig.






Now fill up your details and click on complete order button .Note- All the details should be correct.Because the information will be needed in further communication process and all the information regarding the server will mailed at your email id.




java hosting



You will be directed to another page where you need to select the payment method and click on Pay Now button.



java hosting


Fill your billing details ,Payment details and click on submit button as shown in below fig.



java hosting payment



Complete your payment Information as shown in the fig.

Card Number is a 16 digit number written on your card.

Expiry date is also written on the card like 02/18.

PIN is the 4 digit number that is used to withdraw money from ATM.

After filling the information click on submit button.



java hosting payment




After payment Nameserver and Controll panel login detail will be mailed to you like shown below.The name sever need to configure with the domain name if you have register your Domain name from some other website.If  you have register the domain name on the same website on which you have purchased server then there is no need of any configuration .I will explain in next step how to configure Nameserver with the Your Domain Name.

Control panel URL and user name and password  will be used to access the control panel.I will also explain about it in upcoming  steps.

FTP access is very important ,It enable to access all files at server with FileZilla software.It has many advantages .I will explain in detail about it in seperate tutorial.



java hosting name server


Now we are done with purchasing of server and registration of Domain name.Now the next step is to configure Nameserver with the registered  domain name.If you have registered Domain name and purchased  at the same website then there is no need of this step.

To configure Nameserver with domain name login in your account of Domain registration website with your email Id and password.

Check the check-Box and click on Modify Name Server button(2nd button from right on upper side) as shown below-



name server setting




Now copy the Nameserver that you received inthe e-mail of hosting provider and paste both the Nameserver in the text boxes as shown below. Click on Modify Name Server button.


name sever modification




Now login in the control panel of your server with the control panel URL ,user name and password .After login you will see below page.Click on NGASI Application Automation.




java control panel




After opening NGASI the below page will come. Click on App Factory from this page



java control panel



You can upload the application to server only in  .war formate .   file. To convert application in .war file in eclipse. Click on File at the top of left >Export >Web >WAR file >click on next >Select your Web project >Browse for Destination > save > finish.

Upload the .War application format by clicking Upload button and then browse button .It require a batter Internet speed to upload quickly.



java control panel



As the uploading of .war application will complete you will see  window shown below.The context/Path will be by default like   /YourApplicationName .You need to remove application name from context/Path. Only / could be left in context/Path  as shown in fig. Click to continue button.



java control panel



Now click on Web Server And Hosting Manager Configuration available on the upper side of the control panel shown in fig.




java control panel




Now enter the .war file name in the text box  without any extension and click at Add button as shown below .




java control panel



Now click AppSever Manager >App Factory >Available Application >Ckeck the radio button of  the application  you have just uploaded >click at Add button in the  Install Selected Application section as shown below.



java control panel



A new window as below will pop up with a warning.Ignore this warning .It will  not do any damage to any installed application or anything else.Again clear the application context and left on a / in the text box like shown below.


java control panel


The may take few minute to install this application .The previous step is the final step.Now open another tab and check your application by typing the Domain name in URL  bar.I will explain the complete control panel in another tutorial.


About the Author: devender kumar

java/j2EE developer

4 Comments+ Add Comment


    Nice tutorial with detailed explanation

    • Thanks Ankit .Best is yet to come.


    Nice tutorial and easily understandable…

    • Thnks @ Kuldeep .More nice tutorial yet to come