Running web app in both Jetty and Tomcat

后端 未结 4 1740
耶瑟儿~
耶瑟儿~ 2021-02-14 18:19

I have a web app which in production I run on Tomcat. It uses the MySQL connector, however it is not bundled up with the war, rather it is included under Tomcat\'s common lib di

4条回答
  •  梦毁少年i
    2021-02-14 18:54

    Additinally to previous answer: you have to add to your jetty plugin in maven config dependency:

    
                org.mortbay.jetty
                jetty-maven-plugin
                ${jetty.version}
                
                    blah-blah-blah
                    9966
                    
                        /
                    
                    ${basedir}/src/jetty-env.xml
                
                              
                    
                        postgresql
                        postgresql
                        8.4-701.jdbc4
                    
                
            
    

    And then you can use provided scope at main project dependencies. I did it right now, and it works. Thank you for your question (and Nishant too)

提交回复
热议问题