I use tomcat 4.1 to serve Dynamic PDF.

I have a servlet that send's PDF to the browser. When I call my servlet
directly (see URL below) the PDF gets render on the client correctly.

When I go through a <servlet-mapping> I get a Adobe alert �File does not
begin with �%PDF-��. The file gets corrupted.
it is not the code, my servlet was working with the servlet-mapping under
Tomcat 3.3 and the servlet-mapping is also working under Tomcat 4.1 for all
files except Pdf !

My servlet : com.bwax.ocian.web.renderer.RendererLookupServlet
My web.xml :
[..]
 <servlet>
  <servlet-name>rendererLookup</servlet-name>

<servlet-class>com.bwax.ocian.web.renderer.RendererLookupServlet</servlet-cl
ass>
 </servlet>
[..]
 <servlet-mapping>
  <servlet-name>rendererLookup</servlet-name>
  <url-pattern>/root/*</url-pattern>
 </servlet-mapping>
[..]

Calling URL :
/my_context/servlet/com.bwax.ocian.web.renderer.RendererLookupServlet?path=/
public/MyPdf.pdf
PDF OK.

Calling URL : /my_context/servlet/rendererLookup?path=/public/MyPdf.pdf
PDF OK.

Calling URL : /my_context/root/public/MyPdf.pdf
PDF BAD. (was working under Tomcat 3.3 and HTTP 1.0)


Reply via email to