Bootstrap loader for Catalina. This application constructs a class loader for use in loading the Catalina internal classes (by accumulating all of the JAR files found in the 'server' directory under 'catalina.home'), and starts the regular execution of the container.
- This tutorial will explain about how to use bootstrap script in AWS What is Bootstrap Script(Bootstrapping) in AWS? Bootstrapping allows us to write and put a startup script while launching an EC2 Instance so that it execute automatically as soon as the instance launch.
- To understand how Tomcat resolves classpath, take a look at this outline of the Tomcat 6 startup process: The JVM bootstrap loader loads the core Java libraries. Incidentally, this is the one place where environment variables do matter, as the JVM locates the core libraries using the JAVAHOME variable.
(Continued from page 2)
For testing purposes, I'll add a 'Howdy' message from the doGet() method of TestServlet.
Tomcat Bootstrap Templates
We'll need to add a Context entry to Tomcat's server.xml to tell TomcatSW the project's docBase and the URL path that should be used to access to project.
I'll create a Debug Configuration for the 'dynamic-web-test' project, specifying that org.apache.catalina.startup.Bootstrap is the main class (this is contained in the Tomcat bootstrap.jar file).
We can set the Working directory to be the home directory of our Tomcat installation.
If we fire up our project in the Debug Configuration that we just created and then try hitting TestServlet in a web browser, you can see that we indeed can hit the servletW, since we are greeted by the 'Howdy' message.
In conclusion, it is quite easy to set up a Tomcat bootstrap debug configuration to run a Dynamic Web Project in EclipseSW. This technique is slightly more involved than setting up a Server configuration in Eclipse to run your project, but it is on the whole quite simple. Although features such as setting breakpoints in jsp's may not work if you run your project using the bootstrap method, working on your project on standard development tasks will typically be much smoother using the Tomcat Bootstrap class. The Server configuration is nice in terms of being able to click a couple times to run a web application, but it hides some project configuration details which can be annoying when you're trying to resolve difficult issues. The Bootstrap debug configuration technique covered in this tutorial exposes more details, which can simplify your debugging efforts. I recommend giving it a try. You may find that one technique works better for a particular task, and at other times, the other technique works better.
Tomcat Bootstrap Download
- Eclipse :: How do I debug my web project in Tomcat from Eclipse?