You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Richard Han <ha...@shaw.ca> on 2004/03/31 19:54:21 UTC

define Index.vm as a welcome file

Hi all,

Currently I have index.html as a static html page, which just do
onload redirect to the full Turbine index.vm. But this looks awkward
because user first see index.html briefly and then the brower redirect
to Index.vm. I wonder is there a better way to configure turbine or
tomcat to invoke Index.vm directly. 

Thanks!

richard


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


AW: define Index.vm as a welcome file

Posted by Jürgen Hoffmann <jh...@byteaction.de>.
Hi Richard,

as I said we use Tomcat standalone or behind an apache. You can do it
cleanly with an index.jsp in which you redirect to your application.

Kind regards

Jürgen Hoffmann

-----Ursprüngliche Nachricht-----
Von: Richard Han [mailto:han.richard@shaw.ca] 
Gesendet: Mittwoch, 31. März 2004 21:54
An: Turbine Users List
Betreff: RE: define Index.vm as a welcome file

Thank you guys for your help!

template.homepage won't do the trick here, because it only gives you the
default template if turbine's module resolver can't find a template
AFTER index.vm has been visited (I have previously set it to index.vm
anyway)

I am using tomcat as standalone, so apache won't help me here (I use
iptables to map port 80 to 8080, so users can just use my domain to
invoke my app)

I just tried out a way to make it work
- index.html is still as the welcome page on web.xml
- make a servlet, all it does is:
	response.setRedirect(myAppContext/index.vm)
  
- in web.xml
    <servlet-mapping>
	<servlet-name>redirect</servlet-name>
        <url-pattern>/index.html</url-pattern>
    </servlet-mapping>
  The redirect is the new servlet name, this will redirect the static
index.html to the turbine's dynamic index.vm, and user won't be able to
see the index.html anymore.

comments are welcome!

richard



On Wed, 2004-03-31 at 11:27, David Demner wrote:
> Hi Richard,
> 
> In your TurbineResources.properties, check the values for
template.homepage
> and screen.homepage - make sure these point to Index.vm and Login.vm
> respectively.
> 
> Alternately, I guess you could use mod_rewrite to do a server side
redirect
> from index.html to index.vm, but changing the .properties file is probably
> better.
> 
> Good luck,
> 
> David
> 
> -----Original Message-----
> From: Richard Han [mailto:han.richard@shaw.ca] 
> Sent: Wednesday, March 31, 2004 9:54 AM
> To: turbine-user@jakarta.apache.org
> Subject: define Index.vm as a welcome file
> 
> 
> Hi all,
> 
> Currently I have index.html as a static html page, which just do
> onload redirect to the full Turbine index.vm. But this looks awkward
> because user first see index.html briefly and then the brower redirect
> to Index.vm. I wonder is there a better way to configure turbine or
> tomcat to invoke Index.vm directly. 
> 
> Thanks!
> 
> richard
> 
> 
> ---------------------------------------------------------------------
> 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
> 


---------------------------------------------------------------------
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: define Index.vm as a welcome file

Posted by Jeff Painter <pa...@kiasoft.com>.
If this is for production, I recommend trying out Jetty

I was very pleased with Jetty's performance over tomcat and it is very 
simple to administer. I was able to drop in my webapp with no 
changes and start it up.

Jeff Painter


On Wed, 31 Mar 2004, Richard Han wrote:

> Thank you guys for your help!
> 
> template.homepage won't do the trick here, because it only gives you the
> default template if turbine's module resolver can't find a template
> AFTER index.vm has been visited (I have previously set it to index.vm
> anyway)
> 
> I am using tomcat as standalone, so apache won't help me here (I use
> iptables to map port 80 to 8080, so users can just use my domain to
> invoke my app)
> 
> I just tried out a way to make it work
> - index.html is still as the welcome page on web.xml
> - make a servlet, all it does is:
> 	response.setRedirect(myAppContext/index.vm)
>   
> - in web.xml
>     <servlet-mapping>
> 	<servlet-name>redirect</servlet-name>
>         <url-pattern>/index.html</url-pattern>
>     </servlet-mapping>
>   The redirect is the new servlet name, this will redirect the static
> index.html to the turbine's dynamic index.vm, and user won't be able to
> see the index.html anymore.
> 
> comments are welcome!
> 
> richard
> 


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


RE: define Index.vm as a welcome file

Posted by Richard Han <ha...@shaw.ca>.
Thank you guys for your help!

template.homepage won't do the trick here, because it only gives you the
default template if turbine's module resolver can't find a template
AFTER index.vm has been visited (I have previously set it to index.vm
anyway)

I am using tomcat as standalone, so apache won't help me here (I use
iptables to map port 80 to 8080, so users can just use my domain to
invoke my app)

I just tried out a way to make it work
- index.html is still as the welcome page on web.xml
- make a servlet, all it does is:
	response.setRedirect(myAppContext/index.vm)
  
- in web.xml
    <servlet-mapping>
	<servlet-name>redirect</servlet-name>
        <url-pattern>/index.html</url-pattern>
    </servlet-mapping>
  The redirect is the new servlet name, this will redirect the static
index.html to the turbine's dynamic index.vm, and user won't be able to
see the index.html anymore.

comments are welcome!

richard



On Wed, 2004-03-31 at 11:27, David Demner wrote:
> Hi Richard,
> 
> In your TurbineResources.properties, check the values for template.homepage
> and screen.homepage - make sure these point to Index.vm and Login.vm
> respectively.
> 
> Alternately, I guess you could use mod_rewrite to do a server side redirect
> from index.html to index.vm, but changing the .properties file is probably
> better.
> 
> Good luck,
> 
> David
> 
> -----Original Message-----
> From: Richard Han [mailto:han.richard@shaw.ca] 
> Sent: Wednesday, March 31, 2004 9:54 AM
> To: turbine-user@jakarta.apache.org
> Subject: define Index.vm as a welcome file
> 
> 
> Hi all,
> 
> Currently I have index.html as a static html page, which just do
> onload redirect to the full Turbine index.vm. But this looks awkward
> because user first see index.html briefly and then the brower redirect
> to Index.vm. I wonder is there a better way to configure turbine or
> tomcat to invoke Index.vm directly. 
> 
> Thanks!
> 
> richard
> 
> 
> ---------------------------------------------------------------------
> 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
> 


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


AW: define Index.vm as a welcome file

Posted by Jürgen Hoffmann <jh...@byteaction.de>.
Hi,

we use an index.jsp page in which we ahve the following statement:

<%
response.sendRedirect(response.encodeRedirectURL("http://www.example.de/weba
pp/servlet/webapp"));
%>

Which works just fine.

Kind regards

Jürgen Hoffmann

-----Ursprüngliche Nachricht-----
Von: David Demner [mailto:turbine@demner.com] 
Gesendet: Mittwoch, 31. März 2004 20:28
An: 'Turbine Users List'
Betreff: RE: define Index.vm as a welcome file

Hi Richard,

In your TurbineResources.properties, check the values for template.homepage
and screen.homepage - make sure these point to Index.vm and Login.vm
respectively.

Alternately, I guess you could use mod_rewrite to do a server side redirect
from index.html to index.vm, but changing the .properties file is probably
better.

Good luck,

David

-----Original Message-----
From: Richard Han [mailto:han.richard@shaw.ca] 
Sent: Wednesday, March 31, 2004 9:54 AM
To: turbine-user@jakarta.apache.org
Subject: define Index.vm as a welcome file


Hi all,

Currently I have index.html as a static html page, which just do
onload redirect to the full Turbine index.vm. But this looks awkward
because user first see index.html briefly and then the brower redirect
to Index.vm. I wonder is there a better way to configure turbine or
tomcat to invoke Index.vm directly. 

Thanks!

richard


---------------------------------------------------------------------
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



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


RE: define Index.vm as a welcome file

Posted by Jeff Painter <pa...@kiasoft.com>.
I setup my webapp to load automatically through the apache Redirect 
configuration as such

# httpd.conf
#
Redirect permanent / http://mydomain.com/myapp/servlet/myapp
#

I'm not sure if this is what you are looking to do, but it was the easiest 
way I could find.


	Jeffery Painter


On Wed, 31 Mar 2004, David Demner wrote:

> Hi Richard,
> 
> In your TurbineResources.properties, check the values for template.homepage
> and screen.homepage - make sure these point to Index.vm and Login.vm
> respectively.
> 
> Alternately, I guess you could use mod_rewrite to do a server side redirect
> from index.html to index.vm, but changing the .properties file is probably
> better.
> 
> Good luck,
> 
> David
> 
> -----Original Message-----
> From: Richard Han [mailto:han.richard@shaw.ca] 
> Sent: Wednesday, March 31, 2004 9:54 AM
> To: turbine-user@jakarta.apache.org
> Subject: define Index.vm as a welcome file
> 
> 
> Hi all,
> 
> Currently I have index.html as a static html page, which just do
> onload redirect to the full Turbine index.vm. But this looks awkward
> because user first see index.html briefly and then the brower redirect
> to Index.vm. I wonder is there a better way to configure turbine or
> tomcat to invoke Index.vm directly. 
> 
> Thanks!
> 
> richard


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


RE: define Index.vm as a welcome file

Posted by David Demner <tu...@demner.com>.
Hi Richard,

In your TurbineResources.properties, check the values for template.homepage
and screen.homepage - make sure these point to Index.vm and Login.vm
respectively.

Alternately, I guess you could use mod_rewrite to do a server side redirect
from index.html to index.vm, but changing the .properties file is probably
better.

Good luck,

David

-----Original Message-----
From: Richard Han [mailto:han.richard@shaw.ca] 
Sent: Wednesday, March 31, 2004 9:54 AM
To: turbine-user@jakarta.apache.org
Subject: define Index.vm as a welcome file


Hi all,

Currently I have index.html as a static html page, which just do
onload redirect to the full Turbine index.vm. But this looks awkward
because user first see index.html briefly and then the brower redirect
to Index.vm. I wonder is there a better way to configure turbine or
tomcat to invoke Index.vm directly. 

Thanks!

richard


---------------------------------------------------------------------
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