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]

Reply via email to