Forum: Ruby on Rails can Apache serve jsp without an app server ?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
peter.fitzgibbons (Guest)
on 2005-11-30 00:02
(Received via mailing list)
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!

--
Brad D. (Guest)
on 2005-11-30 00:45
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!
>
> --
norman (Guest)
on 2005-11-30 13:51
(Received via mailing list)
Am Dienstag, den 29.11.2005, 15:58 -0600 schrieb Peter F.:
> 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
peter.fitzgibbons (Guest)
on 2005-11-30 14:15
(Received via mailing list)
HI Brad,
Since I have no PHP knowledge, could you provide an example ?

Thanks.

On 11/29/05, Brad D. <removed_email_address@domain.invalid> wrote:
> > I have a legacy web app that I'm replacing in rails.  This app is
> > also
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>



--
peter.fitzgibbons (Guest)
on 2005-11-30 14:27
(Received via mailing list)
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 F. <removed_email_address@domain.invalid> wrote:
> > gather the parameters and do the redirect:
> > > and
> > > forward those parameters to my rails login url ?
> > removed_email_address@domain.invalid
>
--
This topic is locked and can not be replied to.