Re : Re : url question
it would be helpfull if you tell how to do it right . it was the purpose of my first mail, I asked for help. :-) Francois Rouxel - Message d'origine De : Dave Newton À : Struts Users Mailing List Cc : François Rouxel Envoyé le : Ven 11 mars 2011, 11h 32min 48s Objet : Re: Re : url question On Fri, Mar 11, 2011 at 11:20 AM, François Rouxel wrote: > that's a pity that a great mvc like struts does not provide that kind of >service... :-( It can; you weren't doing it right. Struts has the ability to dispatch to arbitrary resources, and the use of OGNL to create the dispatch target pretty much lets you do anything you can imagine. Whether or not it's the *best* solution, however, is debatable, when there are already existing, well-known mechanisms. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Re : url question
On Fri, Mar 11, 2011 at 11:20 AM, François Rouxel wrote: > that's a pity that a great mvc like struts does not provide that kind of > service... :-( It can; you weren't doing it right. Struts has the ability to dispatch to arbitrary resources, and the use of OGNL to create the dispatch target pretty much lets you do anything you can imagine. Whether or not it's the *best* solution, however, is debatable, when there are already existing, well-known mechanisms. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re : url question
great thx so much I'm gonna try it right now that's a pity that a great mvc like struts does not provide that kind of service... :-( Francois Rouxel - Message d'origine De : Aner Perez À : user@struts.apache.org Envoyé le : Ven 11 mars 2011, 9h 32min 38s Objet : Re: url question In the past I've found that UrlRewriteFilter (http://www.tuckey.org/urlrewrite/) is a very simple and flexible way to achieve this no matter what MVC framework you are using. - Aner On 03/10/2011 08:59 PM, fr Rouxel wrote: > > Hi guys, > I need your help, at least your expertise... > My site generates permaLinks dynamic like > www.mysite.com/abusiness.html > and struts2 makes a mapping (in struts.xml file) that redirect on an action > that takes params > ex: > > > method="redirectToParseUrl"> > > / > parseUrl > {1} > > > method="parseUrl"> > > /business > showDetailBusinessWithRefresh > ${idLocation} > true > > /error/struts-error404.jsp > > > my pb : the browser show the redirection. > my question is : is it possible to tell struts to not show the redirection ? > > thx a lot > > fr/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: url question
In the past I've found that UrlRewriteFilter (http://www.tuckey.org/urlrewrite/) is a very simple and flexible way to achieve this no matter what MVC framework you are using. - Aner On 03/10/2011 08:59 PM, fr Rouxel wrote: Hi guys, I need your help, at least your expertise... My site generates permaLinks dynamic like www.mysite.com/abusiness.html and struts2 makes a mapping (in struts.xml file) that redirect on an action that takes params ex: / parseUrl {1} /business showDetailBusinessWithRefresh ${idLocation} true /error/struts-error404.jsp my pb : the browser show the redirection. my question is : is it possible to tell struts to not show the redirection ? thx a lot fr/ - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Re : Re : Re : url question
On Fri, Mar 11, 2011 at 11:10 AM, François Rouxel wrote: > well thx, > > but I need struts2 to do a little job, parse the url...and go to another > action... without changing the url... > because, > actually, there is no www.mysite.com/abusiness.html try "chain"? redirectAction is client-side redirect, chain is server-side redirect > > > it's just a fake, but I want to 'redirect', 'forward' I don't know the > right > word, to the a detail business page that don't exist ...and I need struts2 > to > give me the params.. > what are the others way to tell struts, hey parse the url (abusiness.html) > and > give me the right page...? > a mvc can do that, no? > am I the only one generating permaLink? > > > > Francois Rouxel > > > > > - Message d'origine > De : Dave Newton > À : Struts Users Mailing List > Cc : François Rouxel > Envoyé le : Jeu 10 mars 2011, 21h 55min 34s > Objet : Re: Re : Re : url question > > On Thu, Mar 10, 2011 at 9:52 PM, François Rouxel > wrote: > > does struts2 have a type='forward' ? > > because I use type='redirectAction' > > Like I said--a redirect... redirects. > > http://struts.apache.org/2.x/docs/result-types.html > http://struts.apache.org/2.x/docs/dispatcher-result.html > > The documentation is your friend. > > Dave > > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > >
Re : Re : Re : url question
well thx, but I need struts2 to do a little job, parse the url...and go to another action... without changing the url... because, actually, there is no www.mysite.com/abusiness.html it's just a fake, but I want to 'redirect', 'forward' I don't know the right word, to the a detail business page that don't exist ...and I need struts2 to give me the params.. what are the others way to tell struts, hey parse the url (abusiness.html) and give me the right page...? a mvc can do that, no? am I the only one generating permaLink? Francois Rouxel - Message d'origine De : Dave Newton À : Struts Users Mailing List Cc : François Rouxel Envoyé le : Jeu 10 mars 2011, 21h 55min 34s Objet : Re: Re : Re : url question On Thu, Mar 10, 2011 at 9:52 PM, François Rouxel wrote: > does struts2 have a type='forward' ? > because I use type='redirectAction' Like I said--a redirect... redirects. http://struts.apache.org/2.x/docs/result-types.html http://struts.apache.org/2.x/docs/dispatcher-result.html The documentation is your friend. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Re : Re : url question
On Thu, Mar 10, 2011 at 9:52 PM, François Rouxel wrote: > does struts2 have a type='forward' ? > because I use type='redirectAction' Like I said--a redirect... redirects. http://struts.apache.org/2.x/docs/result-types.html http://struts.apache.org/2.x/docs/dispatcher-result.html The documentation is your friend. Dave - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re : Re : url question
does struts2 have a type='forward' ? because I use type='redirectAction' Francois Rouxel - Message d'origine De : Dave Newton À : Struts Users Mailing List Cc : François Rouxel Envoyé le : Jeu 10 mars 2011, 21h 46min 08s Objet : Re: Re : url question That's kind of what a redirect *is*. Perhaps you're thinking of a forward? Dave On Thu, Mar 10, 2011 at 9:44 PM, François Rouxel wrote: > the main idea is > I generate permaLink for businesses > ex: mysite.com/abusiness.html > > and I need to redirect on the detail business page... > so I parse the url and do a redirection...but the browser changes the url...and > I don't want the user to see something like > mysite.com/showBusiness.action?idBusiness=ef546ewf4w6e4fe5e5f4w > > I use Struts 2.2.1 > > Francois Rouxel > > > > > > - Message d'origine > De : Martin Gainty > À : Struts Users Mailing List > Envoyé le : Jeu 10 mars 2011, 21h 32min 20s > Objet : RE: url question > > > not i the type of result is redirectAction > > http://struts.apache.org/2.0.14/docs/redirect-action-result.html > > > > we could provide more informed solutions if you could explain what you wish to > implement and a rough workflow > > Martin Gainty > __ > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem > Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. > Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung > fuer den Inhalt uebernehmen. > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le > destinataire prévu, nous te demandons avec bonté que pour satisfaire informez > l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est > interdite. Ce message sert à l'information seulement et n'aura pas n'importe > quel effet légalement obligatoire. Étant donné que les email peuvent facilement > être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité > pour le contenu fourni. > > > > >> Date: Thu, 10 Mar 2011 17:59:46 -0800 >> From: rouxe...@yahoo.com >> To: user@struts.apache.org >> Subject: url question >> >> >> Hi guys, >> I need your help, at least your expertise... >> My site generates permaLinks dynamic like >> www.mysite.com/abusiness.html >> and struts2 makes a mapping (in struts.xml file) that redirect on an action >> that takes params >> ex: >> >> >> > method="redirectToParseUrl"> >> >> / >> parseUrl >> {1} >> >> >> class="com.rdvcentral.mvc.ParsePermaLinkAction" >> method="parseUrl"> >> >> /business >> showDetailBusinessWithRefresh >> ${idLocation} >> true >> >> /error/struts-error404.jsp >> >> >> my pb : the browser show the redirection. >> my question is : is it possible to tell struts to not show the redirection ? >> >> thx a lot >> >> fr/ >> -- >> View this message in context: >>http://old.nabble.com/url-question-tp31121586p31121586.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re: Re : url question
That's kind of what a redirect *is*. Perhaps you're thinking of a forward? Dave On Thu, Mar 10, 2011 at 9:44 PM, François Rouxel wrote: > the main idea is > I generate permaLink for businesses > ex: mysite.com/abusiness.html > > and I need to redirect on the detail business page... > so I parse the url and do a redirection...but the browser changes the > url...and > I don't want the user to see something like > mysite.com/showBusiness.action?idBusiness=ef546ewf4w6e4fe5e5f4w > > I use Struts 2.2.1 > > Francois Rouxel > > > > > > - Message d'origine > De : Martin Gainty > À : Struts Users Mailing List > Envoyé le : Jeu 10 mars 2011, 21h 32min 20s > Objet : RE: url question > > > not i the type of result is redirectAction > > http://struts.apache.org/2.0.14/docs/redirect-action-result.html > > > > we could provide more informed solutions if you could explain what you wish to > implement and a rough workflow > > Martin Gainty > __ > Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger > sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung > oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich > dem > Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. > Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung > fuer den Inhalt uebernehmen. > Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le > destinataire prévu, nous te demandons avec bonté que pour satisfaire informez > l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est > interdite. Ce message sert à l'information seulement et n'aura pas n'importe > quel effet légalement obligatoire. Étant donné que les email peuvent > facilement > être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité > pour le contenu fourni. > > > > >> Date: Thu, 10 Mar 2011 17:59:46 -0800 >> From: rouxe...@yahoo.com >> To: user@struts.apache.org >> Subject: url question >> >> >> Hi guys, >> I need your help, at least your expertise... >> My site generates permaLinks dynamic like >> www.mysite.com/abusiness.html >> and struts2 makes a mapping (in struts.xml file) that redirect on an action >> that takes params >> ex: >> >> >> > method="redirectToParseUrl"> >> >> / >> parseUrl >> {1} >> >> >> class="com.rdvcentral.mvc.ParsePermaLinkAction" >> method="parseUrl"> >> >> /business >> showDetailBusinessWithRefresh >> ${idLocation} >> true >> >> /error/struts-error404.jsp >> >> >> my pb : the browser show the redirection. >> my question is : is it possible to tell struts to not show the redirection ? >> >> thx a lot >> >> fr/ >> -- >> View this message in context: >>http://old.nabble.com/url-question-tp31121586p31121586.html >> Sent from the Struts - User mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: user-unsubscr...@struts.apache.org >> For additional commands, e-mail: user-h...@struts.apache.org >> > > > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
Re : url question
the main idea is I generate permaLink for businesses ex: mysite.com/abusiness.html and I need to redirect on the detail business page... so I parse the url and do a redirection...but the browser changes the url...and I don't want the user to see something like mysite.com/showBusiness.action?idBusiness=ef546ewf4w6e4fe5e5f4w I use Struts 2.2.1 Francois Rouxel - Message d'origine De : Martin Gainty À : Struts Users Mailing List Envoyé le : Jeu 10 mars 2011, 21h 32min 20s Objet : RE: url question not i the type of result is redirectAction http://struts.apache.org/2.0.14/docs/redirect-action-result.html we could provide more informed solutions if you could explain what you wish to implement and a rough workflow Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Thu, 10 Mar 2011 17:59:46 -0800 > From: rouxe...@yahoo.com > To: user@struts.apache.org > Subject: url question > > > Hi guys, > I need your help, at least your expertise... > My site generates permaLinks dynamic like > www.mysite.com/abusiness.html > and struts2 makes a mapping (in struts.xml file) that redirect on an action > that takes params > ex: > > > method="redirectToParseUrl"> > > / > parseUrl > {1} > > > method="parseUrl"> > > /business > showDetailBusinessWithRefresh > ${idLocation} > true > > /error/struts-error404.jsp > > > my pb : the browser show the redirection. > my question is : is it possible to tell struts to not show the redirection ? > > thx a lot > > fr/ > -- > View this message in context: >http://old.nabble.com/url-question-tp31121586p31121586.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org > - To unsubscribe, e-mail: user-unsubscr...@struts.apache.org For additional commands, e-mail: user-h...@struts.apache.org
RE: url question
not i the type of result is redirectAction http://struts.apache.org/2.0.14/docs/redirect-action-result.html we could provide more informed solutions if you could explain what you wish to implement and a rough workflow Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Thu, 10 Mar 2011 17:59:46 -0800 > From: rouxe...@yahoo.com > To: user@struts.apache.org > Subject: url question > > > Hi guys, > I need your help, at least your expertise... > My site generates permaLinks dynamic like > www.mysite.com/abusiness.html > and struts2 makes a mapping (in struts.xml file) that redirect on an action > that takes params > ex: > > > method="redirectToParseUrl"> > > / > parseUrl > {1} > > >class="com.rdvcentral.mvc.ParsePermaLinkAction" > method="parseUrl"> > > /business > showDetailBusinessWithRefresh > ${idLocation} > true > >name='error404'>/error/struts-error404.jsp > > > my pb : the browser show the redirection. > my question is : is it possible to tell struts to not show the redirection ? > > thx a lot > > fr/ > -- > View this message in context: > http://old.nabble.com/url-question-tp31121586p31121586.html > Sent from the Struts - User mailing list archive at Nabble.com. > > > - > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org > For additional commands, e-mail: user-h...@struts.apache.org >
Re: URL question
If you mean you want a request to http://www.myapp.com/ to execute input.action, you can: - create an index.html with an http redirect header to index.action; or - setup your webserver or container so that index.action is the default welcome "file" (rather than index.html, index.jsp etc); or - design an index.jsp (or other welcome file) than can be rendered without executing an action at all ; or - create an index.jsp that contains remote div's to to load the specific non-static sections that do require an action to execute (these div's won't be 'search-engine' friendly though) If you'd like a more generic solution to hide the action name from the URL, you may be able to use a feature in your webserver like mod_rewrite to rewrite the URLs to something more 'human friendly'. meeboo wrote: Can I somehow hide the action name in a URL to make it more search engine friendly? I am specifically talking about the index page (in for example http://www.myapp.com/index.action ). - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]