File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts-Portal Dispatch Action Problem

 
sally fikry
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic