Hi José, Try to change your method signature to this: public InputStream onActionFromStream(String myparam) throws IOException { ... }
and then, on your url, you can call it like this: http://localhost:8080/appname/getstring.stream/paramValue I hope this helps you. On Thu, Jul 24, 2008 at 7:00 AM, José Paumard <[EMAIL PROTECTED]> wrote: > Hello all, > > I need to send a StreamResponse (namely XML, JPEG or PDF) on a particular > request with parameters. > > I currently use the following solution : making a page with the right name, > getting request parameters in the classical way, through > requet.getParameter("p"),and sending the StreamResponse with the onActivate > method. > > I was wondering if there is a way to get the parameters automaticaly set > using the @Parameter annotation ? Of course, when onActivate is called, > those have not been set by T5. > > Thank you, > > José > > Here is the (simplified) code of my page : > > public class GetString { > > @Inject > private HttpServletRequest request; > public StreamResponse onActivate() { > return new StreamResponse() { > > public String getContentType() { > return "text/plain" ; > } > > public InputStream getStream() throws IOException { > String s = "My param = " + request.getParameter("myparam") ; > ByteArrayInputStream bis = new > ByteArrayInputStream(s.getBytes()) ; > return bis ; > } > > public void prepareResponse(Response response) { > } > } ; > } > } > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- Atenciosamente, Marcelo Lotif Programador Java e Tapestry FIEC - Federação das Indústrias do Estado do Ceará (85) 3477-5910 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]