我想实现以下目标:
/webapp-context/Page-1 -> Handled by my custom "ContentServlet" /webapp-context/Another-Page -> Handled by my custom "ContentServlet" /webapp-context/Page-with-long-title -> Handled by my custom "ContentServlet" /webapp-context/_cms/<something>.zul -> Handled by ZK framework
我最近的尝试看起来像这样(web.xml 提取):
<servlet-mapping> <servlet-name>zkLoader</servlet-name> <url-pattern>*.zul</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>myContentServlet</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping>
不幸的是,现在我的内容 servlet 处理所有请求(我认为更具体的模式优先?)。
如果我将我的内容 servlet 映射到模式“/webapp-context/content/*”,则不存在冲突,但这不是我想要的。
谢谢你的时间。