Reputation: 312
I have a Spring Boot application that runs without any issues locally on my machine. However, when I try to run the same application in a Docker container, I encounter an issue where I can access the index.html containing the login page, but I face difficulties accessing the tiles.
I have configured my tiles.xml in following way:
<!DOCTYPE tiles-definitions PUBLIC
"-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"
"http://tiles.apache.org/dtds/tiles-config_3_0.dtd">
<tiles-definitions>
<definition name="pricingLayout" template="/jsp/MasterPage/pricingLayout.jsp">
<put-attribute name="head-includes" value="/jsp/MasterPage/empty-head.jsp" />
<put-attribute name="header" value="/jsp/MasterPage/header.jsp" />
<put-attribute name="menu" value="/jsp/MasterPage/menu.jsp" />
<put-attribute name="body" value="" />
<put-attribute name="param_global" value="/jsp/MasterPage/param_global.jsp" />
<put-attribute name="foot-includes" value="/jsp/MasterPage/empty-foot.jsp" />
</definition>
....
<definition name="accueil" extends="bdefinition">
<put-attribute name="body" value="" />
</definition>
...
</tiles-definitions>
My struts.xml is as follows:
<struts>
<constant name="struts.devMode" value="false" />
<constant name="struts.ognl.expressionMaxLength" value="2024" />
...
<action name="accueil" class="com.kbm.action.Accueil" method="execute">
<result name="success" type="tiles">accueil</result>
</action>
...
I have configured my application.properties as :
server.servlet.context-parameters.org.apache.tiles.CONTAINER_FACTORY=org.apache.struts2.tiles.StrutsTilesContainerFactory server.servlet.context-parameters.org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG=/WEB-INF/tiles.xml
Upvotes: 0
Views: 159