gwt不编译nocache.js项目警告

4ktjp1zp  于 2021-06-29  发布在  Java
关注(0)|答案(1)|浏览(410)

我在gwt2.9.0上运行我的应用程序
我在重建项目中做得很好。
从今天起,我在gwt的项目没有工作!
我从intellij ultimate那里查到的
html打开,但程序不编译。
我有个信息:

Dev Mode initialized. Startup URL: 
http://127.0.0.1:8888/One_armed_bandit.html
[WARN] 404 - GET /one_armed_bandit/one_armed_bandit.nocache.js (127.0.0.1) 328 bytes
   Request headers
      Host: 127.0.0.1:8888
      Connection: keep-alive
      User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.88 Safari/537.36
      DNT: 1
      Accept: */*
      Sec-Fetch-Site: same-origin
      Sec-Fetch-Mode: no-cors
      Sec-Fetch-Dest: script
      Referer: http://127.0.0.1:8888/One_armed_bandit.html
      Accept-Encoding: gzip, deflate, br
      Accept-Language: pl-PL,pl;q=0.9,en-US;q=0.8,en;q=0.7
   Response headers
      Date: Tue, 29 Dec 2020 04:07:15 GMT
      Content-Type: text/html; charset=ISO-8859-1
      Cache-Control: must-revalidate,no-cache,no-store
      Content-Length: 328

现在我不知道该怎么办了。我刚接触gwt。第一次接触时非常坚硬的工具。
下面是一些代码:my pom.xml:

<?xml version="1.0" encoding="UTF-8"?>

4.0.0

<groupId>groupId</groupId>
<artifactId>one-armed-bandit</artifactId>
<version>1.0-SNAPSHOT</version>

<build>
    <plugins>

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>8</source>
                <target>8</target>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies>
    <!-- https://mvnrepository.com/artifact/com.google.gwt/gwt-servlet -->
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-servlet</artifactId>
        <version>2.9.0</version>
        <scope>runtime</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.google.gwt/gwt-user -->
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-user</artifactId>
        <version>2.9.0</version>
        <scope>provided</scope>
    </dependency>

    <!-- https://mvnrepository.com/artifact/com.google.gwt/gwt-dev -->
    <dependency>
        <groupId>com.google.gwt</groupId>
        <artifactId>gwt-dev</artifactId>
        <version>2.9.0</version>
        <scope>provided</scope>
    </dependency>

</dependencies>

网站.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app 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"
         version="2.5"
         xmlns="http://java.sun.com/xml/ns/javaee">

  <!-- Servlets -->
  <servlet>
    <servlet-name>greetServlet</servlet-name>
    <servlet-class>eu.mrndesign.matned.server.GreetingServiceImpl</servlet-class>
  </servlet>

  <servlet-mapping>
    <servlet-name>greetServlet</servlet-name>
    <url-pattern>/one_armed_bandit/greet</url-pattern>
  </servlet-mapping>

  <!-- Default page to serve -->
  <welcome-file-list>
    <welcome-file>One_armed_bandit.html</welcome-file>
  </welcome-file-list>

</web-app>

单兵土匪.xml

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.9.0//EN"
  "http://gwtproject.org/doctype/2.9.0/gwt-module.dtd">
<module rename-to='one_armed_bandit'>
  <inherits name='com.google.gwt.user.User'/>

                         -->
  <inherits name='com.google.gwt.user.theme.clean.Clean'/>
                      -->
  <entry-point class='eu.mrndesign.matned.client.One_armed_bandit'/>

  <source path='client'/>
  <source path='shared'/>

  <add-linker name="xsiframe"/>
</module>

我还没有找到解决我的问题的办法。

xytpbqjk

xytpbqjk1#

检查是否在文件|项目结构|模块| | gwt中正确配置了gwt方面,并设置了目标web方面。

web方面还应该有web资源目录和源根集。

相关问题