Quite a few things has changed in MOP:
- Repository
Thanks to Sonatype MOP releases are pushed to Maven Central Repository. - Source code
Sources has been migrated to github
Let me introduce you to showVersion option :-)
/**
* Create a WebServer that listen for secure tls/https requests
* @param port The port opened
* @param webResourcesPath the path to the web resource (ex: /var/www)
* @param secure true if https needs to be used.
*/
public GrizzlyWebServer(int port, String webResourcesPath, boolean secure)
Say like this:gws = new GrizzlyWebServer(PORT, ".", true);If you would try start() now you get exception.SSLConfig cfg = new SSLConfig();This constructor fetches configuration from default properties locations, which are:javax.net.ssl.trustStorejavax.net.ssl.keyStorejavax.net.ssl.trustStorePasswordjavax.net.ssl.keyStorePasswordjavax.net.ssl.trustStoreTypejavax.net.ssl.keyStoreType
URL resource = getClass().getClassLoader().getResource("test-keystore.jks");
if (resource != null) {
cfg.setKeyStoreFile(new File(resource.toURI()).getAbsolutePath());
} else {
// Couldn't find keystore, exit appropriately.
}
Once you have configuration ready give it to Grizzly:gws.setSSLConfig(cfg);And you are done, now do normal setup like providing GrizzlyAdapters and start().