9

I'm looking for a Java web framework that requires the most minimal amount of configuration for a very small app. Spring & Struts are definitely overkill here. This is an app that could be written without any framework at all but I would prefer to use a minimal MVC framework if I can find one.

Jonas
  • 121,568
  • 97
  • 310
  • 388
Chris Collins
  • 3,440
  • 5
  • 27
  • 24

9 Answers9

11

Stripes and ZTemplates are supposed to be pretty light.

jsight
  • 27,819
  • 25
  • 107
  • 140
  • +1. Stripes has the added benefit of being one of the easiest web frameworks to get up and productive quickly. – Ophidian May 16 '10 at 20:45
  • Stripes provides essentially the same functionality as Struts2 + conventions plug in. So I'll agree that it should be easier to get up and running but it is a pretty trivial lead. – Quaternion Jun 14 '11 at 21:55
7

Checkout spark. Its as mimimalistic as it can get.

Chris Seymour
  • 83,387
  • 30
  • 160
  • 202
joshua
  • 4,118
  • 3
  • 40
  • 53
6

Take a look on Apache Wicket.

Artyom Sokolov
  • 2,385
  • 3
  • 23
  • 34
3

grails requires a minimal amount of config since most of it has sane defaults.

Ray Tayek
  • 9,841
  • 8
  • 50
  • 90
  • "sane defaults"? What does that mean? – Chris Collins Apr 28 '09 at 05:04
  • I personally prefer the frameworks with insane defaults. ;) More seriously, I think he just meant that it doesn't require a lot of configuration (as the default configuration will work ok for most cases). – jsight Apr 28 '09 at 05:13
  • More than that - it uses the "convention over configuration" approach of Rails, which means that e.g. taglibs are incredibly easy to use - just have a class whose name ends with -Taglib in a specific folder, define a closure field in it, and that field's name can now, without any configuration, be used as a tag in your JSP equivalent. – Michael Borgwardt Apr 28 '09 at 06:34
  • 1
    Of course, grails is not lightweight by any stretch of imagination - it uses Spring and a number of other frameworks in the background, but it (quite successfully) tries to take away the pain and the overhead of using them in the way described above. – Michael Borgwardt Apr 28 '09 at 06:36
  • i should have said "convention over configuration" instead of "sane defaults" :( – Ray Tayek Apr 29 '09 at 04:07
3

I'd say that spring webmvc is pretty minimalistic and IMHO it's far from overkill. You don't have to include the whole spring Framework to do your things. To start a webmvc webapp you need ~3-4 jars IIRC. Don't underestimate the advantages of DI in regard of internal structure and testability.

I'd go for Spring WebMVC + JSP maybe combined with sitemesh. Later when you realize that you have more complicated stuff to do you could add Spring-Webflow and so on.

Patrick Cornelissen
  • 7,968
  • 6
  • 48
  • 70
1

The most minimal way to do a Java web app would be to use JSPs to display your content and Just plain Java in the back end.

This would require almost no configuration.

The only requirements for that is the J2SE and Tomcat for hosting.

jjnguy
  • 136,852
  • 53
  • 295
  • 323
0

try appfuce.com. this gives you full functional mvc webapplication based on your preference(struts2, spring or JSF). and it has sample login system implemented so that you will learn the core features of technologies involved

KItis
  • 5,476
  • 19
  • 64
  • 112
0

check out (µ)Micro and see if it is light enough :)

HTH - florin

Florin
  • 528
  • 5
  • 14
0

The lightest Java framework would be servlet + JSP. Try to use the latest released standards - Servlet 2.5 and JSP 2.1. Tomcat provides all you need:

  1. servlet container;
  2. JSPs (optional);
  3. Java runtime;
  4. web server to serve HTMLs.
topchef
  • 19,091
  • 9
  • 63
  • 102