Skip to Content

Access Java Servlet on deployed on SCP

Nov 14, 2017 at 11:47 AM


avatar image


I have created a Java servlet "hello world" application. It has no errors deploying, it runs fine on the cloud platform but calling the end points give me a 404. Why?

The code:

public class HelloWorldServlet extends HttpServlet {

    private static final long serialVersionUID = 1L;
    public HelloWorldServlet() {
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
	response.getWriter().println("Hello World!");

The application is running:

The log tells me none of the endpoints are found:

one.png (80.1 kB)
two.png (141.7 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Ivan Mirisola
Dec 22, 2017 at 05:45 PM

Hi Jorg,

If you are using the SDK on Eclipe select the deployed application on the Cloud server and right-click on it. Then open the menu URL --> Open. This will launch the browser with the correct URL pointing to the application's context.

SCP uses the application name used during deploy to establish the prefix for it like .

*HOWEVER*, it uses the WAR name to deploy it in a "context". In that sense, if the file name used to deploy is jcoproxy.war it will create a context named jcoproxy. With that said, you app servlet will be behind this context like this:

If you wish to deploy your app at the context root, then you need to rename the war file as ROOT.WAR. This will place your app so that the URL will be:


10 |10000 characters needed characters left characters exceeded