SE452: Configuring Tomcat [14/24] ![]() ![]() ![]() |
Tomcat is configured in the server.xml file loated in "tomcat_root"/conf/
Add a context entry for your webapp
<Server port="8005" shutdown="SHUTDOWN" debug="0"> <Service name="Tomcat-Standalone"> <!-- lots of stuff ... --> <Host name="localhost" debug="0" appBase="webapps" unpackWARs="true"> <!-- SE 452 Context --> <Context path="/se452" docBase="se452" debug="0" reloadable="true" /> <Context path="/myapp" docBase="c:\MyApp" debug="0" reloadable="true" /> <!-- more stuff --> </Host> </Service> </Server>
To configure the listen port, edit the port attribute.
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 --> <Connector className="org.apache.catalina.connector.http.HttpConnector" port="8080" minProcessors="5" maxProcessors="75" enableLookups="true" redirectPort="8443" acceptCount="10" debug="0" connectionTimeout="60000"/>