I'm using the latest version of stripes (got it from svn 4/9/2008) and I
have been having a lot of trouble with FlashScope. I got to a point where I
made a test case that I expected to work but it doesn't. Please let me know
what I'm doing wrong
When I click on the link on test1.jsp, test2.jsp always displays this:
[]
0
I'm expecting it to say this:
["This is a message."]
1
-------------------test1.jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes"
uri="http://stripes.sourceforge.net/stripes.tld"%>
<html>
<body>
<stripes:link
beanclass="com.haverlocke.tellah.web.actionbean.Test1ActionBean">add to
flash</stripes:link>
</body>
</html>
----------------- test2.jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="stripes"
uri="http://stripes.sourceforge.net/stripes.tld"%>
<[EMAIL PROTECTED] prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<html>
<body>
${actionBean.context.messages}<br/>
${fn:length(actionBean.context.messages)}
</body>
</html>
------------------- Test1ActionBean.java
public class Test1ActionBean implements ActionBean {
private ActionBeanContext context;
public ActionBeanContext getContext() {return context;}
public void setContext(ActionBeanContext context) {this.context =
context;}
@DefaultHandler
public Resolution goToTest2() {
context.getMessages().add(new SimpleMessage("This is a message."));
return new RedirectResolution(Test2ActionBean.class);
}
}
------------------- Test2ActionBean.java
public class Test2ActionBean implements ActionBean{
private ActionBeanContext context;
public ActionBeanContext getContext() {return context;}
public void setContext(ActionBeanContext context) {this.context =
context;}
@DefaultHandler
public Resolution goToTest2() {
return new ForwardResolution("/jsp/test2.jsp");
}
}
What am I doing wrong?
Thanks
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users