my dog learned polymorphism*
The moose likes Struts and the fly likes Struts2 redirect in div Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 redirect in div" Watch "Struts2 redirect in div" New topic
Author

Struts2 redirect in div

Andrea Wap
Greenhorn

Joined: Apr 16, 2012
Posts: 1
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>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 redirect in div