Hi,
I am new to
struts applications. I have a link in my
jsp which points to an actionClass whcih has two forwards.
My struts-config has something like:
<action path="/TopicList" type="symc.simple.ui.actions.TopicAction"
name="searchForm"
scope="session">
<forward name="showSearchListData" path="/pages/searchList.jsp"/>
<forward name="showTopicData" path="/pages/details.jsp"/>
</action>
but whenever I click on any link in the jsp, like:
<html:link action="/TopicList.do?topic=something" title="" target="basefrm">List</html:link><br>
The contents (arrayList) is shown in the details.jsp, even though I have directed it to searchList.jsp, as given by the "else" section of my ActionClass:
The Action looks like this:
public class TopicAction extends ViewAction
{
...
public ActionForward execute(...)
{
if(<<some condition>>
{
//...do the processings
return mapping.findForward("showTopicData");
}
else
{
//initialize arraylist
request.getSession().setAttribute("resultList", arrayList);
searchForm.setResultList(arrayList);
return mapping.findForward("showSearchListData");
}
}
}
The funniest part is that "details.jsp" does not even have the <iterate> tag to handle arrayLists, but still the link content gets displayed there.
Please help me.
Regards,
Entheos