小编axe*_*ose的帖子

使用嵌入式Jetty 7发布JAX-WS端点

任何人都可以帮忙吗?

我想使用嵌入式Jetty 7作为端点.这是我试过的:

public class MiniTestJetty {

@WebService(targetNamespace = "http")
public static class Calculator {

    @Resource
    WebServiceContext context;

    public int add(int a, int b) {
        return a + b;
    }
}


public static void main(String[] args) throws Exception {
    int port = 8080;
    Server server = new Server(port);

    Calculator calculator = new Calculator();
    Endpoint.publish("http://localhost:" + port + "/calc", calculator);

    server.start();
    server.join();
}
Run Code Online (Sandbox Code Playgroud)

}

但我无法确定这是否真的使用Jetty而不是默认的sun HttpServer.

一篇博客提到

 System.setProperty("com.sun.net.httpserver.HttpServerProvider",
       "org.mortbay.jetty.j2se6.JettyHttpServerProvider");
Run Code Online (Sandbox Code Playgroud)

但是在Jetty 7中似乎没有这样的HttpServerProvider.

感谢任何帮助,Axel.

java jax-ws embedded-jetty

8
推荐指数
1
解决办法
9374
查看次数

过滤功能少于+ F

当使用例如"less -iS + F service.log"观看日益增长的日志文件时,我想将显示限制为与特定模式匹配的行.

我试过类似的东西

less +F service.log | grep <pattern> | less +F
Run Code Online (Sandbox Code Playgroud)

这不起作用.也

cat < service.log | grep <pattern> | less +F
Run Code Online (Sandbox Code Playgroud)

不做我想做的事.看起来输入已经关闭,少则不显示更改.

如何将显示限制为与特定图案匹配的线条?

less-unix

8
推荐指数
2
解决办法
3109
查看次数

标签 统计

embedded-jetty ×1

java ×1

jax-ws ×1

less-unix ×1