struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebastien Leboucher (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4622) [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath
Date Thu, 31 Mar 2016 11:42:25 GMT

    [ https://issues.apache.org/jira/browse/WW-4622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15219766#comment-15219766
] 

Sebastien Leboucher edited comment on WW-4622 at 3/31/16 11:42 AM:
-------------------------------------------------------------------

Hi,
I can't use unpackWARs=true, because i can't change the deployment scheme (industrialized
in scripts).
But i can confirm it works fine in a local environment (with war exploded with the same config).

*This a small sample* : 

*part web.xml configuration* : 
	<context-param>
		<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
		<param-value>/WEB-INF/tiles.xml</param-value>
	</context-param>
		
	<listener>
		<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
	</listener>

*part tiles.xml configuration* : 

<!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
   
<tiles-definitions>

	<definition name="baseLayout" template="/abcdtrainssiteweb/rechercheitineraire/pl/screen/layout/baseLayout.jsp">
		<put-attribute name="css" value="commun/css/styles.css" />
		<put-attribute name="title" value="Template" />
		<put-attribute name="header" value="/contextappli/screen/layout/header.jsp" />
		<put-attribute name="body" value="/contextappli/screen/layout/body.jsp" />
		<put-attribute name="footer" value="/contextappli/screen/layout/footer.jsp" />
	</definition>

	<definition name="home" extends="baseLayout">
		<put-attribute name="title" value="test" />
		<put-attribute name="body" value="/contextappli/screen.jsp" />
	</definition>

Is it enough ?


was (Author: sebastien_leboucher):
Hi,
I can't use unpackWARs=true, because i can't change the deployment scheme (industrialized
in scripts).
But i can confirm it works fine in a local environment (with war exploded with the same config).

*This a small sample : *

*part web.xml configuration : *
	<context-param>
		<param-name>org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG</param-name>
		<param-value>/WEB-INF/tiles.xml</param-value>
	</context-param>
		
	<listener>
		<listener-class>org.apache.struts2.tiles.StrutsTilesListener</listener-class>
	</listener>

*part tiles.xml configuration : *

<!DOCTYPE tiles-definitions PUBLIC
       "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN"
       "http://tiles.apache.org/dtds/tiles-config_2_1.dtd">
   
<tiles-definitions>

	<definition name="baseLayout" template="/abcdtrainssiteweb/rechercheitineraire/pl/screen/layout/baseLayout.jsp">
		<put-attribute name="css" value="commun/css/styles.css" />
		<put-attribute name="title" value="Template" />
		<put-attribute name="header" value="/contextappli/screen/layout/header.jsp" />
		<put-attribute name="body" value="/contextappli/screen/layout/body.jsp" />
		<put-attribute name="footer" value="/contextappli/screen/layout/footer.jsp" />
	</definition>

	<definition name="home" extends="baseLayout">
		<put-attribute name="title" value="test" />
		<put-attribute name="body" value="/contextappli/screen.jsp" />
	</definition>

Is it enough ?

> [struts2-tiles-plugin] [2.3.28] [StrutsWildcardServletTilesApplicationContext] getRealPath
> ------------------------------------------------------------------------------------------
>
>                 Key: WW-4622
>                 URL: https://issues.apache.org/jira/browse/WW-4622
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Plugin - Tiles
>    Affects Versions: 2.3.28
>            Reporter: Sebastien Leboucher
>            Priority: Blocker
>
> Hi,
> Since version 2.3.28, the "struts2-tiles-plugin" API introduce a new listener (StrutsWildcardServletTilesApplicationContext).
> This listener make a call to ServletContext.getRealPath method. 
> However this method can't be used with a tomcat "unpackWARs=false" deployment scheme
(https://wiki.apache.org/tomcat/RemoveUnpackWARs).
> Cause when war file is not exploded, this method return always "null".
> So i get a NullPointerException during context loading !
> Could you restore a classpath context loading ? As in the previous version ?
> thanks



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message