<p>I am considering creating my own website using Java and am trying to decide what framework to use. However, doing a quick search for Java frameworks returns more than 50 to choose from!</p>

<p>My website is just going to be for my own enjoyment of building it in the beginning, but if it becomes popular, it would be good for it to have some scalability, or to at least be able to redesign for that.</p>

<p>What are the main differences between the more popular frameworks? Are there instances where one significantly outperforms the others? For example, high-traffic enterprise applications versus low-traffic small applications. I'm also wondering if some are much easier to learn and use than others.</p>

<p>Is there anyone who has experience with some of these frameworks and can make a recommendation? Does the sheer number of choices just serve as an early warning to avoid Java-based web development where possible?</p>

[{'answer_id': 24611, 'author': 'Henrik Paul', 'author_id': 2238, 'author_profile': 'https://Stackoverflow.com/users/2238', 'pm_score': 3, 'selected': False, 'text': '<p><em>Disclamer: I work at Vaadin (previously IT Mill)</em> </p>\n\n<p>If you are doing something RIAish, you might want to take look at <a href="http://vaadin.com" rel="nofollow noreferrer">Vaadin</a>. It\'s an open source UI-oriented AJAX framework that, to me, is nice to use (I come from a PHP background myself).</p>\n\n<p>There\'s a <a href="http://vaadin.com/wiki/-/wiki/Main/Comparing%20Vaadin%20with%20Icefaces" rel="nofollow noreferrer">case study</a> that compares doing the same application (i.e. two applications with the same set of features) in Icefaces and Vaadin. In a nutshell, it states that the UI development was considerably faster. </p>\n\n<p>Even though the study is hosted at the company\'s wiki, I can assure that it\'s objective, genuine and truthful, although I can\'t force you in believing me.</p>\n'}, {'answer_id': 24625, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>I think for your modest requirements, you just need to code up servlets or simple jsp pages that you can serve from Tomcat server. I dont think you need any kind of web-framework (like struts) for personal web-site data</p>\n'}, {'answer_id': 24640, 'author': 'bpapa', 'author_id': 543, 'author_profile': 'https://Stackoverflow.com/users/543', 'pm_score': 5, 'selected': False, 'text': "<p>My favorite is the Spring Framework. With 2.5 Spring MVC is soooo kick ass, with new annotations, convention over configuration features, etc.</p>\n\n<p>If you're just doing something super simple you could also just try using the regular Servlet API and not bother with a framework.</p>\n"}, {'answer_id': 24694, 'author': 'Russell Mayor', 'author_id': 2649, 'author_profile': 'https://Stackoverflow.com/users/2649', 'pm_score': 3, 'selected': False, 'text': '<p>I\'ve heard good things about the Spring Framework too.  In general, though, I\'ve been underwhelmed by most Java web frameworks I\'ve looked at (esp Struts).  </p>\n\n<p>For a simple app I\'d definitely consider using "raw" servlets and JSPs and not worry about adopting a framework.  If the servlets are well written, it should be straightforward in the future to port to a framework if necessary when the app grows in complexity.</p>\n'}, {'answer_id': 24707, 'author': 'jsight', 'author_id': 1432, 'author_profile': 'https://Stackoverflow.com/users/1432', 'pm_score': 7, 'selected': True, 'text': '<p>I\'ve used <a href="http://tapestry.apache.org/tapestry3/" rel="noreferrer">Tapestry 3</a>, <a href="http://wicket.apache.org/" rel="noreferrer">Wicket</a>, <a href="http://echo.nextapp.com/site/" rel="noreferrer">Echo</a>, and <a href="http://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html" rel="noreferrer">JSF</a> fairly extensively.  I\'d really recommend you look those over and pick the one that appears the easiest for you, and to most closely fit the way you prefer to work.</p>\n\n<p>Of them, the most comfortable for me to work with was <a href="http://wicket.apache.org/" rel="noreferrer">Wicket</a>, due to the lightweight nature of component building and simplicity of page templating.  That goes doubly so if you are using your own db code instead of Hibernate or some other framework (I was never completely happy with Wicket Hibernate or Spring Integration).</p>\n\n<p><a href="http://echo.nextapp.com/site/" rel="noreferrer">Echo</a> is great if you don\'t mind writing all of your layout in Java.  I know that is different now, but I still think that product serves a fairly narrow niche.  They change the development model with every major release as well it seems.</p>\n\n<p><a href="http://tapestry.apache.org/tapestry3/" rel="noreferrer">Tapestry</a> is a great product, but it is obviously very different from the others in terms of development model as it is led mainly by one dude.  Howard Lewis Ship is no doubt quite smart, but I am disappointed with their decision to basically forget backwards compatibility with each release.  Again, though, for your needs this may not matter, and I\'ve always found the Tapestry products pleasurable to work against.</p>\n\n<p><a href="http://www.oracle.com/technetwork/java/javaee/javaserverfaces-139869.html" rel="noreferrer">JSF</a> has been out for years, and still feels like something that a <a href="http://struts.apache.org/" rel="noreferrer">Struts</a> guy built to fix all of the problems of Struts.  Without really understanding all of the problems with Struts.  It still has an unfinished feel to it, although the product is obviously very flexible.  I use it and have some fondness for it, with great hopes for its future.  I think the next release (2.0) to be delivered in JEE6 will really bring it into its own, with a new template syntax (similar to Facelets) and a simplified component model (custom components in only 1 file... finally).</p>\n\n<p>And, of course, there are a million smaller frameworks and tools that get their own following (<a href="http://velocity.apache.org/" rel="noreferrer">Velocity</a> for basic needs, raw <a href="http://en.wikipedia.org/wiki/JavaServer_Pages" rel="noreferrer">JSPs</a>, Struts, etc).  I generally prefer component oriented frameworks myself, though.  </p>\n\n<p>In the end, I\'d recommend just taking a look at Tapestry, Wicket, and JSF and just picking the one that feels the best to you.  You\'ll probably find one that just fits the way you like to work very quickly.</p>\n'}, {'answer_id': 26071, 'author': 'ScArcher2', 'author_id': 1310, 'author_profile': 'https://Stackoverflow.com/users/1310', 'pm_score': 4, 'selected': False, 'text': '<p>I\'ve recently started using the <a href="http://www.stripesframework.org/" rel="nofollow noreferrer">Stripes Framework</a>. If you\'re looking for a request based framework that\'s really easy to use, but doesn\'t impose any limits on what you are doing I\'d highly recommend it.</p>\n\n<p>It\'s similar to struts, but it goes way beyond it. There are even some plugin projects that enable you to do use hibernate or jpa with very little configuration.</p>\n\n<p>There are a lot of good frameworks out there though I\'ve heard wicket is a good one as well, but I haven\'t used it.</p>\n'}, {'answer_id': 26920, 'author': 'Johannes K. Lehnert', 'author_id': 2367, 'author_profile': 'https://Stackoverflow.com/users/2367', 'pm_score': 5, 'selected': False, 'text': '<p>I recommend the component oriented <a href="http://wicket.apache.org" rel="nofollow noreferrer">Wicket</a> framework. It allows you to write your web application in plain old Java code, you can use POJOs as the model for all components and don\'t need to mess around with huge XML configuration files. </p>\n\n<p>I had successfully developed an online banking application with Struts when I discovered Wicket and saw how easy web application development can be!</p>\n'}, {'answer_id': 40194, 'author': 'Robert J. Walker', 'author_id': 4287, 'author_profile': 'https://Stackoverflow.com/users/4287', 'pm_score': 4, 'selected': False, 'text': '<p>UPDATE: Tapestry 5.2 is out, so it\'s not abandoned, as it previously appeared to be. My experience is with Tapestry 4, not 5, so your mileage may vary. My opinion of Tapestry has changed over the years; I have modified this post to reflect it.</p>\n\n<p>I can no longer recommend Tapestry as I did previously. Tapestry 5 appears to be a significant improvement, but my main issue with Tapestry is not with platform itself; it\'s with the people behind it.</p>\n\n<p>Historically, every major version update of Tapestry has broken backwards compatibility with extreme prejudice, far more than one might expect. This seems to be due to the incorporation of new coding techniques or technologies that require significant rewrites.</p>\n\n<p>Howard Lewis Ship (the principal author of Tapestry) is certainly a brilliant developer, but I can\'t say I care for his management of the Tapestry project. Development of Tapestry 5 began almost immediately after Tapestry 4 shipped. From what I can tell, Ship pretty much devoted himself to that, leaving Tapestry 4 in the hands of other contributors, who I feel are not nearly as capable as Ship. After having made the painful switch from Tapestry 3 to Tapestry 4, I felt that I had been abandoned almost immediately.</p>\n\n<p>Of course, with the release of Tapestry 5, Tapestry 4 became a legacy product. I wouldn\'t have a problem with this if the upgrade path wasn\'t so brutal <strong>again</strong>. So now our development team is in the rather unenviable position: We could continue to use an essentially abandoned web platform (Tapestry 4), make the heinous upgrade to Tapestry 5, or give up on Tapestry entirely and rewrite our application using another platform. None of these options is very attractive.</p>\n\n<p>Tapestry 5 is supposedly written so as to reduce the likelihood of update breakage from this point forward. A good example is in the page classes: in previous incarnations, page classes descended from a base class provided by Tapestry; incompatible API changes in this class were the cause of a large number of backward compatibility problems. In Tapestry 5, pages are POJOs which are enhanced at runtime with the "magic Tapestry fairy dust" via annotations. So as long as the contract for the annotations is maintained, changes to Tapestry won\'t affect your page classes.</p>\n\n<p>If this is right, then writing a new application using Tapestry 5 could turn out well. But personally, I don\'t feel like putting my hand on the burner again.</p>\n'}, {'answer_id': 55818, 'author': 'Kevin Wong', 'author_id': 4792, 'author_profile': 'https://Stackoverflow.com/users/4792', 'pm_score': 0, 'selected': False, 'text': "<p>Can't believe no one has mentioned GWT</p>\n"}, {'answer_id': 64232, 'author': 'Nathan Bubna', 'author_id': 8131, 'author_profile': 'https://Stackoverflow.com/users/8131', 'pm_score': 0, 'selected': False, 'text': '<p>My favorite way to go for really simple apps is Apache VelocityTools (VelocityLayoutServlet) with Velosurf (<a href="http://velosurf.sourceforge.net" rel="nofollow noreferrer">http://velosurf.sourceforge.net</a>).</p>\n\n<p>For more complex apps, Spring MVC or Struts 2.</p>\n'}, {'answer_id': 138903, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>All of them - that's the problem ;-)</p>\n"}, {'answer_id': 581117, 'author': 'Franklin', 'author_id': 67517, 'author_profile': 'https://Stackoverflow.com/users/67517', 'pm_score': 3, 'selected': False, 'text': '<p>My pick is Wicket!!</p>\n'}, {'answer_id': 581229, 'author': 'Tim Büthe', 'author_id': 60518, 'author_profile': 'https://Stackoverflow.com/users/60518', 'pm_score': 2, 'selected': False, 'text': '<p>Saying "use JSF" is a little to simple. When you decide to use JSF, you have to choose a component library on top of it. Will you use MyFaces Tomahawk, Trinidad, Tobago (<a href="http://myfaces.apache.org/" rel="nofollow noreferrer">http://myfaces.apache.org/</a>)? Or maybe ICEfaces (<a href="http://www.icefaces.org/" rel="nofollow noreferrer">http://www.icefaces.org/</a>)? Oh, and if you use ICEfaces, will you use JSPs or Facelets for your views?</p>\n\n<p>In my opinion it is to hard to tell. Nobody has the time to evaluate all the promising alternatives, at least in the projects I work on, because they are not big enough to do three month evaluation phases. However, you should look around for some that has a big and active community and isn\'t gone in a year. JSF is around for some time, and since it gets pushed by sun, it will be around for some more. I can\'t say if it\'s the best choice, but it will be a good one.</p>\n'}, {'answer_id': 1399740, 'author': 'ziftech', 'author_id': 170649, 'author_profile': 'https://Stackoverflow.com/users/170649', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://zkoss.org" rel="nofollow noreferrer">http://zkoss.org</a> - the good one</p>\n'}, {'answer_id': 1621746, 'author': 'opensas', 'author_id': 47633, 'author_profile': 'https://Stackoverflow.com/users/47633', 'pm_score': 4, 'selected': False, 'text': '<p>Haven\'t tried it myself, but I think</p>\n\n<p><a href="http://www.playframework.org/" rel="nofollow noreferrer">http://www.playframework.org/</a></p>\n\n<p>has a lot of potential...</p>\n\n<p>coming from php and classic asp, it\'s the first java web framework that sound promising to me....</p>\n'}, {'answer_id': 1979389, 'author': 'deamon', 'author_id': 238134, 'author_profile': 'https://Stackoverflow.com/users/238134', 'pm_score': 2, 'selected': False, 'text': "<p>For high traffic sites I'd use a framework that doesn't manage client state on the server - Wicket, JSF and Tapestry are managing client state on the server. I'd only use those frameworks (Wicket is my favourite) if the application should be more like a desktop application. But I'd try to use a more scalable and simple REST+AJAX approach though.</p>\n\n<p>Spring MVC would be a candidate, but since Spring MVC 3 it has a strange annotation overloaded programming model which doesn't use the benefits of static typing. There ore other ugly things like output parameters in methods combined with a usual return, so there are two output channels of one method. Spring MVC also tends to reeinvent the wheel and you'll have more to configure compared to other frameworks. I cannot really recommend Spring MVC though it has some nice ideas.</p>\n\n<p>Grails is a convenient way to use Spring MVC and other established frameworks like Hibernate. Coding is fun and you'll quickly see results.</p>\n\n<p>And don't forget that the Servlet API with a few little helpers like FreeMarker for templating is very powerful.</p>\n"}, {'answer_id': 2173874, 'author': 'Eelco', 'author_id': 445367, 'author_profile': 'https://Stackoverflow.com/users/445367', 'pm_score': 2, 'selected': False, 'text': '<p>My pick would be Wicket (for large projects and a predictable user base), GWT (for large projects that are mostly public facing) or just a service framework (like Jersey/ JAXRS) together with a JavaScript toolkit (for small to medium projects).</p>\n'}, {'answer_id': 2393474, 'author': 'Navi', 'author_id': 287727, 'author_profile': 'https://Stackoverflow.com/users/287727', 'pm_score': 2, 'selected': False, 'text': '<p>I recommend Seam, especially if you need persistence.</p>\n'}, {'answer_id': 3345667, 'author': 'Gilles', 'author_id': 403619, 'author_profile': 'https://Stackoverflow.com/users/403619', 'pm_score': 2, 'selected': False, 'text': '<p>I have evaluated quite a few frameworks and Vaadin (<a href="http://vaadin.com/home" rel="nofollow noreferrer">http://vaadin.com/home</a>) has percolated all the way to the top. </p>\n\n<p>You should at least give it a short evaluation. </p>\n\n<p>Cheers! </p>\n'}, {'answer_id': 3350167, 'author': 'Alex', 'author_id': 372894, 'author_profile': 'https://Stackoverflow.com/users/372894', 'pm_score': 0, 'selected': False, 'text': '<p>Try HybridJava - that is much simpler than anything else.</p>\n'}, {'answer_id': 3390351, 'author': 'Bob Yoplait', 'author_id': 226568, 'author_profile': 'https://Stackoverflow.com/users/226568', 'pm_score': 1, 'selected': False, 'text': '<p>See a few comments on some Java application Frameworks (second paragraph):</p>\n\n<p><a href="http://swiss-knife.blogspot.com/2009/11/some-java-application-servers.html" rel="nofollow noreferrer">http://swiss-knife.blogspot.com/2009/11/some-java-application-servers.html</a></p>\n'}, {'answer_id': 3394371, 'author': 'Ta Sas', 'author_id': 268098, 'author_profile': 'https://Stackoverflow.com/users/268098', 'pm_score': 3, 'selected': False, 'text': "<p>After a long while of testing various solutions, for me it turned out to be:</p>\n\n<ul>\n<li><p>Spring MVC for the presentation and\ncontroller layer (NO Spring Webflow though,\nbecause my flows are based on ajax)</p></li>\n<li><p>jQuery for all the client side stuff</p></li>\n<li><p>Spring Security for the, well, security aspect</p></li>\n<li><p>Hibernate / JPA2</p></li>\n<li><p>Jetty for the sake of continuations (comet)</p></li>\n</ul>\n\n<p>One month of an extraordinarily steep learning curve, but now I am happy.</p>\n\n<p>I would also like to mention that I was just a little step away from skipping all that Java stuff and learing Scala/LIFT instead. As far as I am concerned, everything in Java that is related with cutting edge web development (comet, async communication, <em>security</em> (yes, even with Spring Security!)) still is a bit of a hack (proove me wrong by evidence, pleeease!). To me, Scala/LIFT seems to be a more out-of-the-box and all-in-one solution.</p>\n\n<p>The reason why I finally decided <em>not</em> to go with Scala is</p>\n\n<ul>\n<li><p>as a project leader I must consider human resources and Java developers are much easier to find than Scala developers</p></li>\n<li><p>for most developers in my team, Scala's funcional concept, as excellent as it is, is hard to understand</p></li>\n</ul>\n\n<p>Cheers\nEr </p>\n"}, {'answer_id': 4932284, 'author': 'fmucar', 'author_id': 493823, 'author_profile': 'https://Stackoverflow.com/users/493823', 'pm_score': 0, 'selected': False, 'text': '<p>I would say <a href="http://vaadin.com" rel="nofollow">vaadin</a> or <a href="http://wicket.apache.org/" rel="nofollow">wicket</a></p>\n'}, {'answer_id': 5677149, 'author': 'user709798', 'author_id': 709798, 'author_profile': 'https://Stackoverflow.com/users/709798', 'pm_score': 1, 'selected': False, 'text': '<p>For <strong>quick and fancy</strong> GUI you can use JSF with <a href="http://livedemo.exadel.com/richfaces-demo/index.jsp" rel="nofollow">Richfaces</a> library.\nRichfaces UI components are easy to use and handy references available with code demonstration in the demo site. Probably later when your site has more data to handle and lot of information has to be transacted in database you can plug any database access framework (ORM) with it. </p>\n'}]
['https://Stackoverflow.com/questions/24596', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2628/']