You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ekberg Mats KONSULT <KO...@tullverket.se> on 2005/09/27 15:37:27 UTC
How to reference pages external to a webapp using Tiles
I am working on an export coltrol system for the swedish customs.
We are using struts and the tiles framework.
We would like to have a separate webapp (or even a plain html site) with
some standard templates for mainly menus. I have placed some images and
standardized jsp-files there, these files should be used for all webapps
developed.
The problem is when I try to reference those jsp-pages in my tiles
definitions file as absolute urls, "Cannot get request dispatcher for path
http://localhost:7001/std/tiles/common/layout.jsp.
The referencing webapp is at http://localhost:7001/ex/do/...
And the def looks like:
<definition name=".layout.ecs"
path="http://localhost:7001/std/tiles/common/layout.jsp">
Is there a solution to this or must the standardized pages included in each
webapp?
Regards Mats Ekberg
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: How to reference pages external to a webapp using Tiles
Posted by Laurie Harper <la...@holoweb.net>.
Ekberg Mats KONSULT wrote:
> I am working on an export coltrol system for the swedish customs.
> We are using struts and the tiles framework.
> We would like to have a separate webapp (or even a plain html site) with
> some standard templates for mainly menus. I have placed some images and
> standardized jsp-files there, these files should be used for all webapps
> developed.
>
> The problem is when I try to reference those jsp-pages in my tiles
> definitions file as absolute urls, "Cannot get request dispatcher for path
> http://localhost:7001/std/tiles/common/layout.jsp.
> The referencing webapp is at http://localhost:7001/ex/do/...
> And the def looks like:
>
> <definition name=".layout.ecs"
> path="http://localhost:7001/std/tiles/common/layout.jsp">
>
> Is there a solution to this or must the standardized pages included in each
> webapp?
If you're using Tomcat, you *might* be able to get this to work by
setting crossContext to true in the Context configuration [1]. I'm not
sure how 'supported' this usage would be though, and I have no idea how
you would do the same thing for any other servlet container.
L.
[1] http://jakarta.apache.org/tomcat/tomcat-5.5-doc/config/context.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org