hi Ivyteam,

I just created a websocket API by java in Ivy.

Here is my example:

import java.io.IOException;

import javax.websocket.OnClose;
import javax.websocket.OnError;
import javax.websocket.OnMessage;
import javax.websocket.OnOpen;
import javax.websocket.Session;
import javax.websocket.server.ServerEndpoint;

public class EchoWebSocket {
    public void onOpen(Session session) {
        System.out.println("onOpen::" + session.getId());        
    public void onClose(Session session) {
        System.out.println("onClose::" +  session.getId());

    public void onMessage(String message, Session session) {
        System.out.println("onMessage::From=" + session.getId());

        try {
        } catch (IOException e) {

    public void onError(Throwable t) {
        System.out.println("onError::" + t.getMessage());

I don't know how to access to this endpoint in Ivy like "http://localhost:8081/ivy/echo"? Please give me the feedback soon!

Thanks and best regards

Cuong Phan

asked 24.10.2018 at 08:43

cuongphan's gravatar image

accept rate: 0%


At the moment we do not support this in an IvyProject. You have to make a jar and put it to the webapps/ivy/WEB-INF/lib directory.


answered 30.10.2018 at 08:39

SupportIvyTeam's gravatar image

SupportIvyTeam ♦♦
accept rate: 77%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 24.10.2018 at 08:43

Seen: 1,513 times

Last updated: 30.10.2018 at 08:39