hi nick,

I'm using a database that has already been created, and as a result I'm not
able to use the turbine user/group/role model, which I guess also means I
can't use the turbine security, correct?


i am myself very new to turbine so i probably can not help much. even 
worse that i use the .vm
files for html generation and don't know nothing about jsp.

but what i know is that you could use your own db instead of turbine's 
by subclassing TurbineUser
class and setting your own then as the user class in 
TurbineResources.properties.

this worked for me. it's not neccesary to implement all methods just the 
ones you need to
check the user/passwd against your db.
to use your db just insert the db, host port and jdbc driver you need in 
TurbineRe....properties file.
you can the access it using the turbine dbpool ... some getConnection() 
if it's the default database or
getConnection(connection_name_in_properties_file_for_a_specific_db).

I'd like to pass and HTTPRequest (or RunData object) to a class of my own
that builds a bean representing the content of the page that is to be

to do this just subclass a Screen from org.apache.turbine.modules.Screen 
and implement the doBuild( RunData data )
method. you will automatically get the rundata from the turbine servlet 
if your screen is the current one.
default screens for homepage, login and error are named in the 
Turbin....properties file where you can easily put
your own to test.

velocity anyway has the context object that does exactly what you like 
to have.
e.g.:
org.apache.turbine.modules.screens.VelocityScreen has a doBuildTemplate 
method which get's the RunData and a Context
object from the system. your class then uses context.put( 
"mynameforthis", Object ) methods to make this context
accessible for .vm pages,screens,navigations ..... you may have a look 
at that. - don't know how this works with jsp -

you may have to restart the tomcat server 
.../pathtoturbine/bin/catalina.sh stop/start to make the changes in the 
.properties file
known to the system.  it is also possible that you have to restart the 
server if you compiled new classes. this behaviour
can be changed by editing the server.xml file to make it always load the 
new classes.

i hope thishelps a bit,
greetings,

klaas


Nick Pomfret wrote:

>I've been getting to grips with turbine for the last two weeks and have come
>to the point where I'd like to start getting 'stuff' into my browser.
>
>I'm using a database that has already been created, and as a result I'm not
>able to use the turbine user/group/role model, which I guess also means I
>can't use the turbine security, correct?
>
>Not quite sure what question I'm trying to ask so instead I'll describe what
>it is I'd like to achieve.
>
>I'd like to pass and HTTPRequest (or RunData object) to a class of my own
>that builds a bean representing the content of the page that is to be
>generated.  Then, that bean should be passed to, or in some way accessed by
>a JSP which renders the HTML.
>
>Without extending Turbine.class or writing my own control servlet how is
>this possible?
>
>I'd like to avoid using .vm files for now (I'll tackle those tomorrow!).
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to