Hello,
i buy the book "Professional XML Development with Apache Tools" from wrox
compiled the fop example in chapter 3 and don´t get it run in my Tomcat.
i rely on the browser, because i am engage in web development, and besides the url-pattern
in web.xml <snip value="code" src="web.xml">
<servlet-mapping>
<servlet-name>XMLServlet</servlet-name>
<url-pattern>/ch03/*</url-pattern>
</servlet-mapping>
</snip>
the request send from the browser to the webserver with
http://localhost:8080/ch03, nothing is happened, only showing Diretory Listing for the two files of xml and xslt on ch03, which the servlet is supposed to transform to pdf via xsl-fo.
The doctype of web.xml is the same i am using with other servlets in tomcat 4.29.
<snip value="code" src="web.xml">
<filter>
<filter-name>XSLT Filter</filter-name>
<filter-class>com.sauria.apachexml.ch3.XSLTFOPServletFilte r</filter-class>
</filter>
<filter>
<filter-name>FOP Filter</filter-name>
<filter-class>com.sauria.apachexml.ch3.FOPServletFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>FOP Filter</filter-name>
<servlet-name>XMLServlet</servlet-name>
</filter-mapping>
<filter-mapping>
<filter-name>XSLT Filter</filter-name>
<servlet-name>XMLServlet</servlet-name>
</filter-mapping>
</snip>
I have never worked with filter and filter-mapping before, so maybe here lays the problem ?
Everyone knows the trick how to use the XMLServlet in chapter 3?
My log tells everthing ok by starting tomcat
2004-09-09 17:52:54 HostConfig[localhost]: Deploying web application directory ch03
2004-09-09 17:52:54 StandardHost[localhost]: Installing web application at context path /ch03 from URL file:C:\Tomcat\webapps\ch03
2004-09-09 17:52:54 WebappLoader[/ch03]: Deploying class repositories to work directory C:\Tomcat\work\Standalone\localhost\ch03
2004-09-09 17:52:54 WebappLoader[/ch03]: Deploy class files /WEB-INF/classes to C:\Tomcat\webapps\ch03\WEB-INF\classes
2004-09-09 17:52:54 WebappLoader[/ch03]: Deploy JAR /WEB-INF/lib/DPDFGen.jar to C:\Tomcat\webapps\ch03\WEB-INF\lib\DPDFGen.jar
2004-09-09 17:52:55 WebappLoader[/ch03]: Deploy JAR /WEB-INF/lib/avalon-framework-cvs-20020806.jar to C:\Tomcat\webapps\ch03\WEB-INF\lib\avalon-framework-cvs-20020806.jar
2004-09-09 17:52:55 WebappLoader[/ch03]: Deploy JAR /WEB-INF/lib/batik.jar to C:\Tomcat\webapps\ch03\WEB-INF\lib\batik.jar
2004-09-09 17:52:55 WebappLoader[/ch03]: Deploy JAR /WEB-INF/lib/fop.jar to C:\Tomcat\webapps\ch03\WEB-INF\lib\fop.jar
2004-09-09 17:52:55 WebappLoader[/ch03]: Deploy JAR /WEB-INF/lib/xalan-2.4.1.jar to C:\Tomcat\webapps\ch03\WEB-INF\lib\xalan-2.4.1.jar
2004-09-09 17:52:55 StandardManager[/ch03]: Seeding random number generator class java.security.SecureRandom
2004-09-09 17:52:55 StandardManager[/ch03]: Seeding of random number generator has been completed
2004-09-09 17:52:57 StandardWrapper[/ch03:default]: Loading container servlet default
2004-09-09 17:52:57 StandardWrapper[/ch03:invoker]: Loading container servlet invoker
Thanks,
Hans Braumüller
http://crosses.net