You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Fred Gerson <fr...@wrath.forked.net> on 2003/02/03 22:28:26 UTC

Moving Turbine app to root tomcat context

Hey All,

I'd like to access my turbine app via a root URL with Tomcat.

www.myserver.com:port

instead of

www.myserver.com:port/myapp/servlet/myapp.

I have a Context element in my server.xml with

path=""  docbase="myapp"

attributes that will point a root URL request to the myapp directory in my
webapps. But my problem is I want to have this execute the Turbine myapp
servlet and serve up a page from that. The above root request serves an
index.html file when I put it in the myapp directory. Is what I want a
some kind of redirect, where www.myserver.com:port gets interpreted by
Tomcat as www.myserver.com:port/myapp/servlet/myapp? How have others
implemented this in Tomcat, or do I need something like Apache sitting in
front of Tomcat to do this?

Thanks,
Fred


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Moving Turbine app to root tomcat context

Posted by Fred Gerson <fr...@wrath.forked.net>.
Hey Rick,

I created a file in my myapp dir called index.jsp with the following
contents

<jsp:forward page="servlet/myapp">

and got nothing served after requesting the root url. I don't really know
jsp so maybe I'm missing something else that I need in the file. I should
be able to do a simple redirect. Does anyone on the list have experience
with this in JSP?

Thanks,
Fred

On Mon, 3 Feb 2003, peter riegersperger wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 03 February 2003 22:46, Fred Gerson wrote:
> > Thanks Rick,
> >
> > I'm gonna look into both the (1) and the (2) solutions you proposed below.
> > Do you (or anyone else on the list) have code for the jsp page you
> > describe in solution (1) that redirects a root URL to a servlet URL. Or if
> > you can point me to the posts on the list that describe it I'd greatly
> > appreciate it (after an initial search I couldn't find anything about
> > this).
>
> http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg06279.html
> has a snipplet.
>
> if you just want an easy entry-point to your website (or multiple entry
> points, since you can have many jsps that are just redirecting), the
> jsp-trick is probably much easier and faster to implement, unless you are
> familiar to mod_rewrite (which allowed me to royally mess up my urls more
> than once).
>
> >
> > Thanks,
> > Fred
>
> Cheers,
>
> rick
>
> - --
> |-
> | peter riegersperger  <ri...@subnet.at>
> |-
> | ein windows switcher tagebuch:
> | http://forum.subnet.at/viewforum.php?f=22
> |-
> | subnet
> | platform for media art and experimental technologies
> |-
> | http://www.subnet.at/
> |-
> | muehlbacherhofweg 5 // 5020 salzburg // austria
> |-
> | fon/fax +43/662/842 897
> |-
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE+PuXLIMP39JYOy9IRAr7oAKDKm6YTJfePa5H/EdMwdSdKwN8ZAgCg99sX
> sagEj8NkdbOKvnjxbnPo+5g=
> =qViN
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Moving Turbine app to root tomcat context

Posted by peter riegersperger <ri...@subnet.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 03 February 2003 22:46, Fred Gerson wrote:
> Thanks Rick,
>
> I'm gonna look into both the (1) and the (2) solutions you proposed below.
> Do you (or anyone else on the list) have code for the jsp page you
> describe in solution (1) that redirects a root URL to a servlet URL. Or if
> you can point me to the posts on the list that describe it I'd greatly
> appreciate it (after an initial search I couldn't find anything about
> this).

http://www.mail-archive.com/turbine-user@jakarta.apache.org/msg06279.html
has a snipplet.

if you just want an easy entry-point to your website (or multiple entry 
points, since you can have many jsps that are just redirecting), the 
jsp-trick is probably much easier and faster to implement, unless you are 
familiar to mod_rewrite (which allowed me to royally mess up my urls more 
than once).

>
> Thanks,
> Fred

Cheers,

rick

- -- 
|-
| peter riegersperger  <ri...@subnet.at>
|-
| ein windows switcher tagebuch:
| http://forum.subnet.at/viewforum.php?f=22
|-
| subnet
| platform for media art and experimental technologies
|-
| http://www.subnet.at/
|-
| muehlbacherhofweg 5 // 5020 salzburg // austria
|-
| fon/fax +43/662/842 897
|- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+PuXLIMP39JYOy9IRAr7oAKDKm6YTJfePa5H/EdMwdSdKwN8ZAgCg99sX
sagEj8NkdbOKvnjxbnPo+5g=
=qViN
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Moving Turbine app to root tomcat context

Posted by Fred Gerson <fr...@wrath.forked.net>.
Thanks Rick,

I'm gonna look into both the (1) and the (2) solutions you proposed below.
Do you (or anyone else on the list) have code for the jsp page you
describe in solution (1) that redirects a root URL to a servlet URL. Or if
you can point me to the posts on the list that describe it I'd greatly
appreciate it (after an initial search I couldn't find anything about
this).

Thanks,
Fred


On Mon, 3 Feb 2003, peter riegersperger wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On Monday 03 February 2003 22:28, Fred Gerson wrote:
> > Hey All,
> >
> > I'd like to access my turbine app via a root URL with Tomcat.
> [...]
>
> according to the discussions in the list-archive, there are just two ways:
> 1. write a small redirect-jsp and put it in your webapp-directory.
> 2. use apache in front of tomcat and use mod_rewrite to rewrite your URLs.
>
> i used (2), but note that the link-tool will insist of adding the complete
> pathinfo to your links.
>
> rick
>
> - --
> |-
> | peter riegersperger  <ri...@subnet.at>
> |-
> | ein windows switcher tagebuch:
> | http://forum.subnet.at/viewforum.php?f=22
> |-
> | subnet
> | platform for media art and experimental technologies
> |-
> | http://www.subnet.at/
> |-
> | muehlbacherhofweg 5 // 5020 salzburg // austria
> |-
> | fon/fax +43/662/842 897
> |-
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.7 (GNU/Linux)
>
> iD8DBQE+PuDhIMP39JYOy9IRAp94AJ4kW88nf6p0w8K6sUVz4qEEVGjY5QCfTnDX
> kMQxH64LihefTtKuvwDj3tg=
> =JHLA
> -----END PGP SIGNATURE-----
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: turbine-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Moving Turbine app to root tomcat context

Posted by peter riegersperger <ri...@subnet.at>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 03 February 2003 22:28, Fred Gerson wrote:
> Hey All,
>
> I'd like to access my turbine app via a root URL with Tomcat.
[...]

according to the discussions in the list-archive, there are just two ways:
1. write a small redirect-jsp and put it in your webapp-directory.
2. use apache in front of tomcat and use mod_rewrite to rewrite your URLs.

i used (2), but note that the link-tool will insist of adding the complete 
pathinfo to your links.

rick

- -- 
|-
| peter riegersperger  <ri...@subnet.at>
|-
| ein windows switcher tagebuch:
| http://forum.subnet.at/viewforum.php?f=22
|-
| subnet
| platform for media art and experimental technologies
|-
| http://www.subnet.at/
|-
| muehlbacherhofweg 5 // 5020 salzburg // austria
|-
| fon/fax +43/662/842 897
|- 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE+PuDhIMP39JYOy9IRAp94AJ4kW88nf6p0w8K6sUVz4qEEVGjY5QCfTnDX
kMQxH64LihefTtKuvwDj3tg=
=JHLA
-----END PGP SIGNATURE-----


---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org