Eclipse - add .jar to Dynamic Web Project

后端 未结 5 513
忘掉有多难
忘掉有多难 2020-12-08 14:55

When I use the follow code in eclipse Dynamic Web Project inside servlet , like this :

@WebServlet(\"/CreateCustomerServlet\")
publ         


        
5条回答
  •  一向
    一向 (楼主)
    2020-12-08 15:17

    Compile time & runtime are two different things. What ever you added right now is just for compile time & build purpose only. Runtime server tries to load the class. Add same jar to project lib folder also (Which will be packaged with WAR and available for the server at runtime).

提交回复
热议问题