cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Deploying Servlet

Former Member
0 Kudos

Hallo,

I have write a simple Servlet to test Deploying on J2EE Engine.

I create a WEB Project and a EAR Project.

In the EAR Project the WAR-file is included.

Now i give on application.xml the WAR-File a Context Root like "servlet".

I Deploy and test it with the url "http://host:50000/servlet" but it dosn't work.

I become the Message:

You are not authorized to view the content of the requested directory.

 Details: Directory listing is not allowed on this server.

Any Idea?

Thanks,

Robin

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Robin,

In order to access the root directory of the application, you have to perform servlet-mapping in the web.xml:

<servlet-mapping>
  <servlet-name>YourServletName</servlet-name>
  <url-pattern>/</url-pattern>
</servlet-mapping>

Or you can access the servlet directly with http://<host>:<port>/<contextRoot>/servlet/<servlet-name>.

Hope that helps!

Vladimir

Former Member
0 Kudos

Thanks Vladimir,

Now its works fine.

i have forgotten to set the servlet mapping.

Regards,

Robin

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

in addition to Vladimir's reply, I'd like to point you to some documentation that elaborates on the ways you can invoke a servlet, and the way the Web Container initializes servlets in the different cases. Here's the page: http://help.sap.com/saphelp_nw04/helpdata/en/bb/f2b9d88ba4e8459e5a69cb513597ec/frameset.htm

Regards,

Ivo

Former Member
0 Kudos

Hi,

You can check which applications are available by checking your HTTP provider service.

See if you servlet application is listed there...

Former Member
0 Kudos

Hi,

Where can i find the HTTP provider service?

Regards,

Robin