1) Create a file called snippet.jsp with just:
<h4>
And this line is from the target action.
</h4>
---------------------------------
2) Change result in your struts.xml to read
<struts>
<package name="default" extends="struts-default">
<action name="TargetAction" class="manning.chapterSix.TargetAction">
<result>/snippet.jsp</result>
</action>
</package>
</struts>
-----------------------------------------------
3) Just a comment: you are overriding the execute() method with the same functionality you
are inheriting from ActionSupport so your TargetAction can be abbreviated to:
package manning.chapterSix;
import com.opensymphony.xwork2.ActionSupport;
public class TargetAction extends ActionSupport {}
--------------------------------------------------
4) index.jsp stays the same:
<html>
<head>
<title>Action Tag</title>
</head>
<body>
<h3>
Action Tag
</h3>
<hr />
<h4>
This line is before the ActionTag invokes the secondary action.
</h4>
<s:action name="TargetAction" executeResult="true" />
</body>
</html>
Chris
-----Original Message-----
From: BrianNicely@aspca.org
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Wed, Sep 2, 2009 2:14 pm
Subject: Re: Action Tag java.lang.StackOverflowError
Is there an example you could point me to (that actually works) or help me
get my example working?
Brian E. Nicely
Programmer / Analyst
Knowledge Management
ASPCA®
1717 South Philo Road, Suite 36
Urbana, IL 61802
briannicely@aspca.org
P: 217-337-9700, 9799
F: 217-337-0599
www.aspca.org
The information contained in this e-mail, and any attachments hereto, is
from The American Society for the Prevention of Cruelty to Animals® (ASPCA
®) and is intended only for use by the addressee(s) named herein and may
contain legally privileged and/or confidential information. If you are not
the intended recipient of this e-mail, you are hereby notified that any
dissemination, distribution, copying or use of the contents of this
e-mail, and any attachments hereto, is strictly prohibited. If you have
received this e-mail in error, please immediately notify me by reply email
and permanently delete the original and any copy of this e-mail and any
printout thereof.
|