Network Deployment (Distributed operating systems), v8.0 > Reference > Administrator best practices
Web resource is not displayed
Use this information to troubleshoot problems that occur when attempting to display a resource in a browser.
If you are not able to display a resource in your browser, follow these steps:
- Verify that your HTTP server is healthy by accessing the URL http://server_name
from a browser and seeing whether the Welcome page appears. This action indicates whether the HTTP server is up and running, regardless of the state of WAS.
- If the HTTP server Welcome page does not appear, that is, if you get a browser message like page cannot be displayed or something similar, try to diagnose your web server problem.
- If the HTTP server appears to function correctly, the Application Server might not be serving the target resource. Try to access the resource directly through the Application Server instead of through the HTTP server.
If you cannot access the resource directly through the Application Server, verify that the URL used to access the resource is correct.
If the URL is incorrect and it is created as a link from another JSP file, servlet, or HTML file, try correcting it in the browser URL field and reloading, to confirm that the problem is a malformed URL. Correct the URL in the "from" HTML file, servlet or JSP file.
If the URL appears to be correct, but you cannot access the resource directly through the Application Server, verify the health of the hosting application server and web module:
- View the hosting application server and web module in the administrative console to verify that they are up and running.
- Copy a simple HTML or JSP file, such as SimpleJsp.jsp, which is in the WAS directory structure, to your web module document root, and try to access the file. If successful, the problem is with the resource.
View the JVM log of your Application Server to find out why your resource cannot be found or served .
- If you can access the resource directly through the Application Server, 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.
- 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.
- If certain resources display correctly, but you 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 the /web_module_name.war/WEB-INF/classes directory.
- Verify that you 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 your problem, see if the problem has been identified and documented by looking at available online support (hints and tips, technotes, and fixes). If you do not find your problem listed there, see Troubleshooting help from IBM.
Diagnosing web server problems
If you are unable to view the welcome page of your HTTP server, determine if the server is operating properly.
(Windows) Look in the Services panel for the service corresponding to your 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 you are using IBM HTTP Server, the command is IHS_install_dir\apache .
(AIX) (Solaris) Run the ps -ef | grep with a name of "//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ d". If not, start your HTTP server manually. If you are using IBM HTTP Server, the command is IHS_install_dir/bin/apachectl start.
If the HTTP server does not start:
- Examine the HTTP server error log for clues.
- Try restoring the HTTP server to its configuration prior to installing WAS and restarting it. If you are using IBM HTTP Server:
- Rename the file IHS_install_dir\//publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ d.conf.
- Copy the //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ d.conf.default file to the //publib.boulder.ibm.com/infocenter/wasinfo/v8r0/index.jsp?topic=/ d.conf directory.
- If Apache is running, stop and restart it.
- For the Sun ONE (iPlanet) Web Server, restore the obj.conf configuration file for Sun ONE V4.1 and both obj.conf and magnus.conf files for Sun ONE V6.0 and later.
- For the Microsoft Internet Information Server (IIS), remove the WAS plug-in through the IIS administrative GUI.
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 you cannot manually correct the configuration, you 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 you are using. If you are using IBM HTTP Server with WAS, check available online support (hints and tips, technotes, and fixes). If you do not find your problem listed there, see Troubleshooting help from IBM.
Access a web resource through the application server and bypassing the HTTP server
You can bypass the HTTP server and access a web resource through the application server. It is not recommended to serve a production website 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 Application Server:
- Determine the port of the HTTP service in the target application server.
- In the admin console, click...
> Server Types > WebSphere application servers > application_server > Web container.
- Under the Additional Properties of the web container, click HTTP Transports. You see the ports listed for virtual hosts served by the application server.
- There can be more than one port listed. In the default application server (server1), for example, 9060 is the port reserved for administrative requests, 9443 and 9043 are used for SSL-encrypted requests.
To test the sample "snoop" servlet, for example, use the default application port 9080, unless it changes.
- Use the HTTP transport port number of the application server to access the resource from a browser. For example, if the port is 9080, the URL is http://hostname:9080/myAppContext/myJSP.jsp.
- If you are still unable to access the resource, verify that the HTTP transport port is in the "Host Alias" list:
- Click Servers > Server Types > WebSphere application servers > application_server > Web container > HTTP transports to check the Default virtual host and the HTTP transport ports used by this application server.
- Click Environment > Virtual hosts > default_host > Host Aliases 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 9080, add a host alias of *:9082.
Troubleshoot help from IBM
View JVM logs
Deploy and administering enterprise applications
Related
Application startup errors
Diagnosing and fixing problems: Resources for learning