简体   繁体   English

Web Fragment Project和Dynamic Web Project有什么区别?

[英]What is the difference between Web Fragment Project and Dynamic Web Project?

What is the difference between Web Fragment Project and Dynamic Web Project on Eclipse? Eclipse上的Web Fragment Project和Dynamic Web Project有什么区别? Which one would you recommend to use for building a clean structural website? 您建议使用哪一个来建立一个干净的结构网站?

IBM defines Web Fragment as follows: IBM 将Web Fragment定义如下:

A web fragment is a logical partitioning of the web application in such a way that the frameworks being used within the web application can define all the artifacts without requiring you to edit or add information in the web.xml . Web片段是Web应用程序的逻辑分区,使得Web应用程序中使用的框架可以定义所有工件,而无需您在web.xml编辑或添加信息。

Furthermore: 此外:

A web fragment is a mechanism for either defining or extending the deployment descriptor of a web application by means of pluggable library jars that contain both the incremental deployment information (in the web-fragment.xml ) and potentially any related or relevant classes. Web片段是一种机制,用于通过可插入的库jar来定义或扩展Web应用程序的部署描述符,这些库包含增量部署信息(在web-fragment.xml )以及可能包含任何相关或相关的类。 The web fragment is also packaged as a library (jar), with the web-fragment.xml in the META-INF directory. Web片段也打包为库(jar),其中web-fragment.xml位于META-INF目录中。 Consequently, the web fragment project is essentially a Utility project, with the addition of a web fragment facet to it. 因此,Web片段项目本质上是一个实用程序项目,其中添加了一个Web片段构面。 The web fragment facet enables you to add relevant context-sensitive functionality to the fragment project. 通过Web片段构面,您可以向片段项目添加相关的上下文相关功能。

Essentially, Web Fragments (introduced in Servlet 3.x) allows you to create a reusable portion (or fragment) of the deployment descriptor, web.xml . 从本质上讲,Web Fragments(在Servlet 3.x中引入)允许您创建部署描述符web.xml的可重用部分(或片段)。

So, if you want to create a complete, dynamic web application, create a "Dynamic Web Project" in Eclipse. 因此,如果要创建完整的动态Web应用程序,请在Eclipse中创建“动态Web项目”。 Essentially, you need web.xml for the application server/container to deploy your application and "Dynamic Web Project" helps with this approach. 实际上,您需要web.xml来为应用程序服务器/容器部署您的应用程序,“Dynamic Web Project”有助于这种方法。

I hope this helps. 我希望这有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 动态Web项目与企业应用程序项目之间的区别 - Difference between dynamic web project and enterprise application project Eclipse动态Web项目IDE中的“Java Build Path”和“Deployment assembly”有什么区别? - What is the difference between “Java Build Path” and “Deployment assembly” in Eclipse dynamic web project IDE? Maven-archetype-webapp和Eclipse动态Web项目之间有什么区别 - what is the difference between maven-archetype-webapp and eclipse dynamic web project 构建和部署Java Web项目有什么区别? - What is the difference between building and deploying a Java Web project? simple project / lib和project / web / WEB-INF / lib有什么区别? - what is the difference between simple project/lib and project/web/WEB-INF/lib? 在pom.xml中添加javax-servlet依赖项与在项目构面中设置动态Web模块之间有什么关系或区别? - What is the relation or difference between adding javax-servlet dependency in pom.xml and setting Dynamic web module in project facets? Netbeans IDE中企业应用程序项目和Web项目应用程序之间的区别 - Difference between an Enterprise application project and a Web project application in Netbeans IDE Java动态Web项目 - Java Dynamic Web Project 动态 Web 项目中没有 javax - No javax in Dynamic Web Project 第一个动态Web项目 - First Dynamic Web Project
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM