我在 eclipse 4.3 中运行一个 tomcat 服务器,但我的服务器上的路径有问题。 e. G。此链接返回 404,但我确定该文件位于正确的位置(Web 应用程序的根目录)
http://localhost:8081/fooAppName/style.css
在eclipses tomcat server.xml
<Context docBase="Monitor" path="/fooAppName" reloadable="true" source="org.eclipse.jst.j2ee.server:Monitor"/></Host>
虽然我的 index.zul
文件运行良好(这是试图加载 style.css
的文件)
编辑:
但是这些路径在独立的 tomcat 部署中工作正常。
最佳答案
在 ZK 中声明 CSS 的方法有很多种,一种是添加到 zk.xml
<desktop-config>
<theme-uri>/resource/style/my.css</theme-uri>
</desktop-config>
另一种方法是在你的 zul 中添加这样的东西
<style src="/resource/style/login.css" />
关于eclipse 4.3 中的 Tomcat 服务器存在路径问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19154653/