Skip to content

What is the right way to deploy maven web app to tomcat 8.5? #154

Closed

Description

@user20161119

Maven web app did not show when want deploy the project to tomcat 8.5 server

image

Activity

  1. user20161119 commented on Dec 1, 2018

    @user20161119
    Author

    tomcat 8.5 config correct
    image

  2. kdvolder commented on Dec 3, 2018

    @kdvolder
    Member

    I'm afraid I can't be much help. STS nowadays mostly is driving towards supporting users working with boot apps packaged as jars, that use an embedded servlet container and, as such, you don't really deploy them to a standalone tomcat server (the server is packaged with the app, so the app and server are all in a single self-contained jar that requires no external dependencies whatsoever to run).

    I beleave it should still be possible to work with war-packaged apps, be they boot apps or legacy spring apps. But the tooling for that is basically just what you would get from Eclipse WTP and I am not really too familiar with them. Also it should be noted that Eclipse WTP is not included anymore in STS 4, so you would have to manually install that yourself from Eclipse update site.

    My advice to you would be... perhaps consider switching to developing your apps as boot apps packaged as jars with embedded servlet container. It simplifies many things, for example, all the hassles of dealing with setting up a server to which your apps can be deployed as well as all the complexities of Eclipse WTP tooling around magaging this server.

    I'm not sure how practical that would be for you, and I understand myabe its just not possible for you. But I'm afraid I can't be much help with figuring out how to work with Eclipse WTP. It is not really a part of STS anymore.

  3. user20161119 commented on Dec 4, 2018

    @user20161119
    Author

    Why the STS provide tomcat config option for users?

  4. BoykoAlex commented on Dec 4, 2018

    @BoykoAlex
    Contributor

    If you really want to run Spring Boot app on non embedded Tomcat you'd have to switch its packaging to WAR instead of JAR. You can follow this: https://spring.io/guides/gs/convert-jar-to-war/ perhaps.

  5. user20161119 commented on Dec 4, 2018

    @user20161119
    Author

    It's base on spring mvc legacy project,not boot-based project.so i need tomcat to run app

  6. martinlippert commented on Dec 4, 2018

    @martinlippert
    Member

    Hey @user20161119, please note that the Spring Tools 4 do not provide any specific tooling yet for legacy Spring projects that are not based on Spring Boot. We are working on opening up specific parts of the Spring Tools 4 tooling to non-Spring-Boot projects, but that is not yet done and released (and will probably take a little while for us to complete).

    If you want to help us with that, feel free to comment on #96 and let us know what specific features you would like to see for non-boot projects and feel free to attach a specific project as an example, if you like.

    In addition to that I will re-open this issue, so that we can double check what is missing in your case for deploying your legacy app to Tomcat. That should at least work somehow and could be especially interesting if people also install the STS3 add-on package into their STS4 distribution.

  7. added this to the 4.1.0 milestone on Dec 4, 2018
  8. user20161119 commented on Dec 5, 2018

    @user20161119
    Author

    @martinlippert thanks,i have based on spring 4.0 mvc maven project and some new boot based projects to maintain and develop.so i need to deploy project to tomcat within STS.I am using sts 3.x for a long time.really excited about the STS4.X,but i can not use it to maintain my all projects now.

  9. user20161119 commented on Dec 5, 2018

    @user20161119
    Author

    you would like to see for non-boot projects and feel free to attach a specific project as an example
    you just create a maven web project from STS4.X then config spring mvc dependency,and try to deploy to tomcat,you will figure it out that can not work.

  10. martinlippert commented on Jan 17, 2019

    @martinlippert
    Member

    I worked on this and added the necessary integration bits and pieces to the STS4 product definition, so that the next release will include the necessary m2e extensions to directly run/deploy those apps to a local Tomcat installation.

    Additional details how to fix an existing install can be found here:
    https://stackoverflow.com/questions/54183982/cannot-drop-project-into-the-development-server

  11. user20161119 commented on Jan 18, 2019

    @user20161119
    Author

    I worked on this and added the necessary integration bits and pieces to the STS4 product definition, so that the next release will include the necessary m2e extensions to directly run/deploy those apps to a local Tomcat installation.

    Additional details how to fix an existing install can be found here:
    https://stackoverflow.com/questions/54183982/cannot-drop-project-into-the-development-server

    thanks,i do not want to try the workaround.i am waiting for the new version release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions