MAP | PageMixer Documents > Tutorial > Mixing with Servlet > Create 'Producer' | << | >> |
This section explains
how to customize creating Producer
with PageServlet
.
Class diagram in this section is shown below:
Classes which you must define are colored, and other are already defined.
In this tutorial, abbreviated class names are used. Complete names are shown below.
Notation | Full name |
---|---|
LoosePageState | jp.ne.dti.lares.foozy.pagemixer.parser.LoosePageState |
PageParser | jp.ne.dti.lares.foozy.pagemixer.mixer.PageParser |
PageServlet | jp.ne.dti.lares.foozy.pagemixer.servlet.PageServlet |
PageState | jp.ne.dti.lares.foozy.pagemixer.parser.PageState |
Producer | jp.ne.dti.lares.foozy.pagemixer.mixer.Producer |
ProducerFactory | jp.ne.dti.lares.foozy.pagemixer.servlet.ProducerFactory |
No tutorial specific class is explained in this section.
Please see "Render locale sensitively" section
for detail about creating Producer
from InputStream
of 'resource'.
In addtion to it,
please see API document and source code of it
about detail to define custom ProducerFactory
,
even though you may satisfy your needs
by default ProducerFactory
implementation
using PageParser
to create Producer
in almost all cases.
ProducerFactory
accepts
Servet initialize parameter(s) shown below:
name | description |
---|---|
producer.parser.pageState |
name of class implementing
PageState to parse target (HTML) files
with PageParser .
default value is name of LoosePageState . |
To use your custom ProducerFactory
,
you should specify "servlet.producerFactory
"
Servlet init-param in deployment descriptor
as shown below.
<init-param>
<param-name>
servlet.producerFactory
</param-name>
<param-value>
name of your custom ProducerFactory
</param-value>
</init-param>
ProdcerFactory
MAP | PageMixer Documents > Tutorial > Mixing with Servlet > Create 'Producer' | << | >> |