Last time I talked about choosing a Java application server. This time I will be looking at Run-Deploy-Stop commands.
As a JavaEE developer who is constantly mobile between different Application servers I ended up compiling my own quick help list with all the options listed for easy reference. I hope you find it useful too…
Starting and stopping Glassfish4 server
START : glassfish4/bin/asadamin start-domain domain1
STOP : glassfish4/bin/asadamin stop-domain domain1
Deploy War: glassfish4/bin/asadmin deploy warfiledirectory/hello.war
Default Admin Port Number : 4848
Default Port Number : 8080
To change https port to 9999
asadmin set server.http-service.http-listener.http-listener-2.port=9999
1. You need to create domain before starting the server; more information on creating domain can be found at http://docs.oracle.com/cd/E17904_01/web.1111/e13715/domains.htm#WLSTG156
2. Change to the directory in which you located the domain and run the script
On windows: bin\startWebLogic.cmd
On Linux: bin/startWebLogic.sh
On windows: bin\stopWeblogic.cmd
On Linux: bin/stopWeblogic.sh
Java weblogic.Deployer –adminurl t3://localhost:7001 –username admin –password 123456 -name app –source /directory/helloworld.war –targets AdminServer –deploy
By default run run.sh script in linux and run.bat on windows
On linux you can use shutdown.sh command to shutdown the server
if you are using JBoss 7.1.1 you need to place your war file inside standalone\deployments folder and restart the server.
in previous releases use server\default\deploy folder for war placements
To change the port number in jBoss
Default Port Number : 8080
locate standalon xml file jboss/standalone/configuration/standalone.xml ; find
<socket-binding-group> , <socket-binding> and alter the values.
Apache Tomcat Server
On UNIX: bin/startup
On Win32: bin\startup
On UNIX: bin/shutdown
On Win32: bin\shutdown
Deploying the war file is handled automatically by the server software; so put your war file in webapps and then restart your server.
To change the port Number
Default Port Number : 8084 or 8080
Locate server.xml in \conf\ folder, search for <Connector tag and alter the port attribute to desired port number
On windows: Web Application Server Profile root\bin\startServer.bat
On Linux: Web Application Server Profile root/bin/startServer.sh
On windows: Web Application Server Profile root\bin\stopServer.bat WebSphere_Portal -user admin_userid -password admin_password
On Linux: Web Application Server Profile root/bin/stopServer.sh WebSphere_Portal -user admin_userid -password admin_password
Default Admin Port Number : 9060
Default Port Number : 9080
Hopefully you’ve found this useful, please share your thoughts we can expand the list to fulfill your suggestions.
Did you know...
IDRsolutions offers a whole range of online file converters to convert PDF and Microsoft Excel, Word and Office Documents to HTML5, SVG or image formats?
It is free to use for single file conversions and also includes Developer links if you want to use our commercial software for bulk conversions. Find out more on this page