soso
soso

Reputation: 11

How to run Java Web Application from commandLine prompt or any where

I have created two (java web applcaion ). one acts as a Server , I created ( web service) into. the second acts as client , I created ( Web service client) into .

I created them in netBeans, and they run .

but now I want to run them out net beans , how I can do this?

I want any way to run out netBeans such as command prompt or an where.

if you have idia about running (.war) file , please tell me. thanks in advance.

Upvotes: 1

Views: 5982

Answers (1)

miku
miku

Reputation: 188014

What NetBeans did behind the scenes for you was to deploy your bundled and zipped source code into a servlet container (most likely Tomcat), which in turn takes care of everything between the webservice requests and your application.

  1. Find out where your tomcat is located
  2. Eventually stop tomcat manually via something like TOMCAT_HOME/bin/shutdown.sh
  3. Copy your warfile into TOMCAT_HOME/webapps
  4. Start tomcat (TOMCAT_HOME/bin/startup.sh)
  5. Optionally observe the log (TOMCAT_HOME/logs/catalina.out) to find out about potential deployment problems

If everything went fine, you should be able to use your webservice with your client.

Upvotes: 2

Related Questions