I am trying to add a resource-ref to my web.xml. It looks like this:
<?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>de.so.orderalloc.servlet.web</display-name>
<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>
<servlet>
<display-name>OrderAllocServlet</display-name>
<servlet-name>OrderAllocServlet</servlet-name>
<servlet-class>servlet.OrderAllocServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>OrderAllocServlet</servlet-name>
<url-pattern>/OrderAllocServlet</url-pattern>
</servlet-mapping>
Everything is working as intended. Then I am adding the resource-ref so that it looks like this:
<?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>de.so.orderalloc.servlet.web</display-name>
<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>
<servlet>
<display-name>OrderAllocServlet</display-name>
<servlet-name>OrderAllocServlet</servlet-name>
<servlet-class>servlet.OrderAllocServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>OrderAllocServlet</servlet-name>
<url-pattern>/OrderAllocServlet</url-pattern>
</servlet-mapping>
<resource-ref>
<res-ref-name>jdbc/as400</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
After that if I submit my form I will get this error:
Error 404: com.ibm.ws.webcontainer.servlet.exception.NoTargetForURIException: No target servlet configured for uri: /de.so.orderalloc.servlet.web/OrderAllocServlet
I can't figure out why it breaks when I add the resource-ref. Am I missing something ?
Thanks in advance