Skip to content

[BUG] tomcat/files/web.xml is not a jinja template - so jsp_servlet settings don't work in pillar file #130

@TheBigBear

Description

@TheBigBear

Your setup

Formula commit hash / release tag

latest da3b324893676451fbe419cb11dff91372a9bb9e tag v0.19.6

Versions reports (master & minion)

salt master and minion Salt: 3007.1

Pillar / config used


Bug details

Describe the bug

The use of the lines below in the tomcat.sls file do not produce a /etc/tomcat9/web.xml file that contains the value '21' for compilerSourceVM and compilerTargetVM config.

web_xml:
     jsp_servlet:
       compilerSourceVM: 21
       compilerTargetVM: 21

the above lines should result in

        <init-param>
            <param-name>compilerSourceVM</param-name>
            <param-value>21</param-value>
        </init-param>
        <init-param>
            <param-name>compilerTargetVM</param-name>
            <param-value>21</param-value>
        </init-param>

Steps to reproduce the bug

add the following lines to tomcat.sls pillar file

web_xml:
     jsp_servlet:
       compilerSourceVM: 21
       compilerTargetVM: 21

Expected behaviour

This should result in adding these lines to the resulting /etc/tomcat9/web.xml file

        <init-param>
            <param-name>compilerSourceVM</param-name>
            <param-value>21</param-value>
        </init-param>
        <init-param>
            <param-name>compilerTargetVM</param-name>
            <param-value>21</param-value>
        </init-param>

Attempts to fix the bug

Additional context

I notice that the tomcat-formula provided tomcat/files/server.xml is actually a jinja template with {% %} lines for the replacements, but the web.xml file is not a jinja template at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions