facebook

prevent servlet.jar deployment

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #250736 Reply

    sma202
    Member

    servlet.jar or servlet-api.jar is needed in the classpath for a web project. How do I prevent this from being deployed to tomcat using the deployment tool. The servlet engine uses it’s own jar and this jar should not be deployed.

    #250774 Reply

    Riyad Kalla
    Member

    Go to your MyEclipse-Web project settings and go to the Deployment tab, from there you can turn off the deployment of different kinds of libraries.

    #250835 Reply

    sma202
    Member

    @support-rkalla wrote:

    Go to your MyEclipse-Web project settings and go to the Deployment tab, from there you can turn off the deployment of different kinds of libraries.

    That tab doesn’t let you disable a specific jar, it’s basically all or nothing, ex: I can manually the jars copy myself or let myeclipse copy all jars in the buildpath. If the servlet.jar is in the buildpath, it will copy it along with all other application dependents jars.

    This does not seem correct, as the Servlet Spec. specifically states not to copy this jar into the application server. So the deployment process should ignore this jar or there should be an option to allow disabling of certain jars in the buildpath.

    #250855 Reply

    Riyad Kalla
    Member

    Deployment filtering is an enhancement we hope to address soon for exactly this reason. Just uncheck the build path deployments, that will stop the deployment of the J2EE libs. If you check the User Libs deploiyment, that will handle deploying the user libs (Spring, Hibernate, your own, etc.) and if you check External JARs that will deploy JARs that you are linking too outside of your project.

    #250981 Reply

    sma202
    Member

    This doesn’t work for me, all four checkbox options are needed by other projects I reference otherwise not all the jars get copied over into WEB-INF/lib. Dependent projects each have their own different ways of referencing jars and I can’t change that.

    #250996 Reply

    Riyad Kalla
    Member

    Then there is no workaround I can offer you for this issue right now. I will try and bump the priority on filtering to address this, but it will be up to management to prioritize it.

    #253267 Reply

    My solution was to put all necessary JARs into webapp/WEB-INF/lib directly and to disable the deployment of any other JAR. This way, I have exact control over what gets deployed and what isn’t.

    Another solution would be to collect all JARs you don’t want to deploy in an external project (which exists just for this purpose) and disable the deployment for JARs references from other projects.

    Put all the other JARs into a User Library (or the other way round, whatever is more simple).

    #253278 Reply

    Riyad Kalla
    Member

    digulla,
    This is a good solution to the issue, I’m also pushing to get deployment filtering in 5.0, but no word yet if it will make it.

Viewing 8 posts - 1 through 8 (of 8 total)
Reply To: prevent servlet.jar deployment

You must be logged in to post in the forum log in