Business Logic Layerin Servlet and JSP

前端 未结 2 2563
广开言路
广开言路 2020-12-21 19:42

Recently I started to move from a .NET platform to J2EE. I\'m Eclipse to build JSP and Servlet applications which should use Business Logic layer.

The approach in .N

2条回答
  •  死守一世寂寞
    2020-12-21 19:52

    Yes, creating a separate Java project would be the way to go. Just a simple Java Project suffices. To use it in the dynamic web project, you should not only add it as a project in the Build Path. You also need to refer it as Java EE module in the dynamic web project. Eclipse will then take care about buiding and placing the JAR the right way.

    If you're on Eclipse 3.5 or older, then check the Java EE Module Dependencies section in the properties of the dynamic web project. You should add the Java project there.

    alt text

    If you're on Eclipse 3.6 or newer, then check the Deployment Assembly section which does essentially the same (it has just been renamed/grouped with other functions as per 3.6).

    alt text

提交回复
热议问题