XML配置文件出现如下错误??
the processing istruction target "[xX][mM][lL]"matching is not allowed
这个是为啥 如何更改??
------解决方案--------------------貌似是版本问题,
在<web-app>前面加
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
<web-app>
<display-name>HelloApp Struts Application</display-name>
<Servlet>
<Servlet-name>action</Servlet-name>
<Servlet-class>org.apache.struts.action.ActionServlet</Servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/Web-INF/struts-config.xml</param-value></init-param>
<load-on-startup>2</load-on-startup></Servlet>
<Servlet-mapping>
<Servlet-name>action</Servlet-name>
<url-pattern>*.do</url-pattern></Servlet-mapping>
<welcome-file-list>
<welcome-file>hello.jsp</welcome-file></welcome-file-list>
<taglib>
<taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location></taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location></taglib>
<taglib>
<taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location></taglib>
</web-app>
------解决方案--------------------应该就是
空指针异常吧,从5楼的代码看,应该是 /HelloWorld.do?place=1 映射的page出问题了
------解决方案--------------------