Lomboz开发JSTL和EL

05-11-03 simpson
在配置web.xml过程中
tomcat启动时总是报错
下面是tomcat 所报的错误:

信息: Installing web application at context path /demoWeb2 from URL file:D:/java/jakarta-tomcat/webapps/demoWeb2
2005-4-22 10:47:18 org.apache.commons.digester.Digester fatalError
严重: Parse Fatal Error at line 1 column 7: The processing instruction target matching "[xX][mM][lL]" is not allowed.
org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.

我的web.xml的配置内容是
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>

</web-app>

请问那位高手知道 配置的xml文件 在什么地方出现了问题?
十分感谢!~

simpson
2005-11-03 09:51
<?xml version="1.0" encoding="ISO-8859-1"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">



<!-- Remove the comments below to define a servlet. -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- <servlet> -->
<!-- <servlet-name>MyServlet</servlet-name> -->
<!-- <servlet-class>examples.MyServlet</servlet-class> -->
<!-- <init-param> -->
<!-- <param-name>myparam</param-name> -->
<!-- <param-value>12345</param-value> -->
<!-- </init-param> -->
<!-- </servlet> -->
<!-- -->
<!-- -->
<!-- <servlet-mapping> -->
<!-- <servlet-name>MyServlet</servlet-name> -->
<!-- <url-pattern>/mine/*</url-pattern> -->
<!-- </servlet-mapping> -->
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>

<error-page>
<error-code>404</error-code>
<location>/error.jsp</location>
</error-page>

</web-app>

simpson
2005-11-03 09:51

<?xml version="1.0" encoding="ISO-8859-1"?> 
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" 
version="2.4"> 



	<!-- Remove the comments below to define a servlet.          -->
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
	<!--     <servlet>                                           -->
	<!--       <servlet-name>MyServlet</servlet-name>            -->
	<!--       <servlet-class>examples.MyServlet</servlet-class> -->
	<!--       <init-param>                                      -->
	<!--         <param-name>myparam</param-name>                -->
	<!--         <param-value>12345</param-value>                -->
	<!--       </init-param>                                     -->
	<!--     </servlet>                                          -->
	<!--                                                         -->
	<!--                                                         -->
	<!--     <servlet-mapping>                                   -->
	<!--           <servlet-name>MyServlet</servlet-name>        -->
	<!--           <url-pattern>/mine/*</url-pattern>            -->
	<!--     </servlet-mapping>                                  -->
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<welcome-file-list>
		<welcome-file>index.jsp</welcome-file>
	</welcome-file-list>

	<error-page>
		<error-code>404</error-code>
		<location>/error.jsp</location>
	</error-page>

</web-app>
<p class="indent">

simpson
2005-11-03 09:55
第三个 帖子是xml文件的具体配置 请高手指点!~谢谢

banq
2005-11-03 11:57
你的web.xml使用的是2.4,要保证容器也支持2.4版本,你使用2.3头部试验看看,如果无就是此问题

simpson
2005-11-07 13:49
如何可以看他容器版本呢?

猜你喜欢