-none- 2007-08-16 - By red phoenix
Back I know your meaning,but the question I want to Initialize in struts action,not in common class,because I want to get WebApplicationContext in struts action,and then I will transfer WebApplicationContext into dao to get data. I don't know if there is a init method in struts2 action? Any idea will be appreciated!
On 8/16/07, Leonidas Papadakis <it@(protected)> wrote: > > I think you can use the setters after you initialize your class > i.e.instead of > MyType mt = new MyType(...parameters.......); > to do : > MyType mt = new MyType(); > mt.setParam1().... > e.t.c. I am not exactly sure if this is what you are after though.... > Why do you want to do this ? > > Leon > > red phoenix wrote: > > If I use no-argument constructor,how can i do to initialize some > > information? > > Thanks > > > > > > On 8/16/07, Rec Floyd <rec.floyd@(protected)> wrote: > > > >> Hey,red.In my opinion, to use struts, you have to supply a no-argument > >> constructor.That is the point. > >> > >> -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------ > >> To unsubscribe, e-mail: user-unsubscribe@(protected) > >> For additional commands, e-mail: user-help@(protected) > >> > >> > >> > > > > >
|
|