Can Apache serve jsp without an app server?

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!

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!

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

HI Brad,
Since I have no PHP knowledge, could you provide an example ?

Thanks.

On 11/29/05, Brad D. [email protected] wrote:

I have a legacy web app that I’m replacing in rails. This app is
also
Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

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. [email protected] wrote:

gather the parameters and do the redirect:

and
forward those parameters to my rails login url ?
[email protected]