开发者

Spring BeanWrapper for creation of HTTP form data?

I have a relative simple task to achieve, and wanted to ask if this is somehow possible using the spring BeanWrapper (or another capable library).

Situation is as following: I have a java bean and want 开发者_如何学运维it converted into HTTP form data (application/x-www-form-urlencoded). Spring is using the BeanWrapper for the other way round, converting form data into java beans. As result I would expect a Map, with the property paths as keys and their corresponding values mapped.

Thanks in advance! Markus


I had a similar problem a few years ago - I wanted to marshall java beans to xml and back and I couldn't find a library that was easy to use and fitted the bill.

I ended up developing my own BeanWrapper and XML marshaller and put it all in a multi module maven project.

I have been improving it ever since and now it can even be integrated with the spring framework and the spring-oxm module :)

Now, publicity aside, I think it can be of good use to you in converting from java to html and back, so I suggest you take a peek at Juffrou.

And if you have any questions regarding how it works, I'll be more than happy to respond.

Cheers

Carlos

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜