Archive for September, 2007

Sunday, September 30th, 2007

Figure C-4: What you should see when executing startup.bat The windows in Figure C-4 are stacked for display purposes, so your display will differ. If you see two command windows such as the ones shown, you can be pretty sure that your Tomcat installation was successful. You want to display Web pages in your Web server, right? Although the command windows shown in Figure C-4 show Tomcat executing, you need to call up a Web page and check out some servlets and JSPs. This process is covered in the following sections. Displaying Web Pages in Tomcat Open a browser and enter the following URL: http://localhost:8080/ Figure C-5 shows what you should see on your screen.
If you are looking quality, fast, secure and reliable web hosting with PHP service at an affordable price, check php5 hosting services.

Saturday, September 29th, 2007

set JAVA_HOME=d:jdk1.3set TOMCAT_HOME=d:tomcat32 After you code the assignments, you need to restart your machine or execute your autoexec.bat file to make the variable assignments. If you are running Windows 2000 or Windows NT, you can use the System Properties control panel to set these environment variables. From your Start button, select Settings @@> Control Panel @@> System @@> Environment. Figure C-3 shows the Environment control panel. Figure C-3: The Windows NT Environment control panel If you find existing entries for environment variables in the control panel, you may click the entry to view and edit its value as necessary. Click OK or Apply to set the variables. Caution Be careful when setting environment variables in command windows. Windows starts a separate process for each command window opened. Therefore, if you issue a SET command to assign environment variables values in one window, the variables have these values when executing programs from within this command window only. Placing your SET commands in your autoexec.bat file or setting variable values in the control panel makes the values known to all processes. Okay, you re almost home. With the Tomcat environment variables set, you are ready to test your Tomcat installation. Testing Your Tomcat Installation The directory TOMCAT_HOMEbin contains several startup and shutdown files. The files you are interested in are called startup.bat and shutdown.bat. First, run the startup file by double-clicking its icon or running the file from a command window. Once you execute the startup file, you should see two windows that resemble those shown in Figure C-4.
We provides quality the CPanel Web Hosting. All our web hosting plans regular, business and expert are competitively priced and unsurpassed in reliability, uptime, and quality of service.

Friday, September 28th, 2007

Figure C-2: Tomcat directory structure As you can see, several directories shown in the figure have subdirectories. Not all the subdirectories within Tomcat can be shown here because of space limitations. Throughout this appendix we will examine different directories in the Tomcat installation that are relevant to the Tomcat configuration and JSP processing. Assuming you see something similar to Figure C-2 on your screen, you are almost ready to check whether your Tomcat installation was successful. However, first you need to set up a few environment variables, as described in the following section. Setting Your Tomcat Environment Variables Tomcat uses a script located in the bin directory called, appropriately enough, startup.bat, which requires several environment variables to be set on your system for proper execution. Table C-1 lists these variables and their purpose. Table C-1: Tomcat Environment Variables Variable Name Purpose JAVA_HOME Points to the root directory of your Java installation. TOMCAT_HOME Points to the root directory of your Tomcat installation. If you are running Windows 9x, you can assign these environment variables in your autoexec.bat file as follows:
We offer quality web hosting with only $3.99 per month with unlimited email addresses, unlimited bandwidth, and unlimited server space. Check our web hosting unlimited bandwidth section.

Thursday, September 27th, 2007

The Tomcat download site classifies downloads into release builds, milestone builds, and nightly builds. The release builds are the stable versions of the Tomcat product. Once you get to the download site, scroll to the release builds section and select Tomcat 3.2.1 (or whatever is the most current release being offered). Figure C-1 shows the screen containing the download files. Figure C-1: Tomcat release 3.2 download page From this page you can select a Tomcat version for Windows 9x, Windows NT, or Windows 2000, or for various UNIX flavors. Assuming you are using some version of Windows, select jakarta-tomcat-3.2.1.zip to commence the download. After a successful download, you should have a zip file called jakarta-tomcat-3.2.1.zip on your hard drive. Installing Tomcat Installing Tomcat is a straightforward process. Just open the zip file and extract all contained files in the archive. Note You need a copy of PKZIP to extract the contained files. You can get a copy at http://www.pkware.com/. This site has compression/extraction tools for several operating systems. You may want to create a directory at your disk root; for example, use d:tomcat32 to hold all the Tomcat files. After extracting the files, your directory structure should resemble that shown in Figure C-2.
Find the right website host for you, offering a directory of website hosts, free domain name registration tool, hosting reviews, web hosting ratings and articles for beginners, and tons of other resources, check web hosting ratings for more information.

Wednesday, September 26th, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Appendix C: Configuring the Tomcat Web Server This appendix discusses Tomcat and provides advice on how to get the Tomcat release 3.2 Web server. Tomcat is the Reference Implementation for the Java Servlet 2.2 and JavaServer Pages 1.1 Technologies. In other words, Tomcat is a Web server that implements the most current release of JSP and Java Servlets. The Tomcat Web Server Tomcat is a Web server that contains a JSP container. Tomcat is quick and easy to install and to use, and offers the following advantages: . Tomcat is free. . You can download the source code for Tomcat as well as the binaries. If you really want to learn about server internals, the Tomcat source is a great resource. . Mailing lists about Tomcat are available to one and all. These lists are devoted to disseminating information, including posted questions and answers. Tomcat is designed to work as both a standalone Web server or in conjunction with application servers, such as Apache or JBoss. For your purposes here, it is more interesting to run Tomcat as a standalone Web server because it offers a straightforward way to learn about JSPs. However, in the real world, if you opt to use Tomcat, you may want to integrate Tomcat with another Web application server. Tomcat was, and currently is, developed by a community of dedicated individuals under the umbrella of the Jakarta Project. You are encouraged to learn about the Jakarta Project by taking a look at http://jakarta.apache.org/index.html. From this site, you can get to the page where you can download the Tomcat Web server. As of this writing, the latest release of Tomcat is release 3.2. Note By the time you read this book, it is very likely that the Jakarta folk will have a more recent version of Tomcat available, probably release 4.0. Be advised that the description of Tomcat given here applies to release 3.2. Several details and particulars may change between successive releases. Downloading Tomcat Release 3.2 You can get to the download page for Tomcat from the Jakarta URL or go to http://jakarta.apache.org/site/binindex.html. (If you prefer, you can get to the source code download from here as well.)
Find the right website host for you, offering a directory of website hosts, free domain name registration tool, hosting reviews, web hosting ratings and articles for beginners, and tons of other resources, check web hosting ratings for more information.

Tuesday, September 25th, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Summary There are many JSP engines on the market today, and you may or may not use Tomcat in your JSP projects. Since Tomcat is the reference JSP implementation endorsed by Sun Microsystems, it will support new JSP specifications more quickly than most other JSP engines. For this reason you will want to become familiar with Tomcat whether you use it regularly or not because it will be a valuable tool for both regular use and for examining new JSP releases now and in the future.
Have you tried other web hosting companies and found out that their focus and your focus are in clash?Check our filemaker web hosting services.

Thursday, September 20th, 2007

EJB & JSP: Java On The Edge, Unlimited Edition by Lou Marco ISBN: 0764548026 Your Guide to Cutting-Edge J2EE Programming Techniques. Appendix D: XML Overview Throughout this book, you ve read about JSP elements and EJB files coded in XML syntax. Although the examples of such elements and files presented in the book convey the essential flavor of XML syntax, a more thorough presentation is called for. Thus, the purpose of this appendix is to present the essentials of XML syntax. This appendix provides an overview of XML, or Extensible Markup Language, a universal document format for structuring data for presentation on the Web. The appendix starts with an overview of XML features that overcome existing problems with HTML. Next, an extremely simple XML document is provided along with a discussion of XML document components. The important XML terms, well-formed documents and valid documents, are covered, as are XML Document Type Definitions (DTDs). Finally, a brief description of related technologies wraps up this appendix. XML Features XML does not have a fixed set of markup tags, overcoming HTML s greatest deficiency, according to some experts. XML is not a markup language per se; XML is a meta-markup language that enables document authors to define their own tags. As a result, authors can create markup languages peculiar to their particular industries, and XML document authors can use this markup language to encode data in industry-specific terminology. XML requires document authors to follow certain rules in creating what is known as well-formed XML documents. If these rules are not followed, the XML document is useless. This XML specification prohibits XML tools from trying to fix problems with the document. The intent is to stop the browser madness prevalent in HTML, in which different browsers attempt to fix broken HTML and, of course, parse and display this HTML differently. For example, an HTML document author can write HTML with missing end tags, which the major browsers parse and display. Such foolishness cannot fly with XML; if an XML document is broken, the document cannot be rendered. Therefore, an XML author can confidently create XML documents, knowing that these documents are parsed identically with different pieces of compliant software. XML stresses the separation of data content from data presentation. Over time, HTML has blurred the distinction between organizing document content and displaying the content. A typical HTML document has tags that describe relationships among document content (such as

  • tags) and tags that govern the display of this content (, , and so on). XML describes document content structure and semantic relationships, not the content formatting. The XML author uses a related style sheet technology, such as CSS (Cascading Style Sheets) or XSL (Extensible Style Language), to govern the display of the document. One upshot of this clean separation of structure and display is that the same XML document can be displayed in various ways by using different style sheets, or the same style sheet can govern the display of similarly structured XML documents. The nonproprietary nature of XML, combined with its ease of writing, makes XML an ideal format for data exchange among applications.
    File Transfer Protocol comes together with anonymous ftp access with every FTP Web Hosting account we offer today. Enjoy burs table ftp transfers together with fast FTP connection.

  • Wednesday, September 19th, 2007

    l class: The fully qualified class name of the bean being associated with the JSP. . beanName: The same name you would use to instantiate the bean, or the name you would supply to the instantiate method of java.beans.Beans. . type: Defaults to the value of the class attribute but can be a valid superclass or interface implemented by the bean class. Table 4-3: Values of the Scope Attribute Used in the JSP useBean Action Scope Description page The bean object dies after the servlet completes its service() invocation. request The bean lives for as long as the HTTP request lives, even if the HTTP request object is passed among different JSP pages. session The bean object lives as long as the session exists. application The bean object lives for the duration of the application s execution. As you might imagine, the useBean action enables you to load JavaBeans for use in your JSP pages, thereby opening your JSP pages to the full power of the Java programming language. Also, you can take advantage of using software components, something that you cannot easily do with other products.
    Here java web hosting you will find professional-grade java web hosting at affordable prices.

    Tuesday, September 18th, 2007

    When considering the include action, it s important to note that the value of the page attribute can be a JSP expression or some other dynamically generated expression. The flush attribute must be coded as true. You can code param tags with the include action, as shown here: The plugin and fallback Actions You use the plugin action to generate HTML tags for embedding Java applets in the generated output page to ensure that the browser contains an appropriate Java runtime, and that it executes the applet properly. All but 4 of the 13 attributes of the plugin action have the same meaning as the HTML counterparts. The parameters that have different meaning are: . type: Identifies the type of the component; a bean or an applet . jreversion: Java runtime required to execute the component . nspluginurl: Location of the Netscape JRE download, as a URL . iepluginurl: Location of the Internet Explorer JRE download, as a URL The plugin action takes an optional param action as well. You may code a fallback action to provide information when the plugin fails to load. Basically, the fallback action provides alternate text that performs the same function as the ALT attribute. The useBean Action The useBean action is used to make a JavaBean known to your JSP. You read more about bean use with your JSPs in Chapter 6, “JSP, JavaBeans, and JDBC.” In this section, you get exposure to the syntax for the useBean action. There are several forms for coding the useBean action, as shown here: The attributes coded for useBean have the following meaning: . id: The name of the bean object instance. . scope: A context in which the bean reference is known. The different scope contexts are represented by implicit objects, covered more fully in the next section. Think of the bean object as having a different life cycle for different scope values. Table 4-3 lists the values and meaning of the scope attribute of the useBean action.
    If hosting is cheap, it doesn’t need to be second-rate. Try us if you don’t believe cheap web hosting we have 30 days money back guarantee.

    Monday, September 17th, 2007

    The forward Action The forward action causes processing to immediately redirect to the indicated page. For example, when processing hits the following statement: thenextpage.html is immediately displayed. Before displaying the forwarded page, the output stream buffer (if one exists) will be cleared. If you want to make a name-value parameter known to the forwarded page, you use the param action as follows: Using the forward action enables you to direct categories of activities to specific pages. The getProperty and setProperty Actions The getProperty action accesses one or more properties of a JavaBean used by the JSP page. The getProperty action accesses the value of property from a JavaBean, converts the value to a string, and writes the string representation to output. The getProperty action has the following syntax: The attribute propertyName is the name of the bean property you want to set. The attribute propertyValue is a string or JSP expression that, of course, represents the value of the property you wish to set. The attribute paramName is the value of a parameter that replaces the existing value of the property coded in the setProperty action. You cannot code both param and value in the same setProperty action. The include Action The include action enables you to include content in your JSP page. Before you think that the include action is the same thing as the <%@ include %> directive, recall that the include directive brings in the external content at translation time whereas the include action is processed at runtime (or page request time). The syntax of the include action is straightforward, as shown here:
    We are the the largest streaming host company, and we provide professional audio & video web hosting streaming using Real Networks, QuickTime, Flash and Windows Media.We strongly recommend you to visit and check web hosting streaming services.