Just include multiple entry points in your web.xml such as:

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd";>

  <servlet>
    <servlet-name>mapfish.print</servlet-name>
    <servlet-class>org.mapfish.print.servlet.MapPrinterServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>config.yaml</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>mapfish.print</servlet-name>
    <url-pattern>/pdf/*</url-pattern>
  </servlet-mapping>


  <!-- ********************************************************* -->

  <!-- What follows is an example on how having two set of       -->
  <!-- configurations in one servlet                             -->

  <servlet>
    <servlet-name>mapfish.print2</servlet-name>
    <servlet-class>org.mapfish.print.servlet.MapPrinterServlet</servlet-class>
    <init-param>
      <param-name>config</param-name>
      <param-value>config_cuijk_ruimtelijkeplannen.yaml</param-value>
    </init-param>
  </servlet>
  <servlet-mapping>
    <servlet-name>mapfish.print2</servlet-name>
    <url-pattern>/pdf_cuijk_ruimtelijkeplannen/*</url-pattern>
  </servlet-mapping>
</web-app>

Best regards,
Bart

-- 
Bart van den Eijnden
OSGIS - http://osgis.nl

On Nov 7, 2011, at 12:42 PM, Robert Buckley wrote:

> hi,
> 
> I have various applications which export to pdf using the mapfish print 
> add-on. The configuration of the export page is read from config.yaml.
> 
> I want to use a different config.yaml file for each application so that I can 
> use different variables to pass to the exported pdf....for example, for one 
> application I have a form which adds an Email address and username to the 
> exported map, and for another application I need just a comments box. If I 
> set up a config.yaml for a variable which consequently doesn´t get passed, 
> then an error message is thrown and the pdf is not exported.
> 
> So I basically need for each application a tailor made config.yaml file.
> 
> How do I set this up?
> 
> Any advice would be most welcome!
> 
> cheers,
> 
> Rob
> 
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1_______________________________________________
> Geoserver-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-users

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
Geoserver-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to