cancel
Showing results for 
Search instead for 
Did you mean: 

Servlet URL on server?

Former Member
0 Kudos

Hello,

just a simple question, but I can't find the answer... I want to write a servlet for Netweaver 7.1 CE. So I created my WebApp DC, created a new servlet "MyServlet" and configured as following the web.xml

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" 
xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" 
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5">
  <display-name>My Servlet</display-name>
  <welcome-file-list>
    <welcome-file>index.html</welcome-file>
  </welcome-file-list>
  <servlet>
    <description>My new servlet</description>
    <display-name>MyServlet</display-name>
    <servlet-name>MyServlet</servlet-name>
    <servlet-class>de.aseaco.test.MyServlet</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>MyServlet</servlet-name>
    <url-pattern>/test/MyServlet</url-pattern>
  </servlet-mapping>
</web-app>

I expected now that I can access my servlet with http://server:port/test/MyServlet

But I only get 404 Resource not found - In the NWA I can see the servlet and the url-pattern I gave...

Should be simple

Thx in advance, Frank

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Okay I forgot the application name in the request... Stupid

Former Member
0 Kudos

Could you (or anyone else) post the complete url pattern for a servlet inside an imported war that is added to a coposite ear?

Former Member
0 Kudos

OK, seams like adding an imported war to an dc-ear does not deploy the war. You still have to deply manually via the Deployment-Perspective. Then, of course, the url is as expected host:port/appname/servletmappingname