PlanetJava
Custom Search

java-stripes-user
[Top] [All Lists]

Re: clean urls without /action/*

Subject: Re: clean urls without /action/*
Date: Thu, 07 Feb 2008 00:19:22 +0000
how about this to insert a '/action' on any url that has no '.' and
reverse it back on the way out i.e if you have a jsp with
<s:link href="/action/user/login"/> it will be rendered as 
<s:link href="/user/login"/> 
so you develop everything in the app with /action/blah but it will
appear in the browser only as /blah. i have not tested it but that is
certainly what the docs allude to.
<rule match-type="wildcard">
    <name>catch stripes clean urls</name>
    <condition type="request-uri" name="nodots">!^.+\..+$</condition>
    <from>.*</from>
    <to>/action/$1</to>
    <outbound-rule>
        <from>^/action.*</from>
        <to>$1</to>
    </outbound-rule>
</rule>
On Wed, 2008-02-06 at 16:54 -0600, Cameron Falkenhagen wrote:
> (Filter out everything, for example, that contains a '.')
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
msgmiddle
<Prev in Thread] Current Thread [Next in Thread>
Current Sitemap | © 2012 planetjava | Contact | Privacy Policy