我正在使用:org.mortbay.jetty.Server。配置服务器端口和响应头和查询参数
我initiallizing这样的服务器:
private static Server server = null;
server = (Server)applicationContext.getBean("HQSimJettyServer");
如何配置服务器端口的getBean方法之后?我可以在服务器构造函数中完成它,但由于我使用getBean,因此我无法在consructor中定义端口。
其次,我如何定义服务器响应以包含头和查询参数?
现在我使用:
return Response.status(response_code).build();
感谢。
你是否在使用Spring来获取bean? – 2012-02-02 18:36:03
是的,我使用org.springframework.context.support.AbstractApplicationContext.getBean(String name) – 2012-02-02 18:46:06