如何复制特定的友好URL? [英] How to reproduce specific Friendly URL?

查看:95
本文介绍了如何复制特定的友好URL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试将JSP/XSLT应用程序重构为JSF.我们使用CMS进行内容管理.技术:使用Mojarra,PrimeFaces 2.2.1和Tomcat 6.29的JSF 2.0 数据结构的组织如下: 有网站. 网站包含频道. 频道包含内容. 网站,频道和内容均已翻译.

we are trying to refactor an JSP/XSLT application to JSF. We use a CMS for content management. Technologies : JSF 2.0 using Mojarra, PrimeFaces 2.2.1 and Tomcat 6.29 The organisation of the data structure is the following: There are Sites. Sites contain Channels. Channels contain Contents. Sites, channels and content are translated.

URL看起来像: http://whatever/firstSite http://whatever/firstSite/aChannel http://whatever/firstSite/aChannel/aSubChannel/myGreatContent

The URLs look like: http://whatever/firstSite http://whatever/firstSite/aChannel http://whatever/firstSite/aChannel/aSubChannel/myGreatContent

显示给用户的是翻译后的名称. siteName只出现一次,频道可以出现很多次,内容最多可以出现一次

It's the translated name who is showing to the user. The siteName only appears once, channel can appear many times and the content at maximum once

目前,我们使用commandLinks. 该操作调用将更新应用程序的上下文并返回页面ID.

For the moment, we use commandLinks. The action call update the context of the application and return the page id.

现在,我们要重现友好的URL,并将命令链接导航(POST)替换为h:link或outpulink(GET).

Now we want to reproduce the friendly URL and replace the commandlink navigation (POST) with h:link or outpulink (GET).

我通过JSF阅读了一些有关FURL的内容,并且看到了PrettyFaces的解决方案.

I read some stuffs about FURL with JSF and I saw the PrettyFaces's solution.

我可以用漂亮的面孔重现FURL还是应该由mysefl实现(如本文)?

Can i reproduce the FURL with prettyfaces or should i implemented by mysefl (like explains in this article) ?

使用h:link,我看不到actionListener或action属性,所以如何更新上下文?

And with h:link, i don't see actionListener or action attribute, so how i can update my context?

推荐答案

此交叉发布在:

This is cross posted on: http://ocpsoft.com/support/topic/how-to-reproduce-specific-friendly-url (Please follow up there.)

这篇关于如何复制特定的友好URL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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