Bharat Nanwani
Bharat Nanwani

Reputation: 703

How to deploy my web application locally?

I am a bit confused with Application Server and deploying my web application on it. Say I have my own server at workplace. I understand how a web server works, I could simply install WAMP or XAMP and start my own web server, SQL server as well.

How do I start an application server? Say I want to start a glassfish server. How do I deploy my application on this web server / application server? This confusion has been a nightmare for me. Please help me bring some clarity around this subject.

Upvotes: 0

Views: 8720

Answers (2)

Mike
Mike

Reputation: 4963

I am assuming you are using Windows for this.

To start GlassFish:

  1. Open a command prompt in your GlassFish home directory (where you unzipped or installed to, something like C:\glassfish4). You should see a "bin" folder in this directory.
  2. Run bin\asadmin start-domain to start GlassFish. You will need to make sure that there is nothing running on ports 4848 or 8080, or you may see unusual behaviour.
  3. Go to http://localhost:4848 to see the admin console starting up

To Deploy to GlassFish

  1. The easiest way is to use the admin console. Click Applications on the left, then click Deploy. You will need to select the app from your local machine to be deployed. Most other settings can be left as default, but make sure there is a server in the target list.
  2. Using the command line again; in the same directory as before in your command prompt, run bin\asadmin deploy C:\path\to\MyApp.war
  3. Alternatively copy and paste your app to the autodeploy folder in your domain (the default domain is domain1): C:\glassfish4\glassfish\domains\domain1\autodeploy. Once your app is in that folder, GlassFish should handle the rest (providing there are no problems with your app)

Upvotes: 1

Abelard Chow
Abelard Chow

Reputation: 618

Web application deployment instructions differ for different application servers.

Based on your question, I don't think what application server matter and I will use IBM Liberty Profile as an example. You can download a free developer version from here (You can skip step 1 if you don't need eclipse),

https://developer.ibm.com/wasdev/downloads/liberty-profile-using-non-eclipse-environments/

And here are the instructions to deploy web application on Liberty Profile

https://www-01.ibm.com/support/knowledgecenter/SSD28V_8.5.5/com.ibm.websphere.wlp.nd.doc/ae/twlp_dep_war.html

Upvotes: 0

Related Questions