Details
Description
Using struts.jar from beta 1.0, the following renders correctly:
<html:link page="/listShipments.kr" name="LAST_SEARCH" scope="session">return
to search results</html:link>
Using struts.jar from beta 2.0, the same jsp code, throws:
java.lang.ClassCastException: java.lang.Integer
at org.apache.struts.util.RequestUtils.computeURL(RequestUtils.java:380)
at org.apache.struts.taglib.html.LinkTag.doStartTag(LinkTag.java:338)
at WEB_0002dINF.jsp...etc...
---------------------------------------
LAST_SEARCH is a HashMap produced by my ActionForm (SearchForm) and stored in
the user session, by my Action (SearchAction).
===== SearchAction (extends Action) =====
// Called from SearchAction.perform(....)
private void storeLastSearch(SearchForm sf, HttpServletRequest req) {
HttpSession session= req.getSession();
session.setAttribute("LAST_SEARCH", sf.getCurr());
}
===== SearchForm (extends ActionForm) =====
public Map getCurr() {
Map curr= new HashMap();
curr.put("inOutbound", inOutbound);
curr.put("location",location);
curr.put("errorCode",errorCode);
curr.put("mbol",mbol);
curr.put("status",status);
curr.put("sourceSystem", sourceSystem);
curr.put("fromDate",fromDate);
curr.put("toDate",toDate);
curr.put("orderBy", orderBy);
curr.put("count", count);
curr.put("startIndex", startIndex);
return curr;
}
private String inOutbound,
location,
errorCode,
mbol,
status,
sourceSystem
fromDate,
toDate,
orderBy,
submit,
query;
private Integer count = new Integer(5);
private Integer startIndex = new Integer(0);