• News
  • Knowledge Base
    • Tutorials
    • Resources
    • Courses
    • Minibooks
  • Deals
  • About
    • About JCGs
    • Advertising
    • Terms of Use
    • Privacy Policy

Examples Java Code GeeksExamples Java Code Geeks Java Examples and Code Snippets

  • Android
    • core
      • activity
      • animation
      • app
        • ActionBar
        • Activity
        • Fragment
        • ListActivity
      • Bluetooth
        • BluetoothAdapter
      • camera
      • content
        • BroadcastReceiver
        • ContentProvider
        • Intent
        • SharedPreferences
      • database
        • sqlite
          • SQLiteDatabase
      • Email
      • google maps
      • graphics
        • Canvas
      • hardware
        • Camera
        • Sensor
      • location
      • media
        • AudioManager
        • MediaRecorder
      • network
      • os
        • AsyncTask
        • Handler
        • SystemClock
      • PackageManager
      • preference
      • provider
        • ContactsContract
      • publishing
      • Service
      • socket
      • telephony
        • PhoneStateListener
        • SmsManager
        • TelephonyManager
      • text-to-speech
      • Thread
      • ui
        • AlertDialog
        • AnalogClock
        • Button
        • CheckBox
        • component
        • DatePicker
        • Dialog
        • DigitalClock
        • Drag and Drop
        • Events
        • ExpandableListView
        • GridView
        • HorizontalScrollView
        • ImageButton
        • ImageView
        • LinearLayout
        • ListView
        • Notifications
        • Password
        • ProgressBar
        • ProgressDialog
        • RadioButton
        • RadioGroup
        • RatingBar
        • RelativeLayout
        • ScrollView
        • Selector
        • Settings
        • Spinner
        • SurfaceView
        • TextBox
        • TimePicker
        • Toast
        • ToggleButton
        • WebView
      • view
        • Menu
        • OnClickListener
        • ViewPager
      • widget
        • AutoCompleteTextView
        • EditText
        • FrameLayout
        • SeekBar
        • SlidingDrawer
        • StackView
        • TextView
        • ViewFlipper
      • xml
    • games
      • canvas
      • main loop
      • OpenGL ES
  • Core Java
    • animation
    • apache
      • ANT
      • commons
        • beanutils
          • converters
            • ArrayConverter
        • cli
          • BasicParser
        • codec
          • binary
            • Base64
            • Base64OutputStream
        • csv
        • dbcp
          • BasicDatasource
          • PoolingConnection
        • io
          • comparator
            • CompositeFileComparator
            • DirectoryFileComparator
            • LastModifiedFileComparator
            • NameFileComparator
            • PathFileComparator
          • FilenameUtils
          • FileUtils
          • IOUtils
          • monitor
            • FileAlterationMonitor
        • lang3
          • CharUtils
          • ClassPathUtils
          • math
            • Fraction
            • NumberUtils
          • StringUtils
        • logging
          • Logfactory
        • net
          • CookieStore
          • FTPClient
          • URLClassLoader
          • URLConnection
      • lucene
    • applet
    • aspectj
    • beans
    • cajo
    • Character
    • class
    • Comperable
    • crypto
    • Design Patterns
      • decorator
      • strategy
    • Generics
    • Gradle
    • gson
      • GsonBuilder
      • stream
        • JsonReader
        • JsonWriter
    • io
      • BufferedInputStream
      • BufferedOutputStream
      • BufferedReader
      • BufferedWriter
      • ByteArrayInputStream
      • ByteArrayOutputStream
      • Console
      • DataInputStream
      • DataOutputStream
      • Externalizable
      • File
      • FileDescriptor
      • FileInputStream
      • FilenameFilter
      • FileOutputStream
      • FileReader
      • FileWriter
      • InputStream
      • InputStreamReader
      • IOException
      • ObjectInputStream
      • ObjectOutputStream
      • OutputStream
      • PrintWriter
      • RandomAccessFile
      • Serializable
      • StreamTokenizer
      • StringReader
      • StringWriter
    • json
      • Jackson
      • JSON.Simple
    • junit
    • lang
      • management
      • NumberFormatException
      • ProcessBuilder
      • ReferenceQueue
      • Runnable
      • Runtime
      • String
      • StringBuffer
      • StringBuilder
      • System
    • math
    • Mockito
    • net
      • Authenticator
      • ConnectException
      • CookieManager
      • CookieStore
      • DatagramPacket
      • HttpCookie
      • InetAddress
      • JarURLConnection
      • MalformedURLException
      • MulticastSocket
      • NetworkInterface
      • ServerSocket
      • Socket
      • SocketException
      • SocketTimeoutException
      • UnknownHostException
      • URISyntaxException
      • URL
      • URLClassLoader
      • URLConnection
      • URLDecoder
      • URLEncoder
    • nio
      • Buffer
      • ByteBuffer
      • channels
        • AsynchronousChannelGroup
        • AsynchronousFileChannel
        • AsynchronousSocketChannel
        • CompletionHandler
        • FileLock
        • ScatteringByteChannel
        • Selector
        • spi
          • SelectorProvider
      • CharBuffer
      • file
        • Path
        • WatchEvent
      • FileChannel
      • FileLock
      • MappedByteBuffer
    • PowerMockito
    • reflection
    • rmi
      • RemoteException
    • script
    • security
      • InvalidKeyException
      • MessageDigest
    • sql
      • BatchUpdateException
      • DatabaseMetaData
      • PreparedStatement
      • ResultSet
      • ResultSetMetaData
    • String
    • sun
      • net
        • httpserver
          • Filter
          • HttpServer
    • text
      • DecimalFormat
      • MessageFormat
      • ParseException
    • threads
      • UncaughtExceptionHandler
    • Time
    • util
      • ArrayList
      • Arrays
      • Base64
      • Calendar
      • Collections
      • Comparator
        • DefaultFileComparator
      • concurrent
        • ArrayBlockingQueue
        • atomic
          • AtomicBoolean
          • AtomicInteger
          • AtomicIntegerArray
          • AtomicLongArray
          • AtomicReference
        • CompletableFuture
        • CompletionService
        • ConcurrentHashMap
        • ConcurrentNavigableMap
        • ConcurrentSkipListMap
        • CopyOnWriteArrayList
        • CopyOnWriteArraySet
        • CountDownLatch
        • CyclicBarrier
        • DelayQueue
        • Exchanger
        • ExecutorService
        • ForkJoinWorkerThread
        • FutureTask
        • LinkedBlockingQueue
        • locks
          • AbstractQueuedSynchronizer
          • Condition
          • ReadWriteLock
          • ReentrantLock
        • Phaser
        • RecursiveTask
        • RejectedExecutionException
        • RejectedExecutionHandler
        • RunnableFuture
        • RunnableScheduledFuture
        • ScheduledExecutorService
        • ScheduledThreadPoolExecutor
        • Semaphore
        • SynchronousQueue
        • ThreadFactory
        • ThreadLocalRandom
      • Currency
      • Date
      • Deque
      • EnumMap
      • Function
        • Functional Interface
      • HashMap
      • HashSet
      • Hashtable
      • Iterator
      • jar
      • LinkedHashMap
      • LinkedHashSet
      • LinkedList
      • List
      • Locale
      • logging
      • MissingResourceException
      • Observer
      • Optional
      • Preferences
      • PriorityQueue
      • Properties
      • Queue
      • Random
      • regex
        • Matcher
        • Pattern
        • PatternSyntaxException
      • ResourceBundle
      • Scanner
      • Set
      • StringTokenizer
      • Timer
      • TimerTask
      • TreeMap
      • TreeSet
      • Vector
      • zip
        • FileInputStream
        • GZIPOutputStream
        • ZipInputStream
        • ZipOutputStream
    • xml
      • bind
        • JAXBContext
      • DOM
      • JDOM
      • parsers
        • DocumentBuilder
        • DocumentBuilderFactory
        • SAXParser
      • SAX
      • transform
        • Transformer
        • TransformerFactory
      • XPath
  • Desktop Java
    • accessibility
    • awt
      • datatransfer
      • dnd
      • event
      • font
      • geom
      • GridLayout
      • image
      • print
    • IDE
      • Eclipse
      • IntelliJ IDEA
      • NetBeans
    • imageio
    • JavaFX
      • ComboBox
      • DatePicker
      • Dialog
      • Event
      • FXML
      • ListView
      • Scene
        • Chart
        • Image
      • TableView
      • Text
    • JFreeChart
    • print
    • sound
    • swing
      • JButton
      • JCheckbox
      • JColorChooser
      • JDialog
      • JFileChooser
      • JFrame
      • JLabel
      • JLayer
      • JList
      • JRadioButton
      • JScrollPane
      • JSplitPane
      • JTabbedPane
      • JTable
      • JTextField
    • xuggler
    • youtube
  • Enterprise Java
    • Apache Camel
    • Apache Hadoop
    • Apache HTTP Client
    • Apache JMeter
    • Apache Solr
    • ejb3
      • Injection
      • Stateful Session Bean
      • Stateless Session Bean
      • Timer
      • Transactions
      • Web Services
    • gwt
    • hibernate
    • HikariCP
    • html
    • jetty
    • jms
    • jmx
    • jpa
    • jsf
    • JBoss Drools
    • JBoss WildFly
    • jsp
    • jstl
    • jws
    • Log4j
    • Logback
    • mail
    • Maven
    • mchange
      • c3p0
    • mybatis
    • naming
    • Ninja Web Framework
    • Quartz
    • rest
      • jersey
      • resteasy
    • Selenium
    • servlet
    • SLF4J
    • SNMP4J
    • spring
      • AOP
      • Batch
      • Beans
      • Boot
      • Integration
      • Data
      • JDBC
      • JPA/ORM
      • Mail
      • MVC
      • security
      • Session
      • SpEl
      • Web Flow
    • sql
      • rowset
        • JdbcRowSet
      • RowSetMetaData
    • Struts 2
    • TestNG
    • Tomcat
    • Vaadin
    • ws-soa
  • Java Basics
    • arrays
    • break/continue statement
    • data types
      • Enum
      • primitives
    • exceptions
    • for loop
    • generics
    • if/else statement
    • installation
    • jdt
    • Lambdas
    • operators
    • statics
    • String
    • switch statement
    • synchronized
    • try/catch/finally
    • web start
    • while loop
  • JVM Languages
    • Groovy
      • Grails
    • Scala
  • Software Development
    • Amazon AWS
    • Atlassian
      • Connect
    • ElasticSearch
    • Git
    • MongoDB
  • Web Development
    • JavaScript
      • React.js
      • Node.js
    • Python
  • DevOps
    • Docker
    • Kubernetes
    • Terraform

Home » Core Java » sun » net » httpserver » HttpServer

HttpServer

com.sun.net.httpserver.HttpServer Example

Ashraf Sarhan November 17th, 2014

Bipartite Graph

In this example we shall show you how to make use of HttpServer class, This class implements a simple HTTP server where we can start an embedded HTTP server which is bound to an IP address and port number and listens for incoming TCP connections from clients on this address. To process the incoming requests, we have to implement one ...

Read More »

What's HOT

  • Arraylist in Java Example – How to use arraylist
  • Enumeration Java Example
  • Hadoop “Hello World” Example
  • How to Start a Blog with WordPress (Step by Step Guide for Blog Hosting)
  • Java Abstract Class Example
  • Java convert int to string Example
  • Java JSON parser Example
  • Java Map Example
  • Java String Array Example
  • Java Switch Case Example
  • java.lang.NullPointerException Example – How to handle Java Null Pointer Exception
  • String.format Java Example
  • Substring Java Example

Courses

  • Advanced Java
  • Android UI Design – Basics
  • Apache HTTP Server Tutorial
  • Apache Lucene Fundamentals
  • Building web apps with Node.js
  • CouchDB – Database for the Web
  • Introduction to Nginx
  • Java Concurrency Essentials
  • Java Design Patterns
  • jOOQ – Type safe DB querying
  • Mockito Tutorial: Testing and Mocking with Mockito
  • MongoDB – A Scalable NoSQL DB
  • Redis a NoSQL key-value store
  • Spring Integration for EAI

Join Us

Join Us
With monthly unique visitors and over authors we are placed among the top Java related sites around. Constantly being on the lookout for partners; we encourage you to join us. So If you have a blog with unique and interesting content then you should check out our JCG partners program. You can also be a guest writer for Java Code Geeks and hone your writing skills!

Newsletter

117,758 insiders are already enjoying weekly updates and complimentary whitepapers!

Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

Receive Java & Developer job alerts in your Area

I have read and agree to the terms & conditions

Knowledge Base

  • Courses
  • Minibooks
  • News
  • Resources
  • Tutorials

The Code Geeks Network

  • .NET Code Geeks
  • Java Code Geeks
  • System Code Geeks
  • Web Code Geeks

Hall Of Fame

  • Android Alert Dialog Example
  • Android OnClickListener Example
  • How to convert Character to String and a String to Character Array in Java
  • Java Inheritance example
  • Java write to File Example
  • java.io.FileNotFoundException – How to solve File Not Found Exception
  • java.lang.arrayindexoutofboundsexception – How to handle Array Index Out Of Bounds Exception
  • java.lang.NoClassDefFoundError – How to solve No Class Def Found Error
  • JSON Example With Jersey + Jackson
  • Spring JdbcTemplate Example

About Java Code Geeks

JCGs (Java Code Geeks) is an independent online community focused on creating the ultimate Java to Java developers resource center; targeted at the technical architect, technical team lead (senior developer), project manager and junior developers alike. JCGs serve the Java, SOA, Agile and Telecom communities with daily news written by domain experts, articles, tutorials, reviews, announcements, code snippets and open source projects.

Disclaimer

All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners. Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries. Examples Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.
Examples Java Code Geeks and all content copyright © 2010-2023, Exelixis Media P.C. | Terms of Use | Privacy Policy | Contact
 | Do not share my Personal Information