Matt:

I use URLRewrite.  I only have a few rules since
urlreqrite supports regex pattern mathing.

Thanks,
        Neil 

--
Neil Aggarwal, (832)245-7314, www.JAMMConsulting.com
FREE! Eliminate junk email and reclaim your inbox.
Visit http://www.spammilter.com for details.

-----Original Message-----
From: mraible [mailto:[EMAIL PROTECTED] 
Sent: Thursday, July 19, 2007 11:32 AM
To: user@struts.apache.org
Subject: Re: Don't expose .action to user?


I agree it would be nice if you could make totally clean URLs with Struts 2
-
as if you had each action registered as servlets in your web.xml.
Unfortunately, I don't believe it's possible. The only solution I can think
of is to use the UrlRewriteFilter.

http://tuckey.org/urlrewrite

While this solution would work, it'd require duplicating your action paths
in urlrewrite.xml. I guess the best solution is to write some sort of
adapter for the UrlRewriteFilter that sweeps your struts.xml and creates
rules to forward all action names (w/o an extension) to your actions with an
extension. In turn, you'd have to write outgoing rules that strip off the
extension from URLs.

If someone has a more elegant solution, I'd love to hear about it.

Matt


Chris Pratt wrote:
> 
> We had the same concern, so by putting this in the top of our struts.xml:
> 
>   <constant name="struts.action.extension" value="html"/>
> 
> It makes all the actions look like regular old .html requests.
>   (*Chris*)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context:
http://www.nabble.com/Don%27t-expose-.action-to-user--tf4106649.html#a116921
69
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to