How to configure Glassfish 3.1 to host a web application
Does anyone know how to configure glassfish 3.1 to host a web application? I have a web app deployed in my glassfish server which i want to access from the internet. I do not want to install and c开发者_JS百科onfigure a web server/load balancer.
Any suggestions?
Thanks
If you can't see the server you deploy Glassfish to from the Internet, you can't see your app.
I doubt that you want to expose your app server directly to the Internet. Why don't you want to use a web server? Usually the web server is put in a DMZ and exposed to the Internet; it relays requests into the app server.
None of this has anything to do with Glassfish. It's about what you do with your servers and configuration.
Step 1: First get the required zip file from the internet
Sudo wget http://download.oracle.com/glassfish/5.0.1/release/glassfish-5.0.1.zip
Note: change the version as required
Step 2: unzip the file in the location where you want to install the glassfish server
unzip glassfish-5.0.1.zip
Step 3: Then go inside of the installed location in the /bin folder and run the asadmin file in the terminal using
./asadmin
Example: sagar@sagar-X556UA:~/software/glassfish3Ok/glassfish3/bin$ ./asadmin
Step 4: Then asadmin bash will open. Then type: start -domain inside of it
asadmin -> start-domain
Step 5: Then the glassfish will run in the default port. i.e., 8080, Goto google, or any browser and type:
Localhost:8080
And Glassfish admin panel will run in the port i.e., 4848 (if not you will see the port number of admin after you start the domain)
Localhost:4848
Integrate the glassfish server in the netbeans
- Select Tools -> Servers to open the Servers dialog.
- Click Add Server.
- Under Choose Server, select GlassFish v3 and click Next.
- Under Server Location, browse the location of your GlassFish Server installation and click Next.
- Under Domain Location, select Register Local Domain.
- Click Finish.
精彩评论