I want to add a new servlet mapping in my java web project in IBM RAD 8.5.1
There are already two existing servlets in my application: ServletOne and ServletTwo
but when I do new > servlet mapping, It gives the following error in the wizard:
This wizard is not applicable for projects without web.xml file. The web.xml is already present in the project and has following contents:
<?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> location of web.xml is: /WebContent/WEB-INF/
I tried adding the servlet mapping directly in web.xml source xml file but then it gives following error in servlet name:
The value is not among the possible selectors Can anyone help please?
No comments:
Post a Comment