无法 运行 在 glassfish 服务器上部署应用程序
Unable to run deployed application on glassfish server
我已经在 Ubuntu 16.04 实例上成功安装了 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.
当我点击 link(HTTP 和 HTTPS)时,出现 404 错误。
我认为我的服务器一定有问题,但是所有关于设置 glassfish 服务器的教程似乎都是开箱即用的,所以我不知道为什么它在我的情况下不起作用.
我也找不到在哪里检查侦听器或服务器实例,以及它们的配置方式。
最后要提的是:我以前从未使用过 glassfish,我只需要测试 web 服务是否按预期工作,然后再将其发送给将自己部署的客户。
您在*.war 文件中使用什么目录结构?默认情况下,静态文件(如 index.html)应该放在根文件夹中——而不是在 WEB-INF 中。因此,典型的目录结构如下所示:
myWebApp/
WEB-INF/
web.xml
lib/
MyLib.jar
classes/
mypackage/
MyServlet.class
index.html
index.jsp
我使用 REST 部署 Web 服务,但遇到了同样的问题。
我的结构是:
MyProject
.idea
lib
out
src
MyApp
Helloworld
web
web.xml
WEB-INF
index.jsp
MyProject.iml
External Librairies
我关注了一个 tuto (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
上有一个网页
我已经在 Ubuntu 16.04 实例上成功安装了 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.
当我点击 link(HTTP 和 HTTPS)时,出现 404 错误。 我认为我的服务器一定有问题,但是所有关于设置 glassfish 服务器的教程似乎都是开箱即用的,所以我不知道为什么它在我的情况下不起作用. 我也找不到在哪里检查侦听器或服务器实例,以及它们的配置方式。
最后要提的是:我以前从未使用过 glassfish,我只需要测试 web 服务是否按预期工作,然后再将其发送给将自己部署的客户。
您在*.war 文件中使用什么目录结构?默认情况下,静态文件(如 index.html)应该放在根文件夹中——而不是在 WEB-INF 中。因此,典型的目录结构如下所示:
myWebApp/
WEB-INF/
web.xml
lib/
MyLib.jar
classes/
mypackage/
MyServlet.class
index.html
index.jsp
我使用 REST 部署 Web 服务,但遇到了同样的问题。 我的结构是:
MyProject
.idea
lib
out
src
MyApp
Helloworld
web
web.xml
WEB-INF
index.jsp
MyProject.iml
External Librairies
我关注了一个 tuto (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