Installing Tomcat 7 on Windows (Manually)

With the June 2012 release, m-Power now fully supports the use of Tomcat 7.

Tomcat 7 has been packaged into an exe for your convenience. If you’d rather use the exe for a much easier install, please follow the instructions here.

Current customers wishing to install Tomcat 7 need to follow the steps listed below:
Note: For your convenience, we recommend completing the following steps directly on your m-Power server.
Note: The following instructions assume a typical Windows installation located in c:\Program Files\mrc\development\m-power. If this is not your case, please adjust the steps below accordingly.
Note: You must be running the June 2012 update of m-Power or later to run Tomcat 7.

  1. Download Tomcat 7 from mrc by clicking on the following link:
    Tomcat 64-bit
  2. Stop your current development instance of Tomcat.
  3. In C:\Program Files\mrc\development\m-power rename the tomcat folder to tomcat6.
  4. Extract the .zip file downloaded in Step 1 to the development C:\Program Files\mrc\development\m-power folder.
  5. Edit the C:\Program Files\mrc\development\m-power\tomcat\conf\server.xml file in notepad. Near the end of the document, verify that the docBase for each <Context> is pointing at the correct folder location. Additionally, search for Connector port=8011 and modify this, if necessary to the Tomcat port you were using prior to the upgrade.
  6. Navigate to the C:\Program Files\mrc\development\m-power\mrcwebgui\WEB-INF folder. Delete the web.xml file. Rename web.xml_tomcat7 to web.xml
  7. Navigate to the C:\Program Files\mrc\development\m-power\proddata\lib folder. Delete the servlet.jar file. Rename servlet.jar_tomcat7 to servlet.jar
  8. Navigate to the C:\Program Files\mrc\development\m-power folder and find the update-webxml.bat file. Double click it. This file needs to be run so that all existing programs are mapped to the web.xml so they can be accessible via Tomcat.
  9. Uninstall Tomcat 6 as a Windows service & Install Tomcat 7 as a Windows service by double clicking on C:\Program Files\mrc\development\m-Power\tomcat\Install TC7 Dev.bat.
    Note: Uninstaller assumes that your existing Tomcat 6 Development instance was called TC6DEV. If it is not, please edit the .bat file and change the existing service name accordingly.
    Note: Installer assumes you are running JDK 1.6.0_25. If not, please modify this bat file and change the reference from 1.6.0_25 to the correct version on your m-Power server.
  10. If you had any nightly jobs that stopped and started Tomcat 6 nightly, please adjust them to reference TC7DEV rather than TC6DEV.

Once you have verified that all is in proper working order, please repeat the steps listed above for the production version of Tomcat. Be sure to change all references from TC7DEV to TC7PROD.

Note: Tomcat 7 requires that every application created must exist in the C:\Program Files\mrc\development\m-power\mrcjava\WEB-INF\web.xml file. Existing applications will automatically be added when the update-webxml.bat program is run. New applications generated in Tomcat 7 will automatically add the necessary entries to web.xml on compile. However, this will only handle your development instance. For production, one of the following approaches must be run every time a new program is promoted:

  • Option 1: Promote the web.xml using the Promote to Production utility.
  • Option 2: Run the update-web.xml bat within your production /m-power folder.
  • Option 3: Copy the web.xml file from C:\Program Files\mrc\development\m-power\mrcjava\WEB-INF to C:\Program Files\mrc\production\m-power\mrcjava\WEB-INF

Note: Once you are running Tomcat 7, you will need to keep the web.xml file in m-power\mrcwebgui\WEB-INF updated after applying new updates. After taking an update, rename the web.xml file in m-power\mrcwebgui\WEB-INF to web.xml_tomcat6 and then rename the web.xml_tomcat7 file to web.xml. After doing this, restart Tomcat. This will ensure you are always using the latest version of this file. The web.xml file in m-power\mrcjava\WEB-INF will not be affected by updates and as such does not require any additional steps after taking an update.

Note: Any customization made to the Tomcat 6 files (such as SSL, context paths, web.xml, etc.) will need to be configured again to the file in the new Tomcat 7 folder. This includes any Tomcat memory allocation changes made. To change your new Tomcat 7 memory, please follow these instructions:

  1. Open a PC command line.
  2. Type cd \m-power\tomcat\bin
    (Editor’s Note: Use the actual path that m-Power is installed at.)
  3. Next, type tomcat7w //ES//TC7DEV where TC7DEV is the service name you chose in the previous step.
  4. A window will pop up. Switch to the Java tab.
  5. Change the Java Virtual Machine option to: C:\Program Files\Java\jdk1.8.0_40\jre\bin\server\jvm.dll.
    Note: Make sure this path is pointing to the correct file on your server.
  6. Add the following six lines to the end of the Java Options window:
  7. -Xmx1024m

  8. Hit OK.
  9. Start the service as you usually would.

Related Posts:

Leave a Reply

Your email address will not be published. Required fields are marked *