You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Sergio Ramazzina <sr...@atlantic.it> on 2002/03/27 17:30:16 UTC

Same action called another time after having returned null

Hi to everybody,
 
I hope someone can clarify me about what is going on with my struts
application.
 
I'm writing an application that gives the users the opportunity to print
some data contained inside the browser page to a pdf file. That pdf file is
produced by an helper class called from a Struts action class. My action
class return null because the action itself produce the file, using the
helper class, and I don't need to forward the control to any page.
 
The pdf file is produced and displayed correctly also with IE but I've
noticed that the action that I call from inside my page to start the pdf
building and displaying is always started two times. It seems like someone,
in the process, calls it another time immediatly after the file has already
been displayed.
 
Below is an excerpt of the log just to clarify
 
==========
Processing a GET for /ArticoliWebComponentPrintPDFItemDetail
 Looking for Action instance for class
luxapp.web.luxphotos.ArticoliWebComponentPrintPDFItemDetailAction
  Double checking for Action instance already there
  Creating new Action instance
action:ArticoliWebComponentPrintPDFItemDetailAction started
[INFO]: building formatting object tree
[INFO]: [1]
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[INFO]: Parsing of document complete, stopping renderer
action:ArticoliWebComponentPrintPDFItemDetailAction forwards to: null]
action:ArticoliWebComponentPrintPDFItemDetailAction done.
==========
Processing a GET for /ArticoliWebComponentPrintPDFItemDetail
 Looking for Action instance for class
luxapp.web.luxphotos.ArticoliWebComponentPrintPDFItemDetailAction
action:ArticoliWebComponentPrintPDFItemDetailAction started
[INFO]: building formatting object tree
[INFO]: [1]
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[WARN]: table-layout=auto is not supported, using fixed!
[INFO]: Parsing of document complete, stopping renderer
action:ArticoliWebComponentPrintPDFItemDetailAction forwards to: null
action:ArticoliWebComponentPrintPDFItemDetailAction done.
==========
 
 
I've noticed that this behaviour stops if I return a valid forward
reference, and not null, from the action class but I also know that
returning a null from an action class is a permitted behaviour.
 
Is there someone that can help me to clarify my ideas about that?
 
Thanks in advance
 
Sergio