title: Error when using Batik in a Servlet
body: <p>I am not sure if the problem lies with the apache server or batik. I am trying to convert svg to image in java using Batik in a servlet. When i instantiate SVGConverter in a servlet </p>
  
  <p><code>SVGConverter svgConverter = new SVGConverter()</code> </p>
  
  <p>Apache returns this error:</p>
  
  <pre><code>Jun 26, 2012 3:28:10 PM org.apache.catalina.core.StandardWrapperValve invoke
  SEVERE: Servlet.service() for servlet [FCImg] in context with path [/jsp_batik] threw  exception [Servlet execution threw an exception] with root cause
  java.lang.NoClassDefFoundError: org/apache/batik/apps/rasterizer/SVGConverter
  at FCImg.doPost(FCImg.java:49)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
  at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
  at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
  at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
  at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
  at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
  at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
  at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
  at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
  at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
  at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
  at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
  at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
  at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
  at java.lang.Thread.run(Thread.java:662)
  </code></pre>
  
  <p>I have included the correct jar files in the project and there doesnt seem to be any errors when compiling the java file that instantiates the SVGConverter object.</p>
  
  <p>Any suggestions are helpful, thanks!</p>
  
  <p>edit: I just had to include the necessary jar files (all the batik jar files) in the WEB-INF/lib folder. </p>