gpt4 book ai didi

java - 无法在 Tomcat 7 和 Jboss 7 上部署 GWT 应用程序

转载 作者:行者123 更新时间:2023-11-28 22:43:23 24 4
gpt4 key购买 nike

我已经部署了一个 gwt 应用程序,它在开发模式下运行良好,但是当我尝试将它上传到 Tomcat 或 Jboss 时,我总是得到 404 页面,尽管服务器已打开。我尝试输入:http://localhost:8080/gwtexample 、http://localhost:8080/gwtexample/index.html 和127.0.0.1:8080/gwrexample` 但没有成功。

我把war文件放在jboss/standalone/deployment下在C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\ROOT下

and here is my web.xml <?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<servlet>
<servlet-name>requestFactoryServlet</servlet-name>
<servlet-class>com.google.web.bindery.requestfactory.server.RequestFactoryServlet</servlet-class>
<init-param>
<param-name>symbolMapsDirectory</param-name>
<param-value>WEB-INF/classes/symbolMaps/</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>requestFactoryServlet</servlet-name>
<url-pattern>/gwtRequest</url-pattern> </servlet-mapping>
<welcome-file-list>
<welcome-file>BfiWebTop.html</welcome-file></welcome-file-list>
</web-app>

最佳答案

war 文件应该直接放在 webapps C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps 文件夹中。 ROOT 文件夹也是一个网络应用程序。

请查看您的 warfile:

warfile/<hostpage>.html    //maybe index.html
warfile/webtop/ * //lots of HTML or JS files with silly names (GWT stongnames)
warfile/WEB-INF/web.xml
warfile/WEB-INF/classes/ * //your compiled server classes
warfile/WEB-INF/lib/ * //your libraries (including gwt)

关于java - 无法在 Tomcat 7 和 Jboss 7 上部署 GWT 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18407451/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com