如何配置Apache的瓷砖,以读取由内jar文件的JSP? [英] how to configure apache tiles to read jsps from inside jar files?

查看:140
本文介绍了如何配置Apache的瓷砖,以读取由内jar文件的JSP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的Web应用程序的体系结构是高度模块化。我使用的Apache瓷砖作为模板的框架。该应用程序模块捆绑不同的jar文件,并把里面的WEB-INF / lib文件夹。因此,每个jar文件将包含它自己的瓷砖的配置文件(含瓷砖定义)和相关的JSP模板。

The architecture of my web application is highly modular. I am using apache tiles as the templating framework. The app modules are bundled as different jar files and put inside WEB-INF/lib folder. So each jar file will contain its own tiles configuration files (containing tiles definitions) and related jsp templates.

我使用CompleteAutoloadTilesL​​istener这是瓷砖-extras包从jar文件读取的瓷砖配置文件的一部分。但是jsp文件不被瓦片回升。当我访问任何定义,它找不到JSP模板文件。

I am using CompleteAutoloadTilesListener which is a part of tiles-extras package to read the tiles config files from the jar files. But the jsp files aren't picked up by tiles. When I access any definition, it couldn't find the jsp template file.

一个配置的变化也会解决这个问题?或者我应该继承的砖基类,让瓷砖从罐子里载入的JSP?

A configuration change will solve this problem? or should I subclass any tiles base class to let tiles load jsps from the jar?

推荐答案

别人遇到了这个问题之前,甚至的写了一篇博客吧

Someone else ran into this problem before and even wrote a blog about it

它提到这个问题是固定的,所以你应该能够使用相同的设置,并从classpath加载瓷砖的定义。

It mentions this issue that is fixed, so you should be able to use the same setup and load your tiles definitions from the classpath.

我没有测试它,但它看起来像一个明智的解决办法。

I haven't tested it, but it looks like a sensible solution.

这篇关于如何配置Apache的瓷砖,以读取由内jar文件的JSP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆