The easiest way is to subclass HttpServletResponseWrapper.
Override the methods 'getOutputStream' and 'getWriter()' (not sure
getWriter is really used by static content serving, so you may not have
to code something there). Basically, make a ByteArrayOutputStream as the
result of getOutputStream, a
Hi,
we have an application developed using the following components as listed below
mysql 5.0.27
jdk 1.5.0_06
jre 1.5.0_06
tomcat5.5.20
Apache 2
phpMyAdmin 2.9.2
Servlets 2.3
JSP1.2
Our application is
Thanks Pierre,
for sure i will use that info, but now i am not writing a server, as i wrote
earlier, i use tomcat to test a proxy.
i am interested to see how my proxy behave when i send it the data chunked
or zip the data. and i want this to be in reference to regular files.
so basically all i w
Thanks Pierre,
for sure i will use that info, but now i am not writing a server, as i wrote
earlier, i use tomcat to test a proxy.
i am interested to see how my proxy behave when i send it the data chunked
or zip the data. and i want this to be in reference to regular files.
so basically all i w
Lior,
Basically, I think that you need to handle the response by yourself.
For instance, if you want to send an image :
***
RenderedImage rimg = ImageIO.read(new File(img));
OutputStream os = response.getOutputStream(); // <=== get the
response to be able to re-write it
Im
you were right, 10X.
now i am facing yet one more challenge.
i made filter to overwrite the response, i added headers as i want and it
works fine.
now i want to manipulate the content , to do zip or to chunk the data.
i tried to do StreamResponseWrapper that extends
HttpServletResponseWrapper,
Could it be you forgot to call filterChain.doFilter(request.response)
after adding your headers?
En l'instant précis du 04/07/07 14:18, lior grinfeld s'exprimait en ces
termes:
> Thanks for the tip, i used filters.
>
> now i facing other problem. if I use filter with request to static
> content (
Thanks for the tip, i used filters.
now i facing other problem. if I use filter with request to static content (
i did not write servlet for it , i want the defaultServlet to handle it)
for some reason i do not get the content, it looks like the defaultServlet
is doing nothing now, without filter
Either map to '/*' your custom servlet that returning the static content
with your custom headers, either write a servletfilter that add
additional header before processing request.
En l'instant précis du 04/07/07 09:52, lior grinfeld s'exprimait en ces
termes:
> Hi,
>
> i am new at using tomcat.
Hi,
i am new at using tomcat.
I want to use tomcat as a server to test our proxy. to do that i need to
manipulate the response headers, i did that without problems using servlets.
now i want to manipulate the http response headers or content of requests
for static content.
Ex. if i will do "GET m
10 matches
Mail list logo