Hello all, I have a legacy web app that I''m replacing in rails. This app is public, so I need to over-ride the exising login.jsp that has other external links and probably many bookmark entries in customer browsers. So, what I''d like to do is replace the login.jsp with a login.jsp that just has a redirect to my rails login url... is this possible? Also, one of the external links passes some params to the jsp as well.. can the redirect also forward those parameters to my rails login url ? Thanks for your advice! -- ------------------------------ dried fruit and clams ------------------------------ Peter Fitzgibbons _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
You could add a AddHandler in your .htaccess file that tells apache to render files with a .jsp extension in PHP. That way you could use PHP to gather the parameters and do the redirect: Addhandler php-script .php .jsp peter.fitzgibbons wrote:> Hello all, > > I have a legacy web app that I''m replacing in rails. This app is > public, so > I need to over-ride the exising login.jsp that has other external links > and > probably many bookmark entries in customer browsers. > > So, what I''d like to do is replace the login.jsp with a login.jsp that > just > has a redirect to my rails login url... is this possible? Also, one of > the > external links passes some params to the jsp as well.. can the redirect > also > forward those parameters to my rails login url ? > > Thanks for your advice! > > ---- Posted via http://www.ruby-forum.com/.
Norman Timmler
2005-Nov-30 11:49 UTC
Re: [OT] can Apache serve jsp without an app server ?
Am Dienstag, den 29.11.2005, 15:58 -0600 schrieb Peter Fitzgibbons:> Hello all, > > I have a legacy web app that I''m replacing in rails. This app is > public, so I need to over-ride the exising login.jsp that has other > external links and probably many bookmark entries in customer > browsers. > > So, what I''d like to do is replace the login.jsp with a login.jsp that > just has a redirect to my rails login url... is this possible? Also, > one of the external links passes some params to the jsp as well.. can > the redirect also forward those parameters to my rails login url ? > > Thanks for your advice!Try something like this in your Rails .htaccess file as the first rewrite rule (untested): RewriteRule ^login.jsp(.*)$ /your_login_controller/your_login_action/$1> -- > ------------------------------ > dried fruit and clams > ------------------------------ > Peter Fitzgibbons > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Peter Fitzgibbons
2005-Nov-30 12:14 UTC
Re: Re: can Apache serve jsp without an app server ?
HI Brad, Since I have no PHP knowledge, could you provide an example ? Thanks. On 11/29/05, Brad Daily <brad-gF2YUKaa3i2Mzk71e9gJXA@public.gmane.org> wrote:> > You could add a AddHandler in your .htaccess file that tells apache to > render files with a .jsp extension in PHP. That way you could use PHP to > gather the parameters and do the redirect: > > Addhandler php-script .php .jsp > > peter.fitzgibbons wrote: > > Hello all, > > > > I have a legacy web app that I''m replacing in rails. This app is > > public, so > > I need to over-ride the exising login.jsp that has other external links > > and > > probably many bookmark entries in customer browsers. > > > > So, what I''d like to do is replace the login.jsp with a login.jsp that > > just > > has a redirect to my rails login url... is this possible? Also, one of > > the > > external links passes some params to the jsp as well.. can the redirect > > also > > forward those parameters to my rails login url ? > > > > Thanks for your advice! > > > > -- > > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- ------------------------------ dried fruit and clams ------------------------------ Peter Fitzgibbons _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Peter Fitzgibbons
2005-Nov-30 12:26 UTC
Re: [solved] Re: can Apache serve jsp without an app server ?
I used a route to solve this : map.connect ''UserLogin.jsp'', :controller=>"user", :action=>"remote_login" My intent with this change is simply ot send the request into the rails app and perform processing there (this is a login page from a legacy j2ee app). So, this route sends the request into my controller just the way I want it. Thanks for your advice Brad! On 11/30/05, Peter Fitzgibbons <peter.fitzgibbons-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > HI Brad, > Since I have no PHP knowledge, could you provide an example ? > > Thanks. > > On 11/29/05, Brad Daily < brad-gF2YUKaa3i2Mzk71e9gJXA@public.gmane.org> wrote: > > > > You could add a AddHandler in your .htaccess file that tells apache to > > render files with a .jsp extension in PHP. That way you could use PHP to > > gather the parameters and do the redirect: > > > > Addhandler php-script .php .jsp > > > > peter.fitzgibbons wrote: > > > Hello all, > > > > > > I have a legacy web app that I''m replacing in rails. This app is > > > public, so > > > I need to over-ride the exising login.jsp that has other external > > links > > > and > > > probably many bookmark entries in customer browsers. > > > > > > So, what I''d like to do is replace the login.jsp with a login.jsp that > > > just > > > has a redirect to my rails login url... is this possible? Also, one > > of > > > the > > > external links passes some params to the jsp as well.. can the > > redirect > > > also > > > forward those parameters to my rails login url ? > > > > > > Thanks for your advice! > > > > > > -- > > > > > > -- > > Posted via http://www.ruby-forum.com/ . > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > -- > ------------------------------ > dried fruit and clams > ------------------------------ > Peter Fitzgibbons >-- ------------------------------ dried fruit and clams ------------------------------ Peter Fitzgibbons _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails