无法在glassfish服务器上运行已部署的应用程序

时间:2016-08-17 15:24:41

标签: web-services glassfish

我已经在Ubuntu 16.04实例上成功安装了Glassfish。 我的web服务的部署也是成功的,当我启动应用程序时,我得到一个页面

Web Application Links
If the server or listener is not running, the link may not work. In this event, check the status of the server instance. After launching the web application, use the browser's back button to return to this screen.

当我点击链接(HTTP和HTTPS)时,我收到404错误。 我认为我的服务器一定有问题,但所有关于设置glassfish服务器的教程似乎都是开箱即用的,所以我不知道它为什么不是这样的。在我的情况下工作。 我也无法找到检查侦听器或服务器实例的位置,以及应该如何配置它们。

最后要提到的是:我以前从未使用过glassfish,我只需要测试一个webservice是否正常工作,然后再将其发送给自己部署的客户。

2 个答案:

答案 0 :(得分:1)

您在* .war文件中使用了哪种目录结构?默认情况下,静态文件(如index.html)应放在根文件夹中 - 而不是放在WEB-INF中。所以典型的目录结构如下所示:

myWebApp/
  WEB-INF/
    web.xml
    lib/
      MyLib.jar
    classes/
      MyPackage/
        MyServlet.class
  index.html
  index.jsp

答案 1 :(得分:0)

我使用REST部署Web服务,我遇到了同样的问题。 我的结构是:

$ hx53 <<< 'a32419fC'
a is: a c:a
a is: a3 c:3
a is: a32 c:2
a is: a324 c:4
a is: a3241 c:1
a is: a32419 c:9
a is: a32419f c:f
a is: a32419fc c:C

Your hexadecimal number is: a32419fc
$ hx53 <<< 'a32419`fC'
a is: a c:a
a is: a3 c:3
a is: a32 c:2
a is: a324 c:4
a is: a3241 c:1
a is: a32419 c:9

Your hexadecimal number is: a32419
$ hx53 <<< 'a32419XfC'
a is: a c:a
a is: a3 c:3
a is: a32 c:2
a is: a324 c:4
a is: a3241 c:1
a is: a32419 c:9
'X' is not a hexadecimal digit

Your hexadecimal number is: a32419
$

我关注了tuto(https://www.jetbrains.com/help/idea/2017.1/creating-and-running-your-first-restful-web-service-on-glassfish-application-server.html#d76541e113),我应该在MyProject .idea lib out src MyApp Helloworld web web.xml WEB-INF index.jsp MyProject.iml External Librairies 上有一个网页

相关问题