You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Neil Curzon <ne...@gmail.com> on 2009/04/22 03:27:42 UTC

Creating an http post endpoint (json)

Hi all,

Some background: my app is divided into static html and some JSON services
exposed as individual servlets. I've been investigating migrating the static
HTML portion of the app into Wicket, and I'm having good results so far:
it's been easy to do, and the results are readable. So thanks for the
awesome framework.

Now I'm considering what to do about the vanilla servlets we're using as
JSON service endpoints. I had previously spiked Stripes as a possible
framework to do this, and had great results. I liked how the parameters
would just be specified as properties in an ActionBean class and you could
use the @Validate annotation right next to a field. So far I haven't been
able to find an equivalent way to do this in Wicket. I need a fixed URL that
I can do an HTTP Post to, preferably with easy validation. I'm using Wicket
1.3.5. I tried adding a form to a page, but the generated form action in the
HTML was not pretty ("?wicket:interface=:0:myForm::IFormSubmitListener::").
PageParameters don't seem to provide an easy validation mechanism.

I think that I could use Wicket and Stripes together (maybe an Action based
framework is inherently better for these post endpoints?), but before I
decide that I must use both (componentizing is painful in stripes), I'd like
to hear from the community if there's a good way to accomplish this in
Wicket..?

Thanks
Neil