struts2 s2hibernate - Struts 2 and Hibernate - What is the best practice? -


i using struts 2 , hibernate.

i know url params readily available in action class.

i have model class has getters , setters hooked database table through hibernate.

to link url params model class, have again use getters , setters in action class , create model object.

is best way ? not want add getters , setters @ 2 places.

any practice implement ?

use modeldriven.

http://struts.apache.org/development/2.x/docs/model-driven.html

that said, whether or not best idea kind of depends; means unless explicitly white- or black-list parameter values, entire object accessible. while may okay in case, it's not. think lot of people use different object expose values view , them forms.

note conversion between different objects same property names pretty trivial via things apache beanutils , things that.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -