views:

1320

answers:

7

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.

A: 

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
That's not a framework. As I said, I specifically want to use an MVC framework.
Chris Collins
Well, sorry. You also asked for minimal. All MVC frameworks come with a little bit of baggage.
jjnguy
+3  A: 

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

Ray Tayek
"sane defaults"? What does that mean?
Chris Collins
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
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
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
i should have said "convention over configuration" instead of "sane defaults" :(
Ray Tayek
+6  A: 

Stripes and ZTemplates are supposed to be pretty light.

jsight
+1. Stripes has the added benefit of being one of the easiest web frameworks to get up and productive quickly.
Ophidian
A: 

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.
grigory
That's not a framework. I specifically want to use an MVC framework.
Chris Collins
Combining several technologies together by following common practices constitutes a framework, and as such it may attain minimal value...
grigory
+5  A: 

Take a look on Apache Wicket.

Artyom Sokolov
Because it's minimal or because you just like it?
Chris Collins
Because it is pretty simple to start developing web applications with Wicket and it requires a small amount of configuration to get it working. That's why I like it.
Artyom Sokolov
+2  A: 

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
A: 

Minimal? Java?

Together?

Ahahaha - you are joking :)

JDrago