Re: [HELP] how do I catch url like http://www.myweb.com/mysite :(
Pham Anh Tuan wrote: I just think that we can check request object, after that we check db for specific username (360.yahoo.com/username), if it's exist, we will view homepage of that username. The problem here, I don't know how to do that :( I had to recreate this usecase for a conversion: I ended up writing a filter that has a known list of URLs (paths) to not filter; any other path is used as a DB lookup for user by username. The filter then puts that user into session and forwards into the Struts app. You could also do this in a custom RequestProcesser, but keeping it in a Filter gives you more flexibility. I ended up refactoring the functionality completely out so it could be plugged in as necessary. Dave - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [HELP] how do I catch url like http://www.myweb.com/mysite :(
Thanks Dave, I try following your instructions. again, thank you! :) bowlkhin - Original Message - From: Dave Newton [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Monday, April 10, 2006 10:07 PM Subject: Re: [HELP] how do I catch url like http://www.myweb.com/mysite :( Pham Anh Tuan wrote: I just think that we can check request object, after that we check db for specific username (360.yahoo.com/username), if it's exist, we will view homepage of that username. The problem here, I don't know how to do that :( I had to recreate this usecase for a conversion: I ended up writing a filter that has a known list of URLs (paths) to not filter; any other path is used as a DB lookup for user by username. The filter then puts that user into session and forwards into the Struts app. You could also do this in a custom RequestProcesser, but keeping it in a Filter gives you more flexibility. I ended up refactoring the functionality completely out so it could be plugged in as necessary. Dave - 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: [HELP] how do I catch url like http://www.myweb.com/mysite :(
thanks Ted, You said, I'm not even sure that Java would be the best platform for this use case, is it true :( I just think that we can check request object, after that we check db for specific username (360.yahoo.com/username), if it's exist, we will view homepage of that username. The problem here, I don't know how to do that :( bowlkhin - Original Message - From: Ted Husted [EMAIL PROTECTED] To: Struts Users Mailing List user@struts.apache.org Sent: Saturday, April 08, 2006 8:54 PM Subject: Re: [HELP] how do I catch url like http://www.myweb.com/mysite :( This questions seem a tad out of scope, even for this list. It's more about programming a web server than programming a web application framework. You might want to check with your web server vendor for the best settings for your server. I'm not even sure that Java would be the best platform for this use case. -Ted. On 4/7/06, Pham Anh Tuan [EMAIL PROTECTED] wrote: Hi all, I don't know how to catch the url like http://www.myweb.com/myweb --- I wanna do a action with this url, something like 360o yahoo did. ex: with url: 360.yahoo.com/myusername --- you can go to my page. who know how, help me plz :( thanks in advance, bowlkhin -- HTH, Ted. ** http://www.husted.com/ted/blog/ - 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: [HELP] how do I catch url like http://www.myweb.com/mysite :(
This questions seem a tad out of scope, even for this list. It's more about programming a web server than programming a web application framework. You might want to check with your web server vendor for the best settings for your server. I'm not even sure that Java would be the best platform for this use case. -Ted. On 4/7/06, Pham Anh Tuan [EMAIL PROTECTED] wrote: Hi all, I don't know how to catch the url like http://www.myweb.com/myweb --- I wanna do a action with this url, something like 360o yahoo did. ex: with url: 360.yahoo.com/myusername --- you can go to my page. who know how, help me plz :( thanks in advance, bowlkhin -- HTH, Ted. ** http://www.husted.com/ted/blog/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[HELP] how do I catch url like http://www.myweb.com/mysite :(
Hi all, I don't know how to catch the url like http://www.myweb.com/myweb --- I wanna do a action with this url, something like 360o yahoo did. ex: with url: 360.yahoo.com/myusername --- you can go to my page. who know how, help me plz :( thanks in advance, bowlkhin