Web resource is not displayed


 

+

Search Tips   |   Advanced Search

 

Use this information to troubleshoot problems that occur when attempting to display a resource in a browser. If not able to display a resource in the browser, follow these steps:

  1. Verify that the HTTP server is healthy...

      http://myWebServer

    The Welcome page indicates whether the HTTP server is up and running, regardless of the state of WAS.

  2. If Welcome page does not appear, diagnose the Web server problem.

  3. If the HTTP server appears to function correctly, try to access the resource directly.

    If the URL is incorrect and it is created as a link from another JSP, servlet, or HTML file, try correcting it in the browser URL field and reloading, to confirm that the problem is a malformed URL. If so, correct the URL in the "from" HTML file, servlet or JSP file.

    If the URL appears to be correct, but we cannot access the resource directly through the appserver, verify the health of the hosting Application Server and Web module:

    1. View the hosting Application Server and Web module in the admin console to verify that they are up and running.

    2. Copy a simple HTML or JSP file, such as SimpleJsp.jsp, which is in the WAS directory structure, to the Web module document root, and try to access the file. If successful, the problem is with the resource.

      View the JVM log of the appserver to find out why the resource cannot be found or served .

  4. If we can access the resource directly through the appserver, but not through an HTTP server, the problem lies with the HTTP plug-in, the component that communicates between the HTTP server and the WAS.

  5. If the JSP file and the servlet output are served, but not static resources such as .html and image files, see the steps for enabling file serving.

  6. If certain resources display correctly, but we cannot display a servlet by its class name:

    • Verify that the servlet is in a directory in the Web module class path, such as in...

        /Web_module_name.war/WEB-INF/classes

    • Verify that specify the full class name of the servlet, including its package name, in the URL.

    • Verify that "/servlet" precedes the class name in the URL. For example, if the root context of a Web module is "myapp", and the servlet is...

        com.mycom.welcomeServlet

      ...then the URL reads...

        http://hostname/myapp/servlet/com.mycom.welcomeServlet

    • Verify that serving the servlets by class name is enabled for the hosting Web module by opening the source Web module in an assembly tool and browsing the serve servlets by classname setting in the IBM Extensions property page. If necessary, enable this flag and redeploy the Web module.

    • For servlets or other resources served by mapped URLs, the URL is...

        http://hostname/Web module context root/mappedURL

If none of these steps fixes the problem, see if the problem has been identified and documented by looking at available online support (hints and tips, technotes, and fixes). If we do not find the problem listed there, see Troubleshooting help from IBM.

 

Diagnosing Web server problems

If unable to view the welcome page of the HTTP server, determine if the server is operating properly.

For Windows, look in the Services panel for the service corresponding to the HTTP server, and verify that the state is Started. If not, start it. If the service does not start, try starting it manually from the command prompt. If using IHS, the command is...

For *nix, run...

There should be several processes running with a name of "httpd". If not, start the HTTP server manually. If using IHS, the command is...

If the HTTP server does not start:

If restoring the HTTP server default configuration file works, manually review the configuration file that has WAS updates to verify directory and file names for WAS files.

If we cannot manually correct the configuration, we can uninstall and reinstall WAS to create a clean HTTP configuration file.

If restoring the default configuration file does not help, contact technical support for the Web server we are using. If we are using IHS with WAS, check available online support (hints and tips, technotes, and fixes). If we do not find the problem listed there, see Troubleshooting help from IBM

 

Accessing a Web resource through the application server and bypassing the HTTP server

We can bypass the HTTP server and access a Web resource through the appserver. It is not recommended to serve a production Web site in this way, but it provides a good diagnostic tool when it is not clear whether a problem resides in the HTTP server, WAS, or the HTTP plug-in. To access a Web resource through the appserver:

  1. Determine the port of the HTTP service in the target appserver.

    1. To see the ports listed for virtual hosts served by the appserver.

        Servers | Application Servers | target_server | Additional Properties | Web Container | Additional Properties | HTTP Transports

    2. There can be more than one port listed. In the default appserver (server1), for example, 9060 is the port reserved for admin requests, 9443 and 9043 are used for SSL-encrypted requests. To test the sample "snoop" servlet, for example, use the default application port 9082, unless it changes.

  2. Use the HTTP transport port number of the appserver to access the resource from a browser. For example, if the port is 9082, the URL is...

      http://hostname:9082/myAppContext/myJSP.jsp

  3. If still unable to access the resource, verify that the HTTP transport port is in the "Host Alias" list:

    1. To check the Default virtual host and the HTTP transport ports used by this appserver.

        Application Servers | Your_ApplicationServer | Web Container | HTTP Transports

    2. To check if the HTTP transport port exists. Add an entry if necessary. For example, if the HTTP port for the application is server is 9082, add a host alias of *:9082.

        Environment | Virtual Hosts | default host | Host Aliases




 

Related tasks

Application startup errors
Deploy enterprise apps