Re: Struts URLs for perfectionists like Ebay's URLs
Hi, Vinny i also try urlrewrite but cannot get it work with struts 2's action, only work with static html files. would you pls give give me some sample app or guides to have my urls go from this : /myAction.do?p1=v1p2=v2 to /myAction/p1,v1/p2,v2/ best regards, - Original Message - From: Vinny [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Tuesday, October 02, 2007 10:29 PM Subject: Re: Struts URLs for perfectionists like Ebay's URLs Also, you might want to look at URLRewrite http://tuckey.org/urlrewrite/ That is what I've been using in S1 and S2 to have my urls go from this : /myAction.do?p1=v1p2=v2 to /myAction/p1,v1/p2,v2/ I'm also using the zero config and code behind plugins in struts2 that also work to hide the extention. I use urlfilter in addition to the plugins to customize the look of my url parameters. On 10/1/07, Piero Sartini [EMAIL PROTECTED] wrote: Am Montag 01 Oktober 2007 23:33:01 schrieb Emi Lu: Is there a way to hide .action .do by using filter url-pattern? Have a look at http://code.google.com/p/smarturls-s2/wiki/WalkThrough (last paragraph: Extensionless URLs) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The Street Programmer http://streetprogrammer.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts URLs for perfectionists like Ebay's URLs
Also, you might want to look at URLRewrite http://tuckey.org/urlrewrite/ That is what I've been using in S1 and S2 to have my urls go from this : /myAction.do?p1=v1p2=v2 to /myAction/p1,v1/p2,v2/ I'm also using the zero config and code behind plugins in struts2 that also work to hide the extention. I use urlfilter in addition to the plugins to customize the look of my url parameters. On 10/1/07, Piero Sartini [EMAIL PROTECTED] wrote: Am Montag 01 Oktober 2007 23:33:01 schrieb Emi Lu: Is there a way to hide .action .do by using filter url-pattern? Have a look at http://code.google.com/p/smarturls-s2/wiki/WalkThrough (last paragraph: Extensionless URLs) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The Street Programmer http://streetprogrammer.com
Re: Struts URLs for perfectionists like Ebay's URLs
Is there a way to hide .action .do by using filter url-pattern? For example, I have the following codes: filter filter-nametutorial/filter-name filter-class org.apache.struts2.dispatcher.FilterDispatcher /filter-class /filter filter-mapping filter-nametutorial/filter-name url-pattern/*/url-pattern /filter-mapping How would the the following tech be applied to struts2 web.xml? servlet servlet-nameaction/servlet-name servlet-classorg.apache.struts.action.ActionServlet/servlet-class /servlet servlet-mapping servlet-nameaction/servlet-name url-pattern*.do/url-pattern /servlet-mapping Here is another approach suggested by Peter Hilton. On 20 Sep 2007, at 06:37, Vo Van Thuong wrote: I've just read your article at http://www.lunatech-research.com/archives/2005/07/29/struts-urls, and i find it very useful for me. I'm glad if it helps you. would you pls give me some idea about Ebay's url. http://antiques.listings.ebay.com/Antiquities-Classical-Amer_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1QQsabfmtsZ1QQsacatZ37903QQsaobfmtsZinsifQQsocmdZListingItemList I'm wondering why they do that, It looks like they have replaced ? = and in the query string with letters, because search engines sometimes treat URLs with a query string differently. and how they do that? Can i also implement something like that? Sure. You need to do two things. First change the characters in URLs that appear in HTML your application generates. In JSP or JSF you could use a custom tag for that. Second, in the web server use some kind of rewriting such as Apache mod_rewrite or a Servlet filter to translate the characters back again before they are used by your application. Peter - Original Message - From: hezjing [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, September 21, 2007 3:00 PM Subject: Re: Struts URLs for perfectionists like Ebay's URLs I think that is called URL's parameter encryption. You may want to take a look at http://www.avedatech.com/Products/QueryCrypt/index.jsp, I haven't try it by myself though. On 9/20/07, Vo Van Thuong [EMAIL PROTECTED] wrote: Hi Vinny, I'd like users to access to my website by URLs like Ebay's: http://listings.ebay.com/_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1QQsabfmtsZ1QQsacatZQ2d1QQsaobfmtsZinsifQQsocmdZListingCategoryList In which we can't see which one is get parameters which one is value obviously. I've already read an article at http://www.lunatech-research.com/archives/2005/07/29/struts-urls Which gives guides to remove the request extension (.do), the parameter and value from urls. eg: customer.do?method=editid=42 /customer/edit/42 Thanks for quick response. - Original Message - From: Vinny [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, September 20, 2007 12:54 PM Subject: Re: Struts URLs for perfectionists like Ebay's URLs Can you give an example of what you are trying to do? There a few plugins/tools/filters that can effect urls in struts and webapps in general - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts URLs for perfectionists like Ebay's URLs
Am Montag 01 Oktober 2007 23:33:01 schrieb Emi Lu: Is there a way to hide .action .do by using filter url-pattern? Have a look at http://code.google.com/p/smarturls-s2/wiki/WalkThrough (last paragraph: Extensionless URLs) - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts URLs for perfectionists like Ebay's URLs
Here is another approach suggested by Peter Hilton. On 20 Sep 2007, at 06:37, Vo Van Thuong wrote: I've just read your article at http://www.lunatech-research.com/archives/2005/07/29/struts-urls, and i find it very useful for me. I'm glad if it helps you. would you pls give me some idea about Ebay's url. http://antiques.listings.ebay.com/Antiquities-Classical-Amer_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1QQsabfmtsZ1QQsacatZ37903QQsaobfmtsZinsifQQsocmdZListingItemList I'm wondering why they do that, It looks like they have replaced ? = and in the query string with letters, because search engines sometimes treat URLs with a query string differently. and how they do that? Can i also implement something like that? Sure. You need to do two things. First change the characters in URLs that appear in HTML your application generates. In JSP or JSF you could use a custom tag for that. Second, in the web server use some kind of rewriting such as Apache mod_rewrite or a Servlet filter to translate the characters back again before they are used by your application. Peter - Original Message - From: hezjing [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Friday, September 21, 2007 3:00 PM Subject: Re: Struts URLs for perfectionists like Ebay's URLs I think that is called URL's parameter encryption. You may want to take a look at http://www.avedatech.com/Products/QueryCrypt/index.jsp, I haven't try it by myself though. On 9/20/07, Vo Van Thuong [EMAIL PROTECTED] wrote: Hi Vinny, I'd like users to access to my website by URLs like Ebay's: http://listings.ebay.com/_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1QQsabfmtsZ1QQsacatZQ2d1QQsaobfmtsZinsifQQsocmdZListingCategoryList In which we can't see which one is get parameters which one is value obviously. I've already read an article at http://www.lunatech-research.com/archives/2005/07/29/struts-urls Which gives guides to remove the request extension (.do), the parameter and value from urls. eg: customer.do?method=editid=42 /customer/edit/42 Thanks for quick response. - Original Message - From: Vinny [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, September 20, 2007 12:54 PM Subject: Re: Struts URLs for perfectionists like Ebay's URLs Can you give an example of what you are trying to do? There a few plugins/tools/filters that can effect urls in struts and webapps in general - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hez - 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]
Re: Struts URLs for perfectionists like Ebay's URLs
I think that is called URL's parameter encryption. You may want to take a look at http://www.avedatech.com/Products/QueryCrypt/index.jsp, I haven't try it by myself though. On 9/20/07, Vo Van Thuong [EMAIL PROTECTED] wrote: Hi Vinny, I'd like users to access to my website by URLs like Ebay's: http://listings.ebay.com/_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1QQsabfmtsZ1QQsacatZQ2d1QQsaobfmtsZinsifQQsocmdZListingCategoryList In which we can't see which one is get parameters which one is value obviously. I've already read an article at http://www.lunatech-research.com/archives/2005/07/29/struts-urls Which gives guides to remove the request extension (.do), the parameter and value from urls. eg: customer.do?method=editid=42 /customer/edit/42 Thanks for quick response. - Original Message - From: Vinny [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, September 20, 2007 12:54 PM Subject: Re: Struts URLs for perfectionists like Ebay's URLs Can you give an example of what you are trying to do? There a few plugins/tools/filters that can effect urls in struts and webapps in general - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Hez - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts URLs for perfectionists like Ebay's URLs
Hi Vinny, I'd like users to access to my website by URLs like Ebay's: http://listings.ebay.com/_W0QQcoactionZcompareQQcoentrypageZsearchQQcopagenumZ1QQfromZR2QQftrtZ1QQftrvZ1QQsabfmtsZ1QQsacatZQ2d1QQsaobfmtsZinsifQQsocmdZListingCategoryList In which we can't see which one is get parameters which one is value obviously. I've already read an article at http://www.lunatech-research.com/archives/2005/07/29/struts-urls Which gives guides to remove the request extension (.do), the parameter and value from urls. eg: customer.do?method=editid=42 /customer/edit/42 Thanks for quick response. - Original Message - From: Vinny [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Thursday, September 20, 2007 12:54 PM Subject: Re: Struts URLs for perfectionists like Ebay's URLs Can you give an example of what you are trying to do? There a few plugins/tools/filters that can effect urls in struts and webapps in general - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Struts URLs for perfectionists like Ebay's URLs
Can you give an example of what you are trying to do? There a few plugins/tools/filters that can effect urls in struts and webapps in general On 9/20/07, Vo Van Thuong [EMAIL PROTECTED] wrote: Hi, I'm very interested in Ebay's Urls, would someone pls give me some ideas about Ebay's Urls. why they do that and can i also make my Urls like Ebay's? Thanks - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- The Street Programmer http://streetprogrammer.com