WebSphere Application Server Version 6.1 Feature Pack for Web Services
             Operating Systems: AIX, HP-UX, i5/OS, Linux, Solaris, Windows, z/OS

             Personalize the table of contents and search results

Developing Web applications

Before you begin

Design a Web application and the components that it needs.

For general Web application design information, see "Resources for learning."

About this task

There are two basic approaches to selecting tools for developing Web applications:
  • You can use one of the available integrated development environments (IDEs). IDE tools automatically generate significant parts of the servlet and JavaServer Pages (JSP) code, and Hypertext Markup Language (HTML) files. They also contain integrated tools for packaging and testing the Web application components.
  • If you decide to develop Web components without an IDE, you need at least an ASCII text editor. You can also use tools available in the Java Software Development Kit (SDK) and in this product to assemble, test, and deploy the Web application components.

The following steps support the second approach, development without an IDE.

Procedure

  1. If necessary, migrate any pre-existing code to the required version of the servlet and JSP specification.
  2. Write and compile the components of the Web application. To access classes that were extended, compile your code using the -classpath option on the javac compiler. This option allows you to reference the j2ee.jar file in the product directory:
    [Windows] [z/OS] To compile that same servlet on the Windows NT version of WebSphere Network Deployment, specify:
    javac -classpath D:\Program Files\WebSphere\DeploymentManager\lib\j2ee.jar MyServlet.java
    
    [i5/OS] To compile that same servlet on WebSphere Application Server for i5/OS, Network Deployment, specify:
    javac -J-Djava.version=1.5 -classpath app_server_root/lib/j2ee.jar MyServlet.java 
    
    
  3. (Optional) Disable JavaServer Pages (JSP) runtime compilation, if necessary.

Results

If you are receiving a duplicate client error when you use the JavaServer Faces (JSF) implementation to dynamically add components to the tree, it is because the JSF implementation generated client identifiers that collide with cached client identifiers on a post back. To prevent collision with existing client IDs, use the com.ibm.ws.jsf.storeDynamicClientIds property to store the number that is used to generate new client IDs in the view between requests. The client IDs generation process is also modified when this property is set to <tt>true</tt>.

To prevent collision with existing client IDs, the com.ibm.ws.jsf.storeDynamicClientIds property must be set to <tt>true</tt> in the web.xml file. For example:
<contex-param>
  <description>If this property is set to true, the number that is used to generate new client IDs is stored in the view so that it is saved between requests.
  </description> 
  <param-name>com.ibm.ws.jsf.storeDynamicClientIds</param-name>
  <param-value>true</param-value>
</context-param> 

What to do next

Assemble the application components in one or more Web modules.



In this information ...


IBM Redbooks, demos, education, and more


Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience.

This feature requires Internet access.

IBM Suggests
Task topic    

Terms of Use | Feedback

Last updated: Nov 25, 2008 2:35:59 AM CST
http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.wsfep.multiplatform.doc/info/ae/ae/tweb_dev.html