Skip to content

mtdvd/websockethttp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

websockethttp

A Java based project that shows an example of using Spring's @RequestMapping annotation for serving not only http requests but also as a websocket endpoint.

Implementation

A Controller that needs to serve both websocket and http requests should simply extends WebSocketEndpoint

Running the example

Prerequisites

  • Java 7 is installed on your machine (For just running the example you may download only the JRE from here)
  • Environment variable JAVA_HOME is set with the location of a JAVA home dir

Building & Executing

Instructions:

To compile and run the tests, open your command line console in the project root and type:

mvnw install

For executing the demo:

  1. type:

    mvnw exec:java

  2. Open your browser and navigate to http://localhost:8080/index.jsp

Noteworthy:

To facilitate the compile process the project uses maven-wrapper-plugin.

To make the execution easy it uses embedded tomcat and Exec Maven Plugin

About

Project that demonstrates a way for using spring @RequestMapping annotation for websocket endpoint

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors