and I missed one other step... if you want torque to generate the OM layer 
for you, all you need to do is issue the command 

  maven torque:om

and your Base and BasePeer classes will be generated.

Jeffery

On Tue, 25 Jan 2005, Michael Kunze wrote:

> sergiu gordea wrote:
> 
> > I would like to find out which is the best way o initialize the turbine 
> > on tomcat start up?
> > 
> >  Is is possible to fix this problem just with configuration options? Or 
> > should I write some code?
> 
> Hello,
> 
> i do not fully understand what you want to archieve. Just in case you 
> want to get started you should follow this little HowTo from Jeffery 
> which he posted a few days ago. It helped me alot btw ;)
> 
> ----------------------------------------------------------------------------
>      #
>      # build.properties - for META
>      #
> 
>      #
>      # Application Server configuration
>      #
>      maven.appserver.home = <directory_for_appserver_home>
>      maven.appserver.name = tomcat
> 
>      #
>      # app config
>      #
>      turbine.app.name = <appname>
>      turbine.app.flavor=turbine-2.3.1
> 
>      #
>      # create the om layer interfaces for torque
>      #
>      turbine.app.om.layer=torque
> 
>      #
>      # don't create demo pages
>      #
>      turbine.app.setup.demo=false
> 
>      #
>      # Inplace dev mode
>      #
>      turbine.plugin.mode=inplace
> 
>      #
>      # Initial ID values for the ID_TABLE
>      #
>      initialID = 1100
>      initialIDValue = 100
>      initialIDStep = 10
> 
>      #
>      # database settings
>      #
>      torque.database=mysql
>      torque.database.driver = com.mysql.jdbc.Driver
>      torque.database.user = myuser
>      torque.database.password = mypassword
>      torque.database.buildUrl = jdbc:mysql://localhost/<appname>
>      torque.database.createUrl = jdbc:mysql://localhost/<appname>
> 
> ----------------------------------------------------------------------------
> 
> 2. change to the webapps directory of your servlet container.
> 3. Create the skeleton for the app
> 
>      % maven -Dturbine.setup.properties=~/build.properties turbine:setup
> 
> 4. change into your webapps/<newapp> directory
> 
> 5. modify the <appname>-schema.xml accordingly (found in
>     src/schema/<appname>-schema.xml)
> 
> 6. Create SQL (all commands run from webapps/<appname> directory
> 
>      1. create the database
>      % maven torque:create-db
> 
>      2. generate SQL code
>      % maven turbine:sql
> 
>      3. put SQL in database
>      % maven torque:insert-sql
> 
> 7. Compile your application
> 
>      % maven java:compile
> 
> no need to deploy since we are inplace development mode
> 
> -----------------------------------------------------------------------
> 
> What he was missing tho is to get tomcat working with it. So the 8th 
> step would be:
> 
> 8. Start tomcat. Point your browser to http://localhost:8080/manager/html
> Login with the password you set during installation of tomcat and use 
> the 'Installation' form on that site (It's the one with the 3 input fields)
> 
> I got it in german so i'm not sure what the actual translation is.
> The first field (context path) would be: /<newapp>
> The second field leave empty. And in the third field you need to put the 
> path to your webapp root folder. It needs to look like this:
> file:C:/path/to/your/webapplication
> 
> Note: You need to prepend 'file:' and you have to use forward slashes. 
> If you did everything fine tomcat should find the 'WEB-INF' folder below 
> the specified folder automatically and you should be ready to go.
> 
> Just in case you didn't got it, the URL to your webapp is:
> http://localhost:8080/<webapp>
> 
> 9. Here is an optional 9th step you'd like to take.
> Find the following file:
> <tomcat root>\conf\Catalina\localhost\<appname>.xml
> open it in editor and add reloadable="true" to the <context> tag as an 
> attribute like this:
> <Context path="/..." docBase="..." reloadable="true">
> 
> That way you can just compile the classes in your favourite IDE and 
> don't need to worry about restarting tomcat.
> 
> Just incase this is crap for the old stagers *g* ignore it. Helped me 
> alot anyway because something like that is really missing on the page...
> 
> Michael
> 
> 


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

Reply via email to