EasyJWeb中缺省URL映射转换器揭密
<iframe align="top" marginwidth="0" marginheight="0" src="http://www.zealware.com/csdnblog01.html" frameborder="0" width="728" scrolling="no" height="90"></iframe><div class="postText"> 在EasyJWeb对Ajax的支持中,通过引用类似的url可以动态得到调用服务器端业务组件的javascript脚本。另外,在基于EasyJWeb的CRUD应用中,也可以使用类似http://localhost:8080/user/edit/3的URL来编辑数据表中的某一条记录。究竟EasyJWeb中是如何处理这些URL的呢?本文将作简单的分析!在EasyJWeb中,有一个URL映射处理器,通过配置这个映射处理器可以非常简单地实现Web应用中类似URLRewrite的需求。映射处理器了代码如下所示:
<div style="padding-right: 5.4pt; padding-left: 5.4pt; background: #e6e6e6; padding-bottom: 4px; width: 95%; padding-top: 4px;">http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockStart.gifhttp://images.csdn.net/syntaxhighlighting/OutliningIndicators/ContractedBlock.gifpublicinterfaceIPathMappingRuler...{
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gif//对请求路径的解析;
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gifpublicStringgetModuleName();//得到模板的名称
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gifpublicMapgetParams();//得到模板缺省参数
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/InBlock.gifpublicStringgetCommand();//得到模板命令
http://images.csdn.net/syntaxhighlighting/OutliningIndicators/ExpandedBlockEnd.gif}
页:
[1]