2016-08-17 58 views
1

我已成功在Ubuntu 16.04实例上安装Glassfish。 我的web服务的部署也succesfull,当我启动应用程序,我得到一个网页,上面写着无法在glassfish服务器上运行部署的应用程序

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的,我只需要测试一个web服务工作像预期其发送给客户谁将会部署它自己之前。

+0

一个网页是你能够登录到GlassFish管理控制台? 的https:// yourhost:4848 用户名:admin密码 :为adminadmin – Kenshin

回答

1

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

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

确实有在项目结构中的错误。谢谢! – stijnpiron

0

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

MyProject 
    .idea 
    lib 
    out 
    src 
     MyApp 
     Helloworld 
    web 
     web.xml 
    WEB-INF 
    index.jsp 
    MyProject.iml 
External Librairies 

我也跟着政党成员(https://www.jetbrains.com/help/idea/2017.1/creating-and-running-your-first-restful-web-service-on-glassfish-application-server.html#d76541e113),我应该对http://localhost:port/appArtefact/helloworld

+0

如果您有问题,请使用提问 – yass

相关问题