当我在 Eclipse 中运行它时,我的应用程序成功执行。Widgetset 编译成功。所有页面都按预期加载。但是,当我在 eclipse 中创建一个 war 文件并将其部署在 Tomcat 7.0/webapps 文件夹中,然后运行 Tomcat 时,我收到以下错误消息:
严重:为上下文修复 docBase 异常 [/SampleResponsiveApp]
java.io.FileNotFoundException: C:\Program Files\Apache Software Foundation\Tomcat 7.0\webapps\SampleResonsiveApp\VAADIN\widgetsets\com.example.sampleresponsiveapp.widgetset.SampleresponsiveappWidgetset\3A3F399A095112F8B58229BB835C5B7E.cache.js(访问被拒绝)。
SampleResponsiveApp.war 有以下内容:
1. META-INF
2. VAADIN
2.1 themes
2.1.1 sampleresponsiveapptheme
---- sampleresponsiveapptheme.scss
---- styles.scss
2.2 widgetsets
2.2.1 com.example.sampleresponsiveapp.widgetset.SampleresponsiveappWidgetset
2.3 images
3. WEB-INF
3.1 classes
3.2 lib
--- responsive-1.0.0.alpha1.jar [is the only jar file added and used by me]
--- other jar files got generated while exporting the war from eclipse
3.3 web.xml
以下是 web.xml 中的 servlet 配置
<servlet>
<servlet-name>Sampleresponsiveapp Application</servlet-name>
<servlet-class>com.example.sampleresponsiveapp.SampleResponsiveAppServlet</servlet-class>
<init-param>
<description>Vaadin UI class to use</description>
<param-name>UI</param-name>
<param-value>com.example.sampleresponsiveapp.SampleresponsiveappUI</param-value>
</init-param>
<init-param>
<description>Application widgetset</description>
<param-name>widgetset</param-name>
<param-value>com.example.sampleresponsiveapp.widgetset.SampleresponsiveappWidgetset</param-value>
</init-param>
</servlet>
<servlet-mapping>
<servlet-name>Sampleresponsiveapp Application</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Sampleresponsiveapp Application</servlet-name>
<url-pattern>/VAADIN/*</url-pattern>
</servlet-mapping>
请让我知道如何让我的应用程序战争文件在 Tomcat 7 中成功运行。