严重: Parse error in application web.xml
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][
mM][lL]" is not allowed.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.commons.digester.Digester.parse(Digester.java:1548)
        at org.apache.catalina.startup.ContextConfig.applicationConfig(ContextCo
nfig.java:263)
        at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:62
4)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfi
g.java:216)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4
290)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:823)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
7)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)        at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDep
loyer.java:277)
        at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.j
ava:701)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432
)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java
:349)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Lifecycl
eSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)        at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478
)
        at org.apache.catalina.core.StandardService.start(StandardService.java:4
80)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:231
3)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
2008-5-22 12:56:23 org.apache.catalina.startup.ContextConfig applicationConfig
严重: Occurred at line 1 column 10
2008-5-22 12:56:23 org.apache.catalina.startup.ContextConfig start
严重: Marking this application unavailable due to previous error(s)
2008-5-22 12:56:23 org.apache.catalina.core.StandardContext start
严重: Error getConfigured

解决方案 »

  1.   

      <!-- The default servlet for all web applications, that serves static     -->
      <!-- resources.  It processes all requests that are not mapped to other   -->
      <!-- servlets with servlet mappings (defined either here or in your own   -->
      <!-- web.xml file.  This servlet supports the following initialization    -->
      <!-- parameters (default values are in square brackets):                  -->
      <!--                                                                      -->
      <!--   debug               Debugging detail level for messages logged     -->
      <!--                       by this servlet.  [0]                          -->
      <!--                                                                      -->
      <!--   input               Input buffer size (in bytes) when reading      -->
      <!--                       resources to be served.  [2048]                -->
      <!--                                                                      -->
      <!--   listings            Should directory listings be produced if there -->
      <!--                       is no welcome file in this directory?  [true]  -->
      <!--                                                                      -->
      <!--   output              Output buffer size (in bytes) when writing     -->
      <!--                       resources to be served.  [2048]                -->
      <!--                                                                      -->
      <!--   readonly            Is this context "read only", so HTTP           -->
      <!--                       commands like PUT and DELETE are               -->
      <!--                       rejected?  [true]                              -->
      <!--                                                                      -->
      <!--   readmeFile          File name to display with the directory        -->
      <!--                       contents. [null]                               -->
      <!--                                                                      -->
      <!--  For directory listing customization. Checks localXsltFile, then     -->
      <!--  globalXsltFile, then defaults to original behavior.                 -->
      <!--                                                                      -->
      <!--   localXsltFile       Make directory listings an XML doc and         -->
      <!--                       pass the result to this style sheet residing   -->
      <!--                       in that directory. This overrides              -->
      <!--                        globalXsltFile[null]                          -->
      <!--                                                                      -->
      <!--   globalXsltFile      Site wide configuration version of             -->
      <!--                       localXsltFile This argument is expected        -->
      <!--                       to be a physical file. [null]                  -->
      <!--                                                                      -->
      <!--                                                                      -->    <servlet>
            <servlet-name>default</servlet-name>
            <servlet-class>
              org.apache.catalina.servlets.DefaultServlet
            </servlet-class>
            <init-param>
                <param-name>debug</param-name>
                <param-value>0</param-value>
            </init-param>
            <init-param>
                <param-name>listings</param-name>
                <param-value>true</param-value>
            </init-param>
            <load-on-startup>1</load-on-startup>
        </servlet>
      

  2.   

    <!-- The "invoker" servlet, which executes anonymous servlet classes      -->
      <!-- that have not been defined in a web.xml file.  Traditionally, this   -->
      <!-- servlet is mapped to the URL pattern "/servlet/*", but you can map   -->
      <!-- it to other patterns as well.  The extra path info portion of such a -->
      <!-- request must be the fully qualified class name of a Java class that  -->
      <!-- implements Servlet (or extends HttpServlet), or the servlet name     -->
      <!-- of an existing servlet definition.     This servlet supports the     -->
      <!-- following initialization parameters (default values are in square    -->
      <!-- brackets):                                                           -->
      <!--                                                                      -->
      <!--   debug               Debugging detail level for messages logged     -->
      <!--                       by this servlet.  [0]                          --><!--
        <servlet>
            <servlet-name>invoker</servlet-name>
            <servlet-class>
              org.apache.catalina.servlets.InvokerServlet
            </servlet-class>
            <init-param>
                <param-name>debug</param-name>
                <param-value>0</param-value>
            </init-param>
            <load-on-startup>2</load-on-startup>
        </servlet>
    -->
      <!-- The JSP page compiler and execution servlet, which is the mechanism  -->
      <!-- used by Tomcat to support JSP pages.  Traditionally, this servlet    -->
      <!-- is mapped to the URL pattern "*.jsp".  This servlet supports the     -->
      <!-- following initialization parameters (default values are in square    -->
      <!-- brackets):                                                           -->
      <!--                                                                      -->
      <!--   checkInterval       If development is false and reloading is true, -->
      <!--                       background compiles are enabled. checkInterval -->
      <!--                       is the time in seconds between checks to see   -->
      <!--                       if a JSP page needs to be recompiled. [300]    -->
      <!--                                                                      -->
      <!--   compiler            Which compiler Ant should use to compile JSP   -->
      <!--                       pages.  See the Ant documentation for more     -->
      <!--                       information. [javac]                           -->
      <!--                                                                      -->
      <!--   classdebuginfo      Should the class file be compiled with         -->
      <!--                       debugging information?  [true]                 -->
      <!--                                                                      -->
      <!--   classpath           What class path should I use while compiling   -->
      <!--                       generated servlets?  [Created dynamically      -->
      <!--                       based on the current web application]          -->
      <!--                                                                      -->
      <!--   development         Is Jasper used in development mode (will check -->
      <!--                       for JSP modification on every access)?  [true] -->
      <!--                                                                      -->
      <!--   enablePooling       Determines whether tag handler pooling is      -->
      <!--                       enabled  [true]                                -->
      <!--                                                                      -->
      <!--   fork                Tell Ant to fork compiles of JSP pages so that -->
      <!--                       a separate JVM is used for JSP page compiles   -->
      <!--                       from the one Tomcat is running in. [true]      -->
      <!--                                                                      -->
      <!--   ieClassId           The class-id value to be sent to Internet      -->
      <!--                       Explorer when using <jsp:plugin> tags.         -->
      <!--                       [clsid:8AD9C840-044E-11D1-B3E9-00805F499D93]   -->
      <!--                                                                      -->
      <!--   javaEncoding        Java file encoding to use for generating java  -->
      <!--                       source files. [UTF8]                           -->
      <!--                                                                      -->
      <!--   keepgenerated       Should we keep the generated Java source code  -->
      <!--                       for each page instead of deleting it? [true]   -->
      <!--                                                                      -->
      <!--   mappedfile          Should we generate static content with one     -->
      <!--                       print statement per input line, to ease        -->
      <!--                       debugging?  [true]                            -->
      <!--                                                                      -->
      <!--   trimSpaces          Should white spaces in template text between   -->
      <!--                       actions or directives be trimmed?  [false]     -->
      <!--                                                                      -->
      <!--   reloading           Should Jasper check for modified JSPs?  [true] -->
      <!--                                                                      -->
      <!--   suppressSmap        Should the generation of SMAP info for JSR45   -->
      <!--                       debugging be suppressed?  [false]              -->
      <!--                                                                      -->
      <!--   dumpSmap            Should the SMAP info for JSR45 debugging be    -->
      <!--                       dumped to a file? [false]                      -->
      <!--                       False if suppressSmap is true                  -->
      <!--                                                                      -->
      <!--   genStrAsCharArray   Should text strings be generated as char       -->
      <!--                       arrays, to improve performance in some cases?  -->
      <!--                       [false]                                        -->
      <!--                                                                      -->
      <!--   errorOnUseBeanInvalidClassAttribute                                -->
      <!--                       Should Jasper issue an error when the value of -->
      <!--                       the class attribute in an useBean action is    -->
      <!--                       not a valid bean class?  [true]                -->
      <!--                                                                      -->
      <!--   scratchdir          What scratch directory should we use when      -->
      <!--                       compiling JSP pages?  [default work directory  -->
      <!--                       for the current web application]               -->
      <!--                                                                      -->
      <!--   xpoweredBy          Determines whether X-Powered-By response       -->
      <!--                       header is added by generated servlet  [false]  -->
      <!--                                                                      -->
      <!-- If you wish to use Jikes to compile JSP pages:                       -->
      <!--   Set the init parameter "compiler" to "jikes".  Define              -->
      <!--   the property "-Dbuild.compiler.emacs=true" when starting Tomcat    -->
      <!--   by adding the above to your CATALINA_OPTS environment variable.    -->
      <!--   If you get an error reporting that jikes can't use UTF8 encoding,  -->
      <!--   try setting the init parameter "javaEncoding" to "ISO-8859-1".     -->   
      

  3.   

     <servlet>
            <servlet-name>jsp</servlet-name>
            <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
            <init-param>
                <param-name>fork</param-name>
                <param-value>false</param-value>
            </init-param>
            <init-param>
                <param-name>xpoweredBy</param-name>
                <param-value>false</param-value>
            </init-param>
            <load-on-startup>3</load-on-startup>
        </servlet>
      <!-- Server Side Includes processing servlet, which processes SSI         -->
      <!-- directives in HTML pages consistent with similar support in web      -->
      <!-- servers like Apache.  Traditionally, this servlet is mapped to the   -->
      <!-- URL pattern "*.shtml".  This servlet supports the following          -->
      <!-- initialization parameters (default values are in square brackets):   -->
      <!--                                                                      -->
      <!--   buffered            Should output from this servlet be buffered?   -->
      <!--                       (0=false, 1=true)  [0]                         -->
      <!--                                                                      -->
      <!--   debug               Debugging detail level for messages logged     -->
      <!--                       by this servlet.  [0]                          -->
      <!--                                                                      -->
      <!--   expires             The number of seconds before a page with SSI   -->
      <!--                       directives will expire.  [No default]          -->
      <!--                                                                      -->
      <!--   isVirtualWebappRelative                                            -->
      <!--                       Should "virtual" paths be interpreted as       -->
      <!--                       relative to the context root, instead of       -->
      <!--                       the server root?  (0=false, 1=true) [0]        -->
      <!--                                                                      -->
      <!--                                                                      -->
      <!-- IMPORTANT: To use the SSI servlet, you also need to rename the       -->
      <!--            $CATALINA_HOME/server/lib/servlets-ssi.renametojar file   -->
      <!--            to $CATALINA_HOME/server/lib/servlets-ssi.jar             -->