• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts-Portal Dispatch Action Problem

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic