views:

22

answers:

1

How do i integrate my glassfish v3 server with urlrewrite?Detailed step by step process would be appreciated.

The reason why i want to know this is that i am deploying a php application into my glassfish server using Quercus.

But Quercus relies on mod_rewrite in the Apache Server to provide URL rewrites and this is not available in glassfish.

So i need something like a mod_rewrite filter for glassfish.I figured this out at urlrewritefilter.Thats why i need to integrate that with glassfish.

I already saw some post on how to do this and it was not clear,so can somebody provide me steps here?

Thanks

A: 

Well, you have two options:

  • either front your GlassFish instance with Apache and use mod_rewrite
  • or use Tuckey's Url Rewrite Filter

I guess the former is not an option (or you wouldn't post this question). Regarding the later, you could adapt the solution given in Drupal on Glassfish with clean urls using Url Rewrite Filter. Basically, you'll have to:

  • Get Quercus's war and unpack it
  • Download the filter and unpack it inside Quercus (this will put the filter jar inside WEB-INF/lib and the urlrewrite.xml under WEB-INF)
  • Declare the filter in the web.xml (see the instruction)
  • "Port" your rewrite rules to the urlrewrite.xml file
  • repackage and deploy the war (or deploy it as an exploded archive)
Pascal Thivent