简体   繁体   中英

Java Remote Logging through HTTPS 443

If I have a java applet for a site, is it possible to do remote logging through HTTPS? how does this work?

I know there is java sockethandler, which could direct the log to a server, but what should I do in the server side, so I can get the log and save it to a file in the server. I try to create a logserver app and put it on server but if I specify port 443, it will say

 `java.net.BindException: Address already in use: JVM_Bind`

Can someone point me out and give some examples what should I do in the applet side and server side?

On that server TCP port 443 is already in use - therefore you have to use a different port.

SSL does work on any port - 443 is just the standard port for HTTPS. Therefore if you start your SSLServerSocket you can bind it to any port.

If your applet used port 1234, then in your Applet you can use an SSLSocket instance and let it connect to your server URL and port.

Note that most likely you are using a self-signed certificate. In that case you have to embed the custom certificate in your applet and set it as trusted certificate when opeing the SSL connection.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM