Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Assume you have installed Tomcat6 or Tomcat5 in /opt/tomcat directory.

Code Block
none
none
ztoy:~/s zemian$ ./new_tomcat_instance.groovy /opt/tomcat mytomcat
Create new instance dir /opt/tomcat/instances/mytomcat
Create server.xml file with httpPort 8081, httpPort 8081
Create tomcat-user.xml file with manager role user.
Create catalina-mytomcat.sh file
Create ROOT webapp
Create ROOT webapp web.xml
Create ROOT webapp index.jsp
Done.
To Start Server: /opt/tomcat/bin/catalina-mytomcat.sh start
To View Browser: http://127.0.0.1:8081

...

To remove a previous installed instance

Code Block
none
none
ztoy:~/s zemian$ ./delete_tomcat_instance.groovy /opt/tomcat mytomcat

...

This script will create a new webapp directory structure with all the Groovlet setup ready.

Code Block
none
none
ztoy:~/s zemian$ ./new_webapp.groovy /opt/tomcat/instances/mytomcat/webapps mywebapp
Create webapp
Copy groovy jar to lib
     [copy] Copying 1 file to /opt/tomcat/instances/mytomcat/webapps/mywebapp/WEB-INF/lib
Create webapp web.xml
Create webapp index.gsp
Create webapp mysqlreport.groovy
Create webapp mysqlreport.gsp
Done.

...