0

我想在 IBM RAD 8.5.1 的 java web 项目中添加一个新的 servlet 映射

我的应用程序中已经存在两个 servlet:ServletOne 和 ServletTwo

但是当我做新的> servlet映射时,它在向导中给出了以下错误:

This wizard is not applicable for projects without web.xml file.

web.xml 已经存在于项目中,并具有以下内容:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp_ID" version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee     http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <display-name>MyApplication</display-name>
        <servlet>
        <servlet-name>ServletOne</servlet-name>
        <servlet-class>com.myclass.ClassOne</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
        <servlet-name>ServletTwo</servlet-name>
        <servlet-class>com.myclass.ClassTwo</servlet-class>
        <load-on-startup>1</load-on-startup>
    </servlet>  
    <welcome-file-list>
        <welcome-file>index.html</welcome-file>
        <welcome-file>index.htm</welcome-file>
        <welcome-file>index.jsp</welcome-file>
        <welcome-file>default.html</welcome-file>
        <welcome-file>default.htm</welcome-file>
        <welcome-file>default.jsp</welcome-file>
    </welcome-file-list>
</web-app>

web.xml 的位置是:/WebContent/WEB-INF/

我尝试直接在 web.xml 源 xml 文件中添加 servlet 映射,但随后在 servlet 名称中出现以下错误:

The value is not among the possible selectors

有人可以帮忙吗?

4

0 回答 0