What is the difference between a web slice project and a dynamic web project?

What is the difference between a web fragment project and a dynamic web project on Eclipse? Which one would you recommend using to create a clean structural website?

+3


source to share


1 answer


IBM defines Web Slice as follows:

A web slice is a logical partition of a web application in such a way that the framework used in the web application can define all artifacts without requiring you to edit or add information to the web.xml

.

Further

Web Slice is a mechanism for defining or extending the deployment descriptor of a web application through a pluggable library that contains incremental deployment information (s web-fragment.xml

) and possibly any associated or related classes. The web slice is also packaged as a library (jar), with web-fragment.xml

a META-INF

. Hence a Web Slice Project is a Utility project, adding a Web Slice to it. A Web Slice facet allows you to add appropriate context-sensitive functionality to a project fragment.



In fact, Web Slices (introduced in the Servlet 3.x) allow the creation of (or fragment) is a reusable deployment descriptor web.xml

.

So, if you want to create a complete dynamic web application, create a "Dynamic Web Project" in Eclipse. Basically you need an web.xml

application server / container to deploy your application, and the "Dynamic Web Project" helps with this approach.

Hope this helps.

+4


source







All Articles