当我在eclipse中运行时,我的应用程序成功运行。 Widgetset编译成功。所有页面都按预期加载。 但是当我在eclipse中创建war文件并将其部署在Tomcat 7.0 / webapps文件夹中然后运行Tomcat时,我收到以下错误消息:
严重:异常修复docBase for context [/ 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中成功运行应用程序war文件。