Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 redirect in div

 
Andrea Wap
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi!
i'm trying to load content of a div with a page loaded from success forward of an action in struts2;

But it's not working... it replaces THE WHOLE PAGE.
i want to see my form again, under my new jsp

is it possible?? what am i doing wrong?

thanks
Andrea


StartingPage.jsp
<div id='two' style="border: 1px solid yellow;">Initial content</div>
XXX
<s:form
id='theForm2'
cssStyle="border: 1px solid green;"
action='MyAction!step2'
method='post'
theme="ajax">

<input type='text' name='data' value='Struts User' />
<s:submit value="GO" theme="ajax" targets="two" />

</s:form >

MyAction.step2
public String step2() throws Exception {
return SUCCESS;
}

struts.xml
<action name="NuovaCassettaAction" class="mypackage.MyAction">
<result name="success">/pages/newPage.jsp</result>
</action>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic