On Mar 24, 2010, at 7:28 AM, taltu wrote:

> 
> Thx. 
> 
> Yesterday i tried with this alternativ 
> 
> http://raibledesigns.com/rd/entry/extensionless_urls_in_java_web
> 
> and only use this rule (the other rules didn't make sense and I commented
> out)
> 
> <rule>
>    <from>^([^?]*)/([^?/\.]+)(\?.*)?$</from>
>    <to last="true">$1/$2.html$3</to>
> </rule>
> 
> It seems to work!, nice :) except when the extension-less URL is called and
> forwareded to an url with extension (proteced in security.html) the
> extension-less url just bypass the security.
> 
> Example: I call "localhost:8080/helloworld" which is forwarded to
> "localhost:8080/helloworld.html". If I call the url with extension directly
> than the resource is protected thus no access, but if I call the extension
> less url the security is bypassed, that's not good. I tried to change the
> type to "redirect" but this time
> the url with extension is shown in the adressefield, better if the
> adressfield was showing the extensionless url. I hope you understand :)

If you change the securityFilter so it has <dispatcher>FORWARD</dispatcher> in 
addition to <dispatcher>REQUEST</dispatcher>, it should solve this problem.

> 
> Redirect version:
> <rule>
>    <from>^([^?]*)/([^?/\.]+)(\?.*)?$</from>
>    <to last="true" type="redirect">$1/$2.html$3</to>
> </rule>
> 
> I'm still curious why Appfuse prevent the Struts 2 Convention plugin to work
> with the SEO complaint URLs ?

We don't do it on purpose, but we do plan on adding extensionless URLs in the 
next release (2.1). If the Convention plugin can do that for us, great. If not, 
I'll use the UrlRewriteFilter.

Matt

> 
> I appreciate your help, guys - Thx!
> 
> 
> -taltun
> -- 
> View this message in context: 
> http://n4.nabble.com/Struts-2-convention-plugin-tp1676689p1680535.html
> Sent from the AppFuse - User mailing list archive at Nabble.com.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
> For additional commands, e-mail: users-h...@appfuse.dev.java.net
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net
For additional commands, e-mail: users-h...@appfuse.dev.java.net

Reply via email to