Solved

ServerSocket and SSLServerSocket

Posted on 2006-12-02
2
340 Views
Last Modified: 2006-12-02
dear all,

i'm trying to change from ServerSocket to SSLServerSocket but i got the error message :

 javax.net.ssl.SSLServerSocket is abstract; cannot be instantiated
        SSLServerSocket ss= new SSLServerSocket(port);
                            ^

here is what i want to change :

 ServerSocket ss = new ServerSocket(port);    change to ==>        SSLServerSocket ss= new SSLServerSocket(port);
       
is it possible to change? if can not what is the solution to do this work?
0
Comment
Question by:ikhmer
2 Comments
 
LVL 16

Accepted Solution

by:
Peter Kwan earned 500 total points
Comment Utility
SSLServerSocketFactory factory = (SSLServerSocketFactory) SSLServerSocketFactory.getDefault();
SSLServerSocket socket = (SSLServerSocket) factory.createServerSocket(port);
0
 

Author Comment

by:ikhmer
Comment Utility
thank You!!!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
sumHeights  challenge 17 59
sumDigits  challenge 7 59
countPairs challenge 7 57
Cipher Configuration on Apache HTTPD 4 15
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now