Home > AS/400 Tips > WebSphere Strategies for iSeries professionals > Basic WebSphere troubleshooting concepts
iSeries 400 Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

WEBSPHERE STRATEGIES FOR ISERIES PROFESSIONALS

Basic WebSphere troubleshooting concepts


Jim Mason, search400 expert
02.07.2002
Rating: -3.73- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



[IMAGE]
[IMAGE][IMAGE]
Jim Mason [IMAGE]
[IMAGE]

If you're new to WebSphere, you're sure to come upon some problems that you need help figuring out. This tip introduces WebSphere basic concepts and a simple process to help identify some WebSphere configuration problems quickly.

Keep in mind that these tips are just that and nothing more. HTTP servers and WebSphere can be configured many ways for different environments. These tips are generally applicable to simple, default configurations for the HTTP server and WebSphere for customers just starting out. Complete information on configuration is available for your HTTP server and WebSphere from IBM.

HTTP servers
IBM supplies two HTTP servers on iSeries for running Web applications: the old IBM HTTP server and the new Apache HTTP server. Although they provide similar services, IBM's older HTTP server and the newer Apache HTTP server have different architectures and are configured differently. HTTP servers basically serve Web resources in response to requests from clients (usually Web browsers). Web resources can be HTML pages, image files, movies, etc.

Java Web application servers
IBM WebSphere is a Java application server built on the J2EE standard specification for enterprise application servers. Enterprise applications can contain Web applications, EJB modules, client components, etc. A Java application server "plugs in" to an HTTP server to run Java applications for clients. A configuration file controls how WebSphere is configured to plug in to the HTTP server and receive requests.

Java Web application components
For Java Web applications, clients request resources from a Java application server using URLs that identify resource types by their file extension:

#ilrContainerLogin, ilrContainerRegister { width: 430px; margin: 0; } .ilrLoginRed { padding-left:3px; padding-top:15px; padding-bottom:15px; } #ilrFormWrapper { width:428px; margin:0px; border:1px solid #d4d4d4; } #ilrFormHeaderBack { background-image: url('http://media.techtarget.com/digitalguide/images/Misc/ilr_header_background.gif'); background-repeat: no-repeat; height:34px; } .ilrFormHeader { padding:5px 5px 5px 35px; font-size: 16px; font-family: arial, helvetica, sans-serif; color:#787878; } #ilrFormBody { background-color:#ffffd4; } .ilrFormBodyHeader { padding-top:15px; padding-left:12px; padding-right:12px; padding-bottom:20px; } .ilrFormBodyHeaderLogin { padding-top:15px; padding-left:9px; padding-right:8px; padding-bottom:20px; } .ilrFormBodyFooter { padding-top:15px; padding-left:12px; padding-right:40px; padding-bottom:20px; } form.ilr { margin: 0; padding: 0; min-width: 428px; max-width: 428px; width: 428px; } form.ilrLogin { margin: 0; padding: 0; min-width: 428px; max-width: 428px; width: 428px; } form.ilr label { display: block; float: left; width: 140px; margin: 5px 0 0; text-align: left; } form.ilrLogin label { display: block; float: left; width: 65px; margin: 5px 0 0; text-align: left; } form.ilr br { clear:left; } form.ilrLogin br { clear:left; } form.ilr input, form.ilr option, form.ilr select { width:auto; margin:4px 5px 0 0px; } form.ilrLogin input, form.ilrLogin option, form.ilrLogin select { width:auto; margin:4px 5px 0 0px; } .inputImage { padding-left:150px; padding-bottom:15px; } .inputImageLogin { padding-left:175px; padding-bottom:15px; } .formFieldsPadding { padding-left:35px; }
Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Web Tools
Putting data from IBM i on Amazon S3 using i2S3
TAATOOL: Useful tools for programmers on IBM i
Programming for the Web on the IBM i, what is possible
Zend Web software teams up with IBM System i
Using geocoding on AS/400 to enhance your Web presence
The iSeries Blog has a new home on IT Knowledge Exchange
The best technologies and tools for System i programmers in 2009
Search400.com Products of the Year 2008
Application modernization strategies for System i
Natively supported Web applications for Power running i

Web Development
Implementing a browser interface in COBOL: Creating your graphic Web page
Implementing a browser interface in COBOL: Getting started
IBM i shop boosts online sales with RPG-based Web platform
Migrating from RPG to EGL on IBM i
Groovy programming on IBM i
Running PHP open source applications: NOBODY needs authority
Zend Web software teams up with IBM System i
The best technologies and tools for System i programmers in 2009
Seven IBM i project lessons learned in 2008
AS/400 lessons from the past, present, and future: A holiday tale

Web Servers
System i no longer the stepchild of IBM's world
Connecting WebSphere to AS/400 for image retrieval
Weaving in WebSphere
SOA enhancements drive IBM WebSphere feature packs
SOA means money for IT workers
Enable J2EE app on WAS to access DB2
Securing Apache: Keeping patches current
IBM runs USOpen.org on Power boxes
MoMA's IT makeover a mix of old and new
How does RPG talk to a browser?

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
WebSphere Development Studio Client (WDSC)  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


text/html;charset=ISO-8859-1">

Resource type

file extension

Definition

sample URL


HTML

.html

Web page

/masonlt3/mypage.html


Servlet

.class

Java servlet runs Java to access data, RPG apps etc

/masonlt3/servlet/SnoopServlet


JSP –

Java Server Page

.jsp

Defined as an HTML page with JSP tags added. At runtime, is compiled to a Java servlet automatically

/masonlt3/mypage.jsp


The Apache organization provides a free Java Web application server (Tomcat) that also runs on the iSeries now as an alternative to WebSphere. Since Java Web applications are built to the J2EE standard, generally your Java Web applications can often run in either WebSphere or Tomcat with only configuration changes needed.

WebSphere product versions

There are a wide variety of WebSphere product versions commonly installed on iSeries servers today: WebSphere version 3.5.x: Standard or Advanced edition and WebSphere version 4.x: Advanced Edition or Advanced Edition Single Server.

The WebSphere version 4.0 architecture more closely models the J2EE specification for Java enterprise application architecture and implements higher levels of J2EE application services.

WebSphere runtime -- simplified

Object

Description


Admin server

An administrative server to administer WebSphere and its application server instances.


Admin console

A client console application you use to administer WebSphere with after the admin server is running


Nodes – your server

Physical nodes ( or servers ) in your WebSphere Domain – your iSeries server is listed if WebSphere is installed


Application Server - Default_Server

A WebSphere application server that runs Java enterprise applications with: Web, Java and EJB applications. There is a default one and you can create more. Each server has a Web container to process JSP and servlet requests and an EJB container to process EJB applications.


Enterprise application

Defined by J2EE standards to contain: EJB, Java, Web and client application components and stored in an .ear file


Web application - Default_app

A Java Web application typically containing HTML pages, JSP pages, servlets, Java beans and property files for configuration usually stored in a .war file


Virtual hosts

A configuration to let 1 server work as multiple host systems. An IP address is assigned to a virtual host name. 1 or more DNS aliases are set for the host name. Host: masonlt3. Alias: get-smart-now:80


Resources – JDBC, J2C, JMS, JavaMail

Resources a J2EE application uses: JDBC connections to your database, J2C connections to call legacy programs, JMS for messaging, etc


Configuration sources

The HTTP server has an admin.conf file for configuring the administration access to the HTTP server. Each HTTP server instance has an associated config file. For the default HTTP server instance it is httpd.conf.

WebSphere has an admin.properties file that defines how the WebSphere domain is set up. Much of the WebSphere configuration is stored in the EJBADMIN database for WebSphere Advanced, version 4 and for version 3.5. For WebSphere Advanced Single Server, version 4 -- the EJBADMIN database is replaced by XML documents.

WebSphere admin console for configuration

The admin console has a hierarchical tree view of all the main configuration objects. Containers have a + that can be clicked to expand the tree branch so the child objects can be seen.

Generally, WebSphere can operate on a default configuration for those who want to do basic testing. At some point, you'll probably need good outside help and/or training on how to best configure WebSphere for your environment to get a good production setup.

Beyond the configuration of the key objects listed above, some key configuration topics that affect WebSphere's behavior include HTTP plug-in configuration parameters, different Java enterprise application types (Web, client, EJB, etc), Java runtime configuration for each WebSphere application server, JSP compiler levels available for JSP pages, classpath configuration for needed Java classes and jar files, and servlets that serve servlets by name.

Starting WebSphere

To start WebSphere running and the Default_Server

  1. Start your WebSphere admin server (STRSBS QEJB/QEJBSBS)
  2. Start your HTTP server (STRTCPSVR *HTTP DEFAULT)

To administer your WebSphere environment

  1. Start the WebSphere admin server ( STRSBS QEJB/QEJBSBS )
  2. Start the WebSphere admin console from a menu or command line
    (adminclient myserver 900)

To access a WebSphere application resource, see the example URLs above for a Web browser.

Sample flow for processing a JSP page request

For a first request after starting WebSphere with a "new" JSP, the flow might be

  • A Web page is submitted from a client browser with a URL request for a JSP (http://myserver/MyPage.jsp)
  • The HTTP server receives the request and forwards it to the WebSphere server
  • If the JSP source file date is newer than the generated servlet class date, WebSphere compiles the JSP source page to a Java servlet source.
  • WebSphere compiles the Java servlet source to a Java servlet class.
  • WebSphere loads the generated servlet class.
  • WebSphere creates a thread for the client session and processes the servlet accessing data etc.
  • WebSphere returns the generated results as an HTML page back to the client browser.

If the JSP has already been compiled and the servlet loaded, the flow is much faster:

  • A Web page is submitted from a client browser with a URL request for a JSP (http://myserver/MyPage.jsp)
  • The HTTP server receives the request and forwards it to the WebSphere server.
  • WebSphere creates a thread for the client session and processes the servlet accessing data etc.
  • WebSphere returns the generated results as an HTML page back to the client browser.

It is this second, faster, more common scenario that allows WebSphere to perform very well for Web applications compared with other alternatives. The initial scenario can be avoided by precompiling and preloading applications before users attempt to connect.

HTTP server choices -- old vs. Apache

You will run either the old IBM HTTP Server or the new Apache HTTP server. The configuration is very different for the Apache server than the old server -- even the terms are changed. (For example, a MAP directive is now an ALIAS in Apache.)

Make SURE you have the latest documentation for your HTTP server. Old handouts on how to configure an HTTP server from COMMON, including my sessions, are useless for the new Apache server.

General categories of errors

Most errors fall into general error categories when running Web applications. The codes below are typical for many common errors.

Code

description


404

page not found for an HTML or JSP page

(often an application configuration or WebSphere plugin problem)


403

authorization error

( an authentication or authority error for a resource requested by the client)


500

error running servlet or jsp

( many different causes possible. A common one is Class Definition Not Found that will show in the error page which class is not found on the class path


Check basic WebSphere configuration for your default server

Finding configuration info for WebSphere depends on two things: which version of WebSphere you're running (3.5.x or 4.x) and how you configured it during installation. Below I show the basic differences between version 3.5.x and version 4.x for the default Web directory paths.

Default WebSphere Advanced Edition install root

(The same for version 3.5.x and version 4.x.)

Default Web application document root for your Web application

Sample Web application document root path for WebSphere version 3.5.x:

Sample Web application document root path for WebSphere version 4.x:

Version 4 architecture is based on the newer J2EE deployment standard for Enterprise application architecture.

Basic WebSphere configuration information in admin.properties

Look in for the basic WebSphere configuration information when WebSphere starts up. Additional configuration information on the Default_Server is viewable from a WebSphere admin console.

Click here to review the general diagnostic process for WebSphere problems.

--------------------------
About the author: Jim is president of ebt-now.com, an IBM and Lotus business partner focused on delivering e-business application solutions for iSeries 400 customers. Jim writes, consults, teaches, designs and develops iSeries Web applications using Java, WebSphere, DB2, Lotus Domino and the WebSphere Development Tools for the iSeries.


Rate this Tip
To rate tips, you must be a member of Search400.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



iSeries Security - Security Tools, Physical Security and System Security
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts