How to specify custom bindings for DTD based code generation with JAXB2?
Don't. Convert the DTD to XSD using e.g. Trang.
seen from China

seen from United States
seen from United States

seen from Malaysia
seen from United States

seen from United States

seen from United States
seen from Australia
seen from Australia

seen from United States

seen from Canada

seen from Australia

seen from United States
seen from Brazil

seen from Philippines
seen from United States

seen from United States

seen from Malaysia

seen from Singapore

seen from United States
How to specify custom bindings for DTD based code generation with JAXB2?
Don't. Convert the DTD to XSD using e.g. Trang.
Maven 2 Jaxb 2 Generated Serializable Classes
If using maven, place the bindings.xjb in src/main/xjb.
<jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <jxb:globalBindings> <jxb:serializable/> </jxb:globalBindings> </jxb:bindings> Maven snippet: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <executions> <execution> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <packagename>my.package.name</packagename> <outputdirectory>${basedir}/src/main/generated-source</outputdirectory> <bindingFiles>bindings.xjb</bindingFiles> </configuration> </plugin>