Initializes the web.xml output writers based on the configured generation level. @throws JasperException If an I/O error occurs
()
| 1674 | * @throws JasperException If an I/O error occurs |
| 1675 | */ |
| 1676 | protected void initWebXml() throws JasperException { |
| 1677 | try { |
| 1678 | if (webxmlLevel >= INC_WEBXML) { |
| 1679 | mapout = openWebxmlWriter(new File(webxmlFile)); |
| 1680 | servletout = new CharArrayWriter(); |
| 1681 | mappingout = new CharArrayWriter(); |
| 1682 | } else { |
| 1683 | mapout = null; |
| 1684 | servletout = null; |
| 1685 | mappingout = null; |
| 1686 | } |
| 1687 | if (webxmlLevel >= ALL_WEBXML) { |
| 1688 | mapout.write(Localizer.getMessage("jspc.webxml.header", webxmlEncoding)); |
| 1689 | mapout.flush(); |
| 1690 | } else if (webxmlLevel >= FRG_WEBXML) { |
| 1691 | mapout.write(Localizer.getMessage("jspc.webfrg.header", webxmlEncoding)); |
| 1692 | mapout.flush(); |
| 1693 | } else if ((webxmlLevel >= INC_WEBXML) && !addWebXmlMappings) { |
| 1694 | mapout.write(Localizer.getMessage("jspc.webinc.header")); |
| 1695 | mapout.flush(); |
| 1696 | } |
| 1697 | } catch (IOException ioe) { |
| 1698 | mapout = null; |
| 1699 | servletout = null; |
| 1700 | mappingout = null; |
| 1701 | throw new JasperException(ioe); |
| 1702 | } |
| 1703 | } |
| 1704 | |
| 1705 | /** |
| 1706 | * Writes the accumulated servlet declarations and mappings to the web.xml output, |
no test coverage detected