Giống như hầu hết mọi thứ trong cuộc sống, thiết kế tốt nhất không xuất phát từ người đứng đầu của người sáng tạo của họ hoàn chỉnh. Họ là kết quả của một quá trình dữ dội của thẩm lỗi, đánh giá chu đáo, và tinh chỉnh vô tận. Thiết kế thành công hiếm khi trông giống như ý tưởng mà họ bắt đầu ra như là trong cùng một cách một bức tượng hoàn thành hầu như không | Iteration I J2EE Web Applications 49 3. Click the Next button to display the Tomcat Server page. Click the Browse button to select the directory where you installed Tomcat see the Getting Tomcat sidebar for example E The Tomcat installation directory field should now show the selected directory see Figure . Figure Tomcat Server 4. The JRE field is initialized to the Workbench default JRE which is the JVM you used to launch Eclipse. JDK Required for JSP Development Part of the server runtime environment setup process involves specifying the JRE to use for launching Tomcat. Be sure to specify a full JDK instead of just a JRE because you ll be doing JSP development. If you do not currently have a JDK defined to Eclipse add the one you previously installed see the Getting a JDK sidebar . JSP development requires a Java compiler which is included in the JDK but not the JRE. JSP compilation will fail if you specify a JRE. Note that you can precompile your JSPs in order to use a JRE in your production server environment. 50 CHAPTER 3 Quick Tour Click the Installed button to open the Installed JREs wizard. This wizard lets you define additional JREs to Eclipse. Click the Add button and select the directory where you installed the JDK see the Getting a JDK sidebar for example E ibm-java2-142 The JDK is added to the Installed JREs page. Select its checkbox to make it the default JRE see Figure and click the OK button to return to the Tomcat Server page. Figure Installed JREs 5. Select the JDK from the drop-down list of the JRE field see Figure . When WTP launches Tomcat later it will use the specified JDK. Click the Finish button to complete the definition. Tomcat is now listed on the Installed Server Runtime Environments page see Figure . You have now extended Eclipse with a J2EE servlet container and are ready to create your first Java Web application development project. Iteration I J2EE Web Applications 51 Figure .