Using struts 2 with no tags
Posted
by WannaAsk
on Stack Overflow
See other posts from Stack Overflow
or by WannaAsk
Published on 2010-05-18T12:28:02Z
Indexed on
2010/05/18
12:30 UTC
Read the original article
Hit count: 228
struts2
Hi everyone,
I wonder if you could guide me on this struts issue - I feel hopeless on this...
I am working on migrating our web application to a Struts 2 portlet (I'm using Struts 2.1.8). The thing is, I am forced to avoid struts tags because our application relies on Dijit widgets, which are omitted when using struts tags. So now I should implement the <s:form> tag using scriptlets.
My question is: how you would suggest I imitate the way struts handles the "action" attribute?
Right now it appears I should:
- Create a regular html form in my jsp.
- Get/create the ActionConfig object during onsubmit and set on it values which match my desired destination: class+method+result jsp.
- Execute the action I set in 2.
Would you recommend this? If so - is ActionConfig obtained from the session? Can I initiate an action execution from ActionConfig?
(Aletrnatively... generating an action url using struts' form.vm file - what do you say?)
I would appreciate any help on this - Thanks a lot in advance!!!
© Stack Overflow or respective owner