谢了一个Web.xml文件,一个验证码的URL请求解析配置调用到受理类,但是配置报错出错如下:谢谢指导
<servlet>
<description>输出验证码</description>
<display-name>This is the display name of my J2EE component</display-name>
<servlet-name>PictureCheckCode</servlet-name>
<servlet-class><SPAN style="COLOR: #ff0000">Control.PictureCheckCode</SPAN></servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>PictureCheckCode</servlet-name>
<url-pattern>/<SPAN style="COLOR: #ff0000">PictureCheckCode</SPAN></url-pattern>
</servlet-mapping>
<welcome-file-list>
<welcome-file>verifi_1.jsp</welcome-file>
</welcome-file-list>
错误信息:cvc-complex-type.2.2: Element 'url-pattern' must have no element [children], and the value must be valid.
给你个参考:
<servlet-mapping>
<servlet-name>PictureCheckCode</servlet-name>
<url-pattern>/PictureCheckCode</url-pattern>
</servlet-mapping>
该方法可行,谢谢了,好久没看贴了
url-pattern的值不合法。你修改一下试试。
嗯嗯