Modify Tomcat's welcome page

2010-09-19  来源:本站原创  分类:Java  人气:131 

I am in $ tomcat / webapps / directory under the built a myjsp default directory as my website, there is a a.jsp in myjsp file, the file to the default home page as my site.

Modify the configuration file:

First, modify $ tomcat / conf / server.xml file.
In the server.xml file, there is a follows:
... ...
<engine name="Catalina" defaultHost="localhost">
<Host name = "localhost" appBase = "webapps"
unpackWARs = "true" autoDeploy = "true"
xmlValidation = "false" xmlNamespaceAware = "false">
... ...
<host>
</ Engine>
... ...
In <host> </ host> added between the label:

<Context Path="" docBase="myjsp" debug="0" reloadable="true" />

is to specify the virtual directory path name, if you want to enter the ip address only on the display page, then the key is to remain empty;

docBase is the virtual directory path, it defaults to the $ tomcat / webapps / ROOT directory in webapps directory I built a myjsp directory for the directory as my default directory.

debug and reloadable general are set to 0 and true.

Then, modify the $ tomcat / conf / web.xml file.
In the web.xml file, there is a follows:
<welcome-file-list>
<welcome-file> index.html </ welcome-file>
<welcome-file> index.htm </ welcome-file>
<welcome-file> index.jsp </ welcome-file>
</ Welcome-file-list>
In <welcome-file-list> and <welcome-file> index.html </ welcome-file> add on between:

<welcome-file> a.jsp </ welcome-file>

Change port
<Connector port = "8080" maxThreads = "150" minSpareThreads = "25" maxSpareThreads = "75" enableLookups = "false" redirectPort = "8443" acceptCount = "100" debug = "0" connectionTimeout = "20000" disableUploadTimeout = " true "/>

The port "8080" into your port

Save these two files restart the tomcat, in the browser address bar enter "http://localhost:8080/", shows a.jsp page content.

相关文章
  • Modify Tomcat's welcome page 2010-09-19

    I am in $ tomcat / webapps / directory under the built a myjsp default directory as my website, there is a a.jsp in myjsp file, the file to the default home page as my site. Modify the configuration file: First, modify $ tomcat / conf / server.xml fi

  • TOMCAT's how to modify the default home page for your own projects 2011-07-28

    (Most appropriate) The most direct way is to delete the original Root folder under tomcat, will own the project changed its name to Root. My $ tomcat / webapps / directory under the built a myjsp the default directory as my website, there is a a.jsp

  • Update page to modify tomcat 2010-11-08

    Tomcat jsp page for the changes without restarting tomcat the case to date, previously configured, but they forget that the next Baidu, said not so detailed a record here today, through an example, for future reference. First find the tomcat's server

  • How to customize the Tomcat 404 error page 2010-04-01

    In the Tomcat installation directory conf / web.xml final </ web-app> before adding the following code: <error-page> <error-code> 404 </ error-code> <location> / ErrorPage404.jsp </ location> </ Error-page> Common

  • Modify tomcat's user name and password 2010-07-11

    Find D: \ Tomcat 6.0 \ conf, or you install the corresponding path. Use Notepad to open the tomcat-users.xml, modify the user name password. Similar to the following: <? Xml version = '1 .0 'encoding =' utf-8 '?> <tomcat-users> <role rolena

  • Modify Tomcat to run the window title 2010-08-11

    When we start the same PC at the same time when multiple Tomcat, Tomcat command line window on the title are for the Tomcat, it difficult to distinguish. Solution: Modify catalina.bat file set _EXECJAVA=start "Tomcat" %_RUNJAVA% Revised set _EXE

  • tomcat management status page 2010-05-06

    ThreadInfo: tomcat in the thread pool information Max threads: the thread pool can produce the maximum number of threads MinSpareThreads: Minimum idle thread pool threads MaxSpareThreads: maximum idle thread pool threads Current thread count: the cur

  • Access tomcat's jsp page to enter user name and password (XDB) 2010-05-14

    Server upload on the oracle9i, restart the tomcat server and then access jsp pages, need to enter the host's user name and password, really puzzled. A moment later to find a 8080 original is oracle9i occupied port, change it to sql plus which port on

  • Rails modify the default home page, the visit Shique 500, originally created symbol 2010-07-18

    Create the project is successful, delete the public the following new index_controller index page Add name to "index" of the action Configure routing map.root: controller =>: index Open Service Access Home always prompt error, wondering for a

  • Rails modify the default home page, the access Shique 500, originally created symbol 2010-07-18

    Create the project is successful, delete the public the following new index_controller index page Add name to "index" of the action Configure routing map.root: controller =>: index Open Service Access Home always prompt error, wondering for a

  • Ie modify the default view page source program 2010-03-28

    Use the "regedit" to open the registry, locate the following key HKEY_LOCAL_MACHINE | - Software | - Microsoft | - Internet Explorer | - View Source Editor | - Editor Name will be the default value data is set to open source software path, such

  • Change the default directory Tomcat + port + set the default method of page 2010-04-18

    I am in $ tomcat / webapps / directory under the built a myjsp default directory as my website, there is a a.jsp in myjsp file, the file to the default home page as my site. Modify the configuration file: First, modify $ tomcat / conf / server.xml fi

  • tomcat default path and set the default start page 2010-07-06

    First of all, tell us about tomcat default path of configuration methods: I use tomcat 6.0 version of the estimate is almost the other For example: 1 in D drive with the directory to create a new D:\MyJsp 2 modified server.xml file Found <Host>..<

  • DWR + tomcat virtual path at the time of operation 2009-05-27

    DWR to load the default mode for JSP pages <script src="/projectName/dwr/engine.js" text/javascript"></script> <script src="/projectName/dwr/util.js" "text/javascript"></script> <script src=&qu

  • Portlet development based on Tomcat 2009-06-06

    1. Document explains Portlet Based on the Tomcat development LifeRay official based in part on the Quick Start document "Writing a simple JSP Portlet" to streamline sections of the test made in accordance with the document version is RC1, the da

  • Tomcat 6.0.24 and EclipseEE 3.5.1 2010-03-29

    1, configure the server operating environment EclipseEE 3.5.1 - Window - Preferences - Server - Runtime Environments Add to add Apache - Apache Tomcat v6.0 Name: Set the server name Tomcat installation directory: Tomcat unzip directory JRE: here can

  • TOMCAT cluster configuration 2010-03-29

    TOMCAT cluster configuration My operating environment: Windows2003 Server SP4 + J2SDK1.5.0 + Tomcat5.5.9 Preparation software Tomcat 5.5.9 JDK1.5.0 1. Configuration 1, install JDK1.5.0. Use the default installation can be. 2, install tomcat into the

  • Notes from Tomcat and IIS integration 2010-03-29

    Documents and version: Download Tomcat: Apache Tomcat 6.0.18 File Name: apache-tomcat-6.0.18.exe Java JDK: JDK 1.6.11 (JDK 6 u11) the file name: jdk-6u11-windows-i586-p.exe Connector: jk2 file name: isapi_redirector2.dll Registry file name: jk2.reg I

  • Confusion on the page coding 2009-12-13

    Add a picture submitted can not be changed to png format does not work, click submit, save as a draft is to work. . . . . . . . . . . . . . . . . . . . Are habits. . . . . . . . . . . Chinese garbled garbled jsp to servlet inside jsp mysql support of

  • tomcat memory settings method 2009-03-28

    Tomcat memory setting method We all know that windows in, JAVA program will start JVM will allocate an initial memory and maximum memory to this application. The initial memory and maximum memory to some extent will affect the program's performance.