0

I am getting this error in RAD Web Application 3.0 Deployment Descriptor Editor:

Servlet Mapping (index):

Servlet Name:The value is not among the possible selections

Then under my Markers:

Web Problem:

The servlet mapping "index" refers to a servlet that is not defined

web.xml

/myweb/WebContent/WEB-INF

Unknown Web Problem

My web.xml as follows:

<?xml version="1.0" encoding="UTF-8"?>
<web-app id="WebApp" version="3.0" 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_3_0.xsd">
...
    <servlet>
        <display-name>index</display-name>
        <servlet-name>index</servlet-name>
        <jsp-file>/jsp/index.jsp</jsp-file>
    </servlet>
    <servlet-mapping>
        <servlet-name>index</servlet-name>
        <url-pattern>/index</url-pattern>
    </servlet-mapping>
...
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
</web-app>

wonder what am i doing wrong..?

takajode
  • 23
  • 5

4 Answers4

0

Its possible to map your servlet to /index, but if you want it at the root address you need to map it at /

Lukas Eichler
  • 5,689
  • 1
  • 24
  • 43
0

Error I think is in the url pattern which you are using

use /index at welcome file list name

or directly specify /jsp/index.jsp

Nirbhay Mishra
  • 1,629
  • 3
  • 19
  • 35
0

I just commented the declarations, saved and rebuild the project.. then it disappeared.. uncomment them back and seems ok again.. @.@ must have been one of those days..

takajode
  • 23
  • 5
0

first, for the servlet-name of index must be allowed.

then, where dose your servlet-class locate? is it in the src directory?

please make sure. Good luck!

Hunter Zhao
  • 4,589
  • 2
  • 25
  • 39