When a request is received by the container for a Servlet. The Servlet class is loaded via the Class Loader. the Java Servlet container calls the servlet’s constructor.
For JSP components we need both Servlet and JSP containers. All Java web containers (like Servlet Container, JSP Container) internally run on the top of JVM/JRE.
I'm looking for a light-weight and simple servlet container for rapid development. For example I want to write Java code without recompiling every time to see...
Virgo is available under the Eclipse Public License. WildFly (formerly JBoss Application Server) is a full Java EE implementation by Red Hat, division JBoss.
Jetty with the Jetty Maven plugin will be your guiding light.[EDIT]:
Original link was dead. Updated to new jetty-maven-plugin home.
4 Haziran 2015
11 kişi değerlendirdi
4 yorum
{"2_921e":{"state":{"logo":{"href":"//yandex.com.tr","isForeign":true},"form":{"action":"/search/","searchLabel":"Bul","hiddenInputs":[{"name":"lr","value":20815}]},"actions":{"advancedSearch":{"checked":false,"ariaLabel":"Gelişmiş arama"},"moreButtonProps":{"ariaLabel":"Daha fazla"},"cbir":{"name":"cbir","label":"Görsele göre arama","infoUrl":"//yandex.ru/promo/photosearch/index?source=landingdesk","isMacOS":false}},"userSection":{"loggedIn":false,"loginProps":{"loginUrl":"https://passport.yandex.com.tr/auth?retpath=%2F&origin=serp_desktop_auth_new","loginText":"Giriş yap","burgerAriaLabel":"Menü"}},"navigation":{"tabs":[{"id":"www","label":"Arama","url":"//yandex.com.tr","params":{"source":"tabbar"},"target":""},{"id":"images","label":"Görsel","url":"//yandex.com.tr/gorsel/search","params":{"text":"[$query]","noreask":"[$noreask]","nomisspell":"[$nomisspell]","parent-reqid":"[$reqid]","from":"tabbar"}},{"id":"video","label":"Video","url":"//yandex.com.tr/video/search","params":{"text":"[$query]","noreask":"[$noreask]","parent-reqid":"[$reqid]","from":"tabbar"}},{"id":"maps","label":"Haritalar","url":"//yandex.com.tr/harita","params":{"text":"[$query]","source":"serp_navig"}},{"id":"translate","label":"Çeviri","url":"//ceviri.yandex.com.tr","params":{"text":"[$query]","from":"tabbar"}}],"selectedTabId":"www"},"context":{"query":"контейнер сервлетов java","reqid":"1726401451891538-3965821788777881940-balancer-l7leveler-kubr-yp-vla-206-BAL","lr":"20815","counters":{"type":"b","data":{"$header":"0_lhtlz000","logo":"0_lhtlz001","login":"0_lhtlz003","usermenu":"0_lhtlz004","market-cart":"0_lhtlz006","more-button":"0_lhtlz007","cbir":"0_lhtlz008","$navigation":"0_lhtlz009","item":"0_lhtlz00i","tab-www":"0_lhtlz00b","tab-images":"0_lhtlz00d","tab-video":"0_lhtlz00f","tab-maps":"0_lhtlz00h","tab-translate":"0_lhtlz00j"}}},"loggedIn":false,"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"0_lhtlw01-0-1"},"ui":"desktop","service":"web","reqid":"1726401451891538-3965821788777881940-balancer-l7leveler-kubr-yp-vla-206-BAL","fast":{"name":"header-desktop"}}}}},"type":"header-desktop"},"2_lhtl0":{"state":{"thumbWidth":198,"thumbHeight":113,"videoPreviewHref":"http://www.youtube.com/watch?v=tyyQw0a0KgU","internalLinksTarget":"_blank","posterSrc":"//avatars.mds.yandex.net/get-vthumb/2805964/e23d0c7326cdc55a684fe774db792d35/564x318","videoSrc":"https://video-preview.s3.yandex.net/O3qiPQIAAAA.mp4","videoType":"video/mp4","duration":"7:11","isAdultContent":false,"isVertical":false,"logNode":{"name":"video","attrs":{"externalId":{"entity":"video","id":"8346694260993395541"},"hasVideoViewerLink":false,"hasFilmId":true}},"organicVideoMeta":{"created":"24 Haz 2023","views":"3 bin görüntüleme"},"i18nTexts":{"durationAriaLabel":"Süre","freshAriaLabel":"Yayınlandı"},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_lhtlw0d-0-1"},"ui":"desktop","service":"web","reqid":"1726401451891538-3965821788777881940-balancer-l7leveler-kubr-yp-vla-206-BAL","organic":1}}}},"type":"organic"},"2_lhtl1":{"state":{"answersUrl":"https://stackoverflow.com/questions/5186521/light-java-servlet-container-for-development#answers","type":"fact","tabsOptions":[{"id":"question","text":"Soru"},{"id":"bestAnswer","text":"En iyi yanıt"},{"id":"moreAnswers","text":"2 yanıt daha","shortText":"Daha fazla"}],"tabContents":{"question":{"construct":[{"type":"paragraph","content":[{"type":"text","content":"I'm looking for a light-weight and simple servlet container for rapid development. For example I want to write Java code without recompiling every time to see the changes in the browser. And I don't care for the servlet to be able to handle thousands of concurrent requests since I only need to install it on my local Windows machine and I will be the only one accessing it."}]},{"type":"paragraph","content":[{"type":"text","content":"I'd like this sort of thing for development, so that I can upload my war to my \"live\" servlet container that has a more mature servlet container (Tomcat etc)."}]},{"type":"paragraph","content":[{"type":"text","content":"Does anything like this exist?"}]}],"footerProps":{"date":1299175492,"numLiked":12,"numCommented":0}},"bestAnswer":{"construct":[{"type":"paragraph","content":[{"type":"text","content":"Jetty"},{"type":"text","content":" with the "},{"type":"text","content":"Jetty Maven plugin"},{"type":"text","content":" will be your guiding light."}]},{"type":"paragraph","content":[{"type":"text","content":"[EDIT]"},{"type":"text","content":":"},{"type":"text","content":"\nOriginal link was dead. Updated to new jetty-maven-plugin home."}]}],"footerProps":{"date":1433451229,"numLiked":11,"numCommented":4}},"moreAnswers":[{"construct":[{"type":"paragraph","content":[{"type":"text","content":"The most lightweight servlet container that I'm aware of is "},{"type":"text","content":"Jetty"},{"type":"text","content":". I'm not aware of any servlet container that provides automatic reloading of classes, but you can achieve this using the "},{"type":"text","content":"JRebel"},{"type":"text","content":" IDE plugin. JRebel is not free, but it's cheap, and well worth the money."}]}],"footerProps":{"date":1299175725,"numLiked":2,"numCommented":0}},{"construct":[{"type":"paragraph","content":[{"type":"text","content":"Yes, this is possible as you describe with Eclipse and "},{"type":"text","content":"WTP"},{"type":"text","content":". Eclipse will rebuild your code and redeploy it to (eg) tomcat or jetty on every save. It is also possible with the "},{"type":"text","content":"maven-jetty-plugin"},{"type":"text","content":", if you happen to be using maven."}]},{"type":"paragraph","content":[{"type":"text","content":"But the overhead of shutting down the server and bringing it back up is very slight (>1s) if you use Jetty. If you are happy to do this then you have many more options available to you, like custom build scripts, "},{"type":"text","content":"maven-cargo-plugin"},{"type":"text","content":", etc"}]},{"type":"paragraph","content":[{"type":"text","content":"I have recently switched away from trying to keep one long-running tomcat, to spinning up and killing dozens of instances of Jetty, and it's working fine."}]},{"type":"paragraph","content":[{"type":"text","content":"Edit: Beware, though, Jetty and Tomcat have different behaviour sometimes. For example the the "},{"type":"text","content":"serving of static files via the default servlet"},{"type":"text","content":"."}]}],"footerProps":{"date":1495531316,"numLiked":0,"numCommented":1}}]},"organic":{"faviconProps":{"src":"https://favicon.yandex.net/favicon/v2/https://stackoverflow.com","size":"m","pageNumber":0,"index":0},"title":"Light \u0007[Java\u0007] servlet container for development","pathProps":{"items":[{"url":"https://stackoverflow.com/questions/5186521/light-java-servlet-container-for-development","text":"stackoverflow.com"},{"url":"https://stackoverflow.com/questions/5186521/light-java-servlet-container-for-development","text":"light-java-servlet-container-for-development"}]},"faviconPosition":0,"subtitlePosition":1,"linkProps":{"url":"https://stackoverflow.com/questions/5186521/light-java-servlet-container-for-development"},"hostTitle":"Stackoverflow.com","description":"stackoverflow.com › light-java-servlet-container-for-development"},"extralinksProps":{"hidden":true,"directions":["bottom-end"],"items":[{"variant":"reportFeedback","reportFeedback":{"feature":"Блок ответов для разработчиков","title":"Bu yanıtta yanlış olan nedir?","checkBoxLabels":[{"value":"Yanıt sorguya uygun değil"},{"value":"Yanıt hatalı"},{"value":"Yanıttaki bilgiler eksik"},{"value":"Diğer"}]}}]},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_lhtlw0f-0-1"},"ui":"desktop","service":"web","reqid":"1726401451891538-3965821788777881940-balancer-l7leveler-kubr-yp-vla-206-BAL","fast":{"name":"article"}}}}},"type":"article"},"2_lhtl2":{"state":{"linksGroups":[{"type":"geo","links":[{"label":"Columbus","title":"Columbus","url":"//yandex.com.tr/tune/geo","logNode":{"name":"region"},"target":"_self","a11yLabel":"Bölgeniz Columbus","needRetpath":true}]},{"type":"feedback","links":[{"label":"Hata bildir","logNode":{"name":"feedback","attrs":{"behaviour":{"type":"dynamic"}}}}]},{"type":"settings","links":[{"label":"Ayarlar","url":"//yandex.com.tr/tune/search","logNode":{"name":"settings"},"target":"_self","needRetpath":true}]},{"type":"company","links":[{"label":"Hakkımızda","url":"https://company.yandex.com.tr","logNode":{"name":"about"},"target":"_blank"},{"label":"Ticari teklifler","url":"/search/direct?text=%D0%BA%D0%BE%D0%BD%D1%82%D0%B5%D0%B9%D0%BD%D0%B5%D1%80%20%D1%81%D0%B5%D1%80%D0%B2%D0%BB%D0%B5%D1%82%D0%BE%D0%B2%20java&filters_docs=direct_cm","logNode":{"name":"commercial"},"target":"_blank"},{"label":"Kariyer","url":"//yandex.com.tr/jobs/?utm_source=serp_turkie&utm_medium=footerlink&utm_content=career","logNode":{"name":"vacancy"},"target":"_blank"},{"label":"Kullanım lisansı","url":"//yandex.com.tr/legal/termsofuse/","logNode":{"name":"license"},"target":"_blank"},{"label":"Gizlilik Politikası","url":"//yandex.com.tr/legal/confidential/","logNode":{"name":"confidential"},"target":"_blank"}],"a11yHidden":true}],"reportFeedbackProps":{"feature":"Подвал","title":"Hata bildir","checkBoxLabels":[]},"isSearchApp":false,"hasExtralinks":true,"limitingSelector":".AliceFabButton","baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_lhtlw0g-0-1"},"ui":"desktop","service":"web","reqid":"1726401451891538-3965821788777881940-balancer-l7leveler-kubr-yp-vla-206-BAL"}}}},"type":"serp-footer"},"2_lhtl3":{"state":{"conditionLoadList":{"marketCart":false,"highchartsHighstock":false,"advProductGallery":false,"musicPlayer":false,"ecomRates":false,"photoViewer":false,"easterEggModal":false,"easterEggPlusGamesModal":false,"futurisFeedbackLoader":false,"darkmodeChangeDrawer":true},"reportFeedbackBaseProps":{"initEmail":"","metaFields":{"userAgent":"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)","userTestids":"1057327,186144,151171,13963,287509,338390,785125,1113182,1113098,1106614,1080657,1104207,1109666,1083582,1087741,1108593,912280","yandexuid":"2778819401726401451","uid":"0","queryText":"контейнер сервлетов java","reqid":"1726401451891538-3965821788777881940-balancer-l7leveler-kubr-yp-vla-206-BAL","searchSlices":["drawer_search_slice_cs"],"userRegionName":"Columbus","userRegionId":"20815","isChildAccount":false}},"extralinksPopupProps":{"abuseLink":"https://twitter.yandex.com.tr/search/abuse?sign=bb9f88bd5cc485874586536a547edcfb&keyno=0"},"isLoggedIn":false,"userMenuDialogProps":{"flag":"skin,feedback","host":"yandex.com.tr","lang":"tr","project":"serp","queryParams":{"utm_source":"search"},"retpath":"https%3A%2F%2Ftwitter.yandex.com.tr%2Fsearch%2F%3Ffilters_docs%3Ddirect_cm%26lr%3D20815%26text%3D%25D0%25BA%25D0%25BE%25D0%25BD%25D1%2582%25D0%25B5%25D0%25B9%25D0%25BD%25D0%25B5%25D1%2580%2B%25D1%2581%25D0%25B5%25D1%2580%25D0%25B2%25D0%25BB%25D0%25B5%25D1%2582%25D0%25BE%25D0%25B2%2Bjava%26ncrnd%3D76086","tld":"com.tr"},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"2_lhtlw0h-0-1"},"ui":"desktop","service":"web","reqid":"1726401451891538-3965821788777881940-balancer-l7leveler-kubr-yp-vla-206-BAL","fast":{"name":"lazy-load"}}}}},"type":"lazy-load"}}