wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts-Portal Dispatch Action Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts-Portal Dispatch Action Problem" Watch "Struts-Portal Dispatch Action Problem" New topic
Author

Struts-Portal Dispatch Action Problem

sally fikry
Greenhorn

Joined: Mar 22, 2007
Posts: 1
Hi,

I'm working on a JSR 168 portlet Struts project using Portal 5.1 and I'm using struts com.ibm.portal.struts.action.DispatchAction

In struts config, this Action is extending Dispatch Action
& i defined the parameter "userFunction" to hold the method value
as:
<action name="SearchUserForm" path="/DispatcherAction" scope="session" type="DispatcherAction class path" input="/jsp/UserSearchBasicModule/SimpleSearch.jsp" parameter="userFunction">

The userFunction is an action form parameter that is set using hidden field as:
<html:hidden property="userFunction" value="xxx"/>

Back in the Action class itself, I added a method named xxx as:

public ActionForward xxx(ActionMapping mapping,
ActionForm form, ActionRequest request, ActionResponse response)
throws Exception {
// actions to do
}

And the unspecified method as:

protected ActionForward unspecified(ActionMapping mapping, ActionForm form,
ActionRequest request) throws Exception {
// actions to do
System.out.println("User Function = "
+ searchForm.getUserFunction());
}
Although the above println displays the correct value each time the DispatcherAction is invoked, the xxx() method is invoked only at the first time then the unspecified() method each other time on the same session as it can't find the parameter.

Any Ideas?

Thank in advance,
Sally
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts-Portal Dispatch Action Problem