构建 Web 服务战争的问题
我们参与 Web 服务以及基于 Java/J2EE 的 Web 门户的开发。其中使用tomcat6应用服务器。 Web 服务是使用 netbeans IDE 编写的,Web 门户是使用 Eclipse IDE 编写的。我们之前有开发和部署web java/j2ee web门户。我们使用在eclipse中创建一个web归档文件,选择项目->右键单击并导出WAR格式的文件,然后将war文件复制到tomcat6/webapps文件夹中当我们重新启动服务器时,tomcat6服务器会解开它并运行,但是当我们从net beans(即Web服务)获取war文件时,有时它不是不被察觉的,但有时它会解开战争,但结构会有所不同并且很少有文件会丢失,这会是什么问题以及我们如何解决。
请帮助我们
We are involved in the development of web services and also web portal which is Java/J2EE based. Which uses tomcat6 application server. The web services are written using netbeans IDE and the web portal is written using Eclipse IDE. We have development and deployment web java/j2ee web portals before.We used create a web archive file in eclipse, select the project->right click and export the file in WAR format and used to copy the war file to tomcat6/webapps folder and tomcat6 server would unwar it and run, when we restarted the server, but when we got the war file from net beans which is web services, its not unwared some times, but some times it un wars but the structure will be different and few files will be missing, what would be the problem and how to we resolve.
Kindly help us
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您确定 WAR 文件构建正确吗?尝试自己解压它(只需将扩展名重命名为 .zip 并打开它)并将文件结构与 Tomcat 解压的内容进行比较。可能不会有什么区别:war 文件可能构建错误。
正如 Sherif 所建议的,您可以使用 ant 或 Maven 来构建它。我不确定 netbeans 默认使用什么。
Are you sure that the WAR file was built correctly? Try unpacking it yourself (just rename the extension to .zip and open it) and comparing the file structure to what Tomcat unpacked. There will probably be no difference: the war file was probably built wrong.
As sherif suggested, you could use ant to build it, or maven. I'm not sure what netbeans uses by default.
也许你可以使用蚂蚁?
http://www.vaannila.com/ant/ant -sample-build-file-war-1.html
may be you can use ant ?
http://www.vaannila.com/ant/ant-sample-build-file-war-1.html