What are the different ways to create a web-application in Java? Are there tools available other than straight-up servlets?
8 Answers
Open source web frameworks in Java and related view technologies:
- Tapestry
- Apache Cocoon
- Apache MyFaces
- Spring MVC
- Google Web Toolkit (GWT)
- Java Server Faces (JSF)
- Apache Struts
- Turbine
- Seam
- Makumba
- Java Server Pages (JSP)
- Stripes
- OpenXava
- JPublish
- wingS
- Strecks
- AribaWeb
- Echo
- RIFE
- Anvil
- WebOnSwing
- Click
- ThinWire
- Facelets
- Wicket
Check http://java-source.net/open-source/web-frameworks for more options and to read a brief overview of each one.
1 Comment
There are many many web frameworks for Java that allow you to build Web Applications. The vast majority are built on top of the Servlet API, but provide a layer of abstraction that you interact with instead of dealing with servlets directly
My favourite (for what its worth) is Wicket
Comments
An quite old and simple standard is CGI, and java can do that: http://www.apl.jhu.edu/~hall/java/CGI-with-Java.html
A more recommended today would be to use a web-framework. These usually abstract from the Servlet API and provide a ground for common patterns in web development.
Here is a quite long list of available choices: http://java-source.net/open-source/web-frameworks
1 Comment
In java there's also Facelets, JSF and many other frameworks, like Spring MVC.
1 Comment
JuanZe gives a good answer with the list of frameworks. Here's some more detail.
I'd say take a look at Struts, as it's one of the oldest and simplest frameworks. Struts v1 and v2 are two different beasts; Struts v1.0 was written mostly in a day, and you can learn it in an hour, and might be a very good introduction to web frameworks.
I currently use Spring, and wouldn't go back to Struts from there. The nice part of Spring is that it comes with the framework (Spring MVC), but there are dozens of other "nice to have" components that really help you out as you continue to learn 'em.
Other developers I work with complain regularly that Seam is the way to go. They've said some pretty intelligent things in the past, but I really like Spring, and our project is married to it.
Wicket also looks interesting; Spring is very heavy on XML, and Wicket gets rid of that, which is a very happy thought. That said, there's a pretty huge gain with some of the XML in Spring, so I'd worry about losing that.
As an addition, I'd take a look at Apache Commons, formerly called Jakarta Commons. It's a collection of useful libraries of stuff that probably should be included in the core Java API. Discursive has a wonderful book that walks you through it.
2 Comments
As a quickstart you could download Netbeans http://netbeans.org/ , you can try almost all kinds of J2EE technologies with a preconfigured app-server and database using included sample projects. It tooks only seconds to build and run and if you like analyze the code.
Comments
and here there is another one, a very young one this time: (µ)Micro. It is open source, Apache 2 license, and available on Github. I built this framework for fun and I was trying to port and simulate as much functionality as I could from my experience as a Sinatra/Rails developer. Cheers!