Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

ddanbi/java-server-framework

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

169 Commits
169 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java HTTP Server Framework

Implementing HTTP Server Framework using java socket.

How to use

0. install jdk 1.8++
1. deploy local repository
$ mvn install
2. create maven project

project structure

src/
 +- main/
     +- java/
     |   +- <source code>
     +- resources/
         +- config/
         |   +- application.properties
         +- static/
            +- <static files>
3. add dependency
<dependency>
    <groupId>org.sam.server</groupId>
    <artifactId>sam-server</artifactId>
    <version>1.0-SNAPSHOT</version>
</dependency>
4. initial setting

filename: resources/static/resource/application.properties

server.port=[port number]
file-buffer-size=[file buffer size]
# activate SSL
key-store=[keyStore name]
key-store.password=[keyStore password]
5. write main class
@ComponentScan
public class Application {
    public static void main(String[] args) {
        HttpServer.start();
    }
}
6. execute program
22:26:34.015 [main] INFO  org.sam.server.HttpServer - server started..
22:26:34.019 [main] INFO  org.sam.server.HttpServer - server port: 8081

About

HTTP Server Framework implementation in Java

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Java 99.1%
  • HTML 0.9%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.