I like to add dynamically key-value pair properties in my Struts application. I have tried code below, but with no success...
Are there any (or other way) to make this kind of code to work.


Br

..............

public ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
{
ActionForward af;
// Fetching parameters with key from collection.
// Key to item is what mapping.getPath returns.
MenuHighlightItem menuItem = MenuParameters.getItemInfo
(mapping.getPath());
// Parameters found, let's add them to request.
if(menuItem != null)
{
if(menuItem.getData().length() != 0)
{
path += "&";
path += URLEncoder.encode("selected_leftbanner");
path += "=";
path += URLEncoder.encode(menuItem.getData());
}
}


  try
  {
     if(menuItem != null)
     {
         af = super.execute(mapping, form, request, response);
         af.setPath(path);
     }
     else
     {
         return super.execute(mapping, form, request, response);
     }
   }
   catch(Exception ex)
   {
        af = null;
   }
   return af;
}






_________________________________________________________________
Stay in touch with absent friends - get MSN Messenger http://messenger.msn.co.uk



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to