GlassFish v3
sun-java6-jdk ou openjdk-6-jdk
Instalar JVM - Java Virtual Machine:
- Habilitar repositório canonical no Synaptic
- apt-get install sun-java6-jdk sun-java6-jre openjdk-6-jdk
- Verificar versão do Java:
- java -version
- Verificar java path:
- which java
- Selecionar JVM default:
- sudo update-alternatives --config java
Instalar GlassFish V3:
- sudo -s
- cd /opt
- wget http://download.java.net/glassfish/v3/release/glassfish-v3.zip
- unzip glassfish-v3.zip
- useradd --system glassfish -d /opt/glassfishv3
- sudo chgrp -R admin /opt/glassfishv3
- sudo chown -R glassfish /opt/glassfishv3
- sudo chmod -R +x /opt/glassfishv3/bin/
- sudo chmod -R +x /opt/glassfishv3/glassfish/bin/
- /opt/glassfishv3/bin/asadmin start-domain domain1
Testes:
- http://localhost:8080 (Web Server)
- http://localhost:4848 (Administration)
Deploy, Undeploy, List e Stop por linha de comando:
- wget https://glassfish.dev.java.net/downloads/quickstart/hello.war
- asadmin deploy .../hello.war
- asadmin undeploy hello
- asadmin list-applications
- asadmin stop-domain domain1
Mudando as portas default:
- asadmin set server.http-service.http-listener.http-listener-1.port=8090
- asadmin set server.http-service.http-listener.admin-listener.port=8888
Security:
Http method | Behavior |
---|---|
GET | all can access GET method |
POST | only authenticated users with role javaee can access POST method |
Links: