Is it bad practice to run a web application server directly on port 80/443

Solution 1:

You could do it, but you are going to run into performance problems first, and security problems second.

Having a "normal" high performance web server answering on port 80/443 and proxying requests to your app server is the way things are usually done. The "normal" server can handle things like static images, JavaScript and CSS much more easily than GlassFish, improving performance. It also will have numerous options for access control, caching, etc.

The Internet is full of sample configurations for setting up a web server (e.g. nginx or Apache) in front of GlassFish, Jetty, Tomcat, or whatever app server you want to use. Depending on whose EC2 AMI you use, one of these web servers may already be pre-configured and ready to go.