You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by John <jr...@hotmail.com> on 2002/12/30 12:07:00 UTC

How to configure template for web page?

In TurbineResources.properties, what these variables mean? And what are they
used to do?
I am just confused by them.
# -------------------------------------------------------------------
#
#  F R A M E W O R K  S E T T I N G S
#
# -------------------------------------------------------------------
# These are settings that control the behaviour of the framework,
# such as determining whether a template system is in use, what
# the default templates and screens are and session handling settings.
# -------------------------------------------------------------------

# Used to set the template homepage if you are using a template
# layout.
#
# Default: Index.vm

template.homepage=Index.vm

# This is the default screen to show to people when they first access
# the system. Specify one of the template screens such as VelocityScreen
# to use a template system.
#
# Default: Login

screen.homepage=

# This is the template that is shown on an incorrect login attempt.
# Setting this property will override any value of screen.login specfied
# below.
#
# Default: Login.vm

template.login=Login.vm

# This is the page that is shown on an incorrect login attempt.  It is
# referenced in the LoginUser action. Note that it will only be used if
# a login template has not been specified (see template.login above).
#
# Default: Login

screen.login=

# This is the template that is used by the respective Template based
# ErrorScreen for displaying the error. If you are not using a Template
based
# ErrorScreen, then this is ignored.
#
# Default: Error.vm

template.error=Error.vm

# This is the default error screen.
#
# Default: VelocityErrorScreen

screen.error=VelocityErrorScreen

# This is the screen that is displayed when the user's web page is in
# an invalid state.
#
# Default: error.InvalidState

screen.invalidstate=error.InvalidState

# Set the default Doctype.  The default Doctype can be set by using
# the single strings: Html40Strict, Html40Transitional, or
# Html40Frameset.  Additionally the default can be supplied as two
# strings separated by a comma giving the DTD and URI.
#
# Default: ignored if not set to some value.

default.doctype=Html40Transitional

# This is the default action to log a user in.

action.login=LoginUser

# This is the default action to log a user out.

action.logout=LogoutUser

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: How to configure template for web page?

Posted by Eigen Technology Pty Ltd <mi...@eigentechnology.com>.
Try:

http://jakarta.apache.org/turbine/tdk/tdk-howto.html

there are a few other howtos to help you get started.

best wishes
michael




> In TurbineResources.properties, what these variables mean? And what are
> they used to do?
> I am just confused by them.
> # ------------------------------------------------------------------- #
> #  F R A M E W O R K  S E T T I N G S
> #
> # ------------------------------------------------------------------- #
> These are settings that control the behaviour of the framework,
> # such as determining whether a template system is in use, what
> # the default templates and screens are and session handling settings. #
> -------------------------------------------------------------------
>
> # Used to set the template homepage if you are using a template
> # layout.
> #
> # Default: Index.vm
>
> template.homepage=Index.vm
>
> # This is the default screen to show to people when they first access #
> the system. Specify one of the template screens such as VelocityScreen #
> to use a template system.
> #
> # Default: Login
>
> screen.homepage=
>
> # This is the template that is shown on an incorrect login attempt. #
> Setting this property will override any value of screen.login specfied #
> below.
> #
> # Default: Login.vm
>
> template.login=Login.vm
>
> # This is the page that is shown on an incorrect login attempt.  It is #
> referenced in the LoginUser action. Note that it will only be used if #
> a login template has not been specified (see template.login above). #
> # Default: Login
>
> screen.login=
>
> # This is the template that is used by the respective Template based #
> ErrorScreen for displaying the error. If you are not using a Template
> based
> # ErrorScreen, then this is ignored.
> #
> # Default: Error.vm
>
> template.error=Error.vm
>
> # This is the default error screen.
> #
> # Default: VelocityErrorScreen
>
> screen.error=VelocityErrorScreen
>
> # This is the screen that is displayed when the user's web page is in #
> an invalid state.
> #
> # Default: error.InvalidState
>
> screen.invalidstate=error.InvalidState
>
> # Set the default Doctype.  The default Doctype can be set by using #
> the single strings: Html40Strict, Html40Transitional, or
> # Html40Frameset.  Additionally the default can be supplied as two #
> strings separated by a comma giving the DTD and URI.
> #
> # Default: ignored if not set to some value.
>
> default.doctype=Html40Transitional
>
> # This is the default action to log a user in.
>
> action.login=LoginUser
>
> # This is the default action to log a user out.
>
> action.logout=LogoutUser
>
> --
> To unsubscribe, e-mail:
> <ma...@jakarta.apache.org> For additional
> commands, e-mail: <ma...@jakarta.apache.org>




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: How to configure template for web page?

Posted by Quinton McCombs <qm...@nequalsone.com>.
I am going to assume that you will be using Velocity and not JSP or some
other type of view.

My comments are inline.

> -----Original Message-----
> From: John [mailto:jrhcn@hotmail.com] 
> Sent: Monday, December 30, 2002 5:07 AM
> To: Turbine Users List
> Subject: How to configure template for web page?
> 
> 
> In TurbineResources.properties, what these variables mean? 
> And what are they used to do? I am just confused by them. # 
> -------------------------------------------------------------------
> #
> #  F R A M E W O R K  S E T T I N G S
> #
> # -------------------------------------------------------------------
> # These are settings that control the behaviour of the 
> framework, # such as determining whether a template system is 
> in use, what # the default templates and screens are and 
> session handling settings. # 
> -------------------------------------------------------------------
> 
> # Used to set the template homepage if you are using a 
> template # layout. # # Default: Index.vm
> 
> template.homepage=Index.vm
>

This is the default page that Turbine will render if a specific page is
not request.  For example, if you accessed the followjng page
http://www.myapp.com/blah/servlet/sampleapp (just an example), you will
get the template listed in template.homepage.  Think of this as
Turbine's, index.html.


> # This is the default screen to show to people when they 
> first access # the system. Specify one of the template 
> screens such as VelocityScreen # to use a template system. # 
> # Default: Login
> 
> screen.homepage=
> 

Ignore this.  It is only used if you do not have a template.homepage.

> # This is the template that is shown on an incorrect login 
> attempt. # Setting this property will override any value of 
> screen.login specfied # below. # # Default: Login.vm
> 
> template.login=Login.vm
> 

This is really only used in the default login action and the secure
session validator (not enabled by default).  For the login action, this
is used on an invalid login attempt.  This is where the user will be
sent if the login fails.  This should normally, be you login template.
Make sure that somewhere on your template you display
$data.getMessage().  When the login fails, data.setMessage() is called
to store the reason for the login failure.

> # This is the page that is shown on an incorrect login 
> attempt.  It is # referenced in the LoginUser action. Note 
> that it will only be used if # a login template has not been 
> specified (see template.login above). # # Default: Login
> 
> screen.login=
> 

Ignore.  This is only used when template.login is not specified.

> # This is the template that is used by the respective 
> Template based # ErrorScreen for displaying the error. If you 
> are not using a Template based # ErrorScreen, then this is 
> ignored. # # Default: Error.vm
> 
> template.error=Error.vm

This template is displayed when an exception is thrown during the page
generation.  This could be an action that threw the exception, your
screen class, etc...  

The actual exception is added to the context as "processingException"
and the stack trace as "stackTrace".  

> 
> # This is the default error screen.
> #
> # Default: VelocityErrorScreen
> 
> screen.error=VelocityErrorScreen

Ignore.

> 
> # This is the screen that is displayed when the user's web 
> page is in # an invalid state. # # Default: error.InvalidState
> 
> screen.invalidstate=error.InvalidState

Leave this as the default.  It is used by the session validator classes
in cases where a user tries to submit stale form data.  This screen is
then displayed to the user.  This functionality is not enabled by
default.  To use it, you would add a hidden form field called
_session_access_counter in your form.  The value should be set to
$data.User.AccessCounterForSession.

If you are really interested in using this, look at the source code for
a better explaination of how it really works.  I have never used it,
myself.

> 
> # Set the default Doctype.  The default Doctype can be set by 
> using # the single strings: Html40Strict, Html40Transitional, 
> or # Html40Frameset.  Additionally the default can be 
> supplied as two # strings separated by a comma giving the DTD 
> and URI. # # Default: ignored if not set to some value.
> 
> default.doctype=Html40Transitional

Not sure...

> 
> # This is the default action to log a user in.
> 
> action.login=LoginUser
> 

Turbine handles the login and logout actions specially.  If you write
your own implmentation of the login or logout actions, you will need to
update this setting with the new class name.

> # This is the default action to log a user out.
> 
> action.logout=LogoutUser
> 
> --
> To unsubscribe, e-mail:   
> <mailto:turbine-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>