tags:

views:

41

answers:

1

Is there a simple framework for processing form submissions via a servlet? For my needs, a framework like STRUTS seems like over kill.

My ideal processor would be a servlet that converts form elements into a bean object, possibly using typing information in the form to help with the conversion. Does something like this exist or is there another solution out there geared toward simpler needs?

Thanks!

+1  A: 

Stripes is the most lightweight MVC framework which suits your needs.

A pure JSP solution would be <jsp:useBean id="bean" class="com.example.Bean" /> in combination with <jsp:setProperty name="bean" property="*" /> which sets the request parameters as bean properties matching the request parameter name. But this doesn't leave much room for abstraction and easy form processing (conversion, validation, changelisteners, invoking action, etc).

You may consider to use JSF, Sun's own MVC framework. Although this looks overwhelming and overkilled, it's after all actually simple to start with. Especially JSF2, part of JavaEE6, which ships with annotations so that there's no need for configuration headache with XML files. Here and here are some JSF2 tutorials.

BalusC
Thanks for your help. I think I may not have known how to express what I was looking for properly. I ended up choosing Wicket (http://wicket.apache.org/). It's more than I need right now, but the model it uses makes sense to me, I'll features for the future.
David