URL是否在Wildfly中重写? [英] URL rewrite in Wildfly?

查看:208
本文介绍了URL是否在Wildfly中重写?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在背面使用RichFaces,PrimeFaces和Java构建了一个应用程序.我让结果(mysite.war)在Wildfly 8中运行.

I built up an app using RichFaces, PrimeFaces, and Java in the back. The outcome (mysite.war) I let run within Wildfly 8.

现在我的页面是这样的:

Now my pages are like this:

  1. www.mysite.com/index.jsf
  2. www.mysite.com/report.jsf?no=1
  3. www.mysite.com/report.jsf?no=2
  4. www.mysite.com/report.jsf?no=3
  5. www.mysite.com/report.jsf?no=4
  6. www.mysite.com/legal.jsf

我想将其更改为更具可读性的URL.特别是报道!按照示例顺序,我期待有这样的东西:

I would like to change that to more readable URLs. Especially the reports! Taking the example order, I am looking forward to having something like this:

  1. www.mysite.com
  2. www.mysite.com/report/turkey
  3. www.mysite.com/report/germany
  4. www.mysite.com/report/england
  5. www.mysite.com/report/spain
  6. www.mysite.com/legal

我相信我将不得不专注于Wildfly 8中的mod_rewrite等效项?有人知道如何逐步做到这一点吗?还是简短的解释?

I believe I will have to concentrate on the equivalent of mod_rewrite in Wildfly 8? Does anybody know a step-by-step how to for that? Or maybe a short explanation?

推荐答案

您可能还想看看Rewrite,它将成为PrettyFaces 4的核心.它更具动态性,如果您需要登录,可以拦截URL.

You may also want to look at Rewrite, which will be the core of PrettyFaces 4. It's more dynamic and can intercept URLs if you require login.

http://www.ocpsoft .org/java/migration-from-prettyfaces-to-rewrite-simplicity-meets-power/

http://www. mastertheboss.com/javaee/servlet-30/rewrite-a-java-ee-url-rewriting-solution

这篇关于URL是否在Wildfly中重写?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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