You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ferran Parra <fe...@mubimedia.com> on 2003/02/19 15:46:54 UTC

TilesAction

Hello David Graham. You are absolutely correct, I have as the application base
Artimus from the Struts in Action book by Ted Husted which was made with
Struts 1.1b2. I grabbed the application struts-blank from struts 1.1b3 and
substituted the directory WEB-INF/lib, and now it works!

But I had another question -- I have an Action associated with a Tile. The
Action executes correctly and extends the TilesAction but the parameters
don't appear in the context of the Tile ... Any suggestions? The code for
the execute method is as follows:

  public ActionForward execute(
  ComponentContext context,
  ActionMapping mapping,
  ActionForm form,
  HttpServletRequest request,
  HttpServletResponse response)
  throws Exception {

  DateFormat df = DateFormat.getDateInstance (DateFormat.SHORT,
getLocale(request));

  context.putAttribute("date", df.format(new Date()));
  //request.setAttribute("date", df.format(new Date()));
  context.putAttribute("try", "tryContext");
  if (log.isInfoEnabled()) {
   log.info("ferran date:" + df.format(new Date()));
   log.info("ferran prova:" + (String)context.getAttribute("prova"));
  }
  return null;
 }
Thanks again for your help,
Ferran Parra

Departament de Noves Tecnologies
MUBIMEDIA S.L.
----------------------
ferran_p@mubimedia.com
Mallorca, 275, 1r 2a
08008 BARCELONA
T. (+34) 93 215 21 91
F. (+34) 93 215 41 21