我使用Grizzly服务器创建了Jersey REST服务。
我在jquery中进行ajax调用,它适用于localhost:9998
public static final URI BASE_URI = UriBuilder.fromUri("http://localhost/").port(9998).build();
public static void main(String[] args) throws IOException {
SelectorThread threadSelector = startServer();
System.out.println(String.format("Jersey app started with WADL available at "
+ "%sapplication.wadl\nHit enter to stop it...",
BASE_URI));
System.in.read();
threadSelector.stopEndpoint();
}
2个问题:
1)我如何将index.html(jquery)设置为welcomepage,这样当我转到localhost:9998 / example /时,会显示index.html? (我正在使用grizzly所以没有web.xml)
2)我如何在localhost之外看到它?
感谢!!!!! 任何帮助将不胜感激!