Issues with UrlRewriteFilter 3.2 running on WebSphere

137 views
Skip to first unread message

RobGreen

unread,
Apr 14, 2009, 11:35:34 AM4/14/09
to UrlRewrite
Hi folks,

This is a long shot; I’m working on a project for a client at the
moment where we are using WebSphere on both our centralised
development environment and on our local development machines.

I have a small handful of rules configured, which work absolutely
perfectly when deployed to our local development machines, but when
deployed to the centralised development environment these cease to
function and generate errors along the lines of:

Error 404: SRVE0190E: File not found: /browse/childrens/10029/

I was wondering if you’ve ever heard of a similar scenario and what
the possible resolutions might be?

My web.xml looks like this:

<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</
filter-class>
</filter>
<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>

My urlrewrite.xml looks like this:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE urlrewrite PUBLIC "-//tuckey.org//DTD UrlRewrite 3.2//EN"
"http://tuckey.org/res/dtds/urlrewrite3.2.dtd">
<urlrewrite>
<rule>
<note>
This rule handles mappings from friendly category URLs to the
category navigation handler, using the category identifier.
</note>
<from>^/browse/?(.*)/(.*)/$</from>
<to type="passthrough">/navigate.do?ctx=$2</to>
</rule>
<rule>
<note>
This rule handles mappings from friendly content URLs to the
category navigation handler, using the content identifier.
</note>
<from>^/pages/?(.*)/(.*)/$</from>
<to type="passthrough">/navigate.do?pPageID=$2</to>
</rule>
<rule>
<note>
This rule handles mappings from friendly product URLs to the
product details handler, using the product SKU.
</note>
<from>^/products/?(.*)/(.*)/$</from>
<to type="passthrough">/displayProductDetails.do?sku=$2</to>
</rule>
<rule>
<from>^/events/$</from>
<to type="passthrough">/displayEventHome.do</to>
</rule>
<rule>
<from>^/offers/$</from>
<to type="passthrough">/offers.do</to>
</rule>
<rule>
<from>^/displayMailUs.do$</from>
<to type="permanent-redirect">/pages/contact-us/200000692/</to>
</rule>
</urlrewrite>


Cheers,

Rob.

Scott Rossillo

unread,
Apr 14, 2009, 4:45:06 PM4/14/09
to urlre...@googlegroups.com, RobGreen

My best guess is that you running your local development environment
in a non-staged mode (as in looking at local file system resources)
and the central development server in a staged deployment mode. The
most likely cause then is that the deployed war or ear is missing the
urlrewrite configuration file or the WebSphere central server is
picking up a previously deployed version of your web.xml file that's
missing the filter configuration.

Sorry for the WebLogic speak (staged vs non-staged) it's been a while
since I've used WebSphere but remember similar deployment strategies
being available.

Good luck,
~ Scott

Valéry Stroeder

unread,
Oct 30, 2015, 3:46:44 AM10/30/15
to UrlRewrite
No solution at this time?
I have the same issue. 
  • urlrewrite jar file in WEB-INF/lib
  • urlrewrite.xml contains some rules
  • web.xml define a filter and mapping

  • => It works fine locally (WAS 8.5)
  • => It does not work when deployed on test (WAS 8.5)
Any idea?
Reply all
Reply to author
Forward
0 new messages