|
To access the contents, click the chapter and section titles.
Sams Teach Yourself Visual J++ 6 in 21 Days
Q&AQ How do you indicate that a Java applet is to be embedded into a Web page? A You use the <APPLET> tag in the HTML file. When a Java-aware browser sees the <APPLET> tag, it knows that anything that follows is part of a Java applets attri-butes and its parameters. Q What attributes are required in an <APPLET> tag? A Three tags are required in an <APPLET> tag: CODE, HEIGHT, and WIDTH. CODE specifies the name of the applet class file. HEIGHT specifies the height of the applet window in pixels. WIDTH specifies the width of the applet window in pixels. Q What is alternate HTML and why should you use it? A Following any parameter tags you might use, yet before the closing </APPLET> tag, there is a special area where you can supply whats known as alternate HTML. Here, you can enter any amount of HTML code you want; such code will be displayed only by non-Java browsers. Although applets completely ignore alternate HTML, its an important part of the <APPLET> tag nonetheless. Alternate HTML gives you an opportunity to create Web pages that are useful to Web surfers regardless of the browser they happen to use. If you dont supply alternate HTML for non-Java browsers, you run the risk of alienating these users. Q What information do you need for an FTP program so that you can connect to a Web site? A The first thing you need to do is to make sure that you have a valid user account. This gives you permission to upload files to the Web server. For a program such as WS_FTP, youll need to provide a username, a password, and the FTP server name (or IP address). This is the minimum information youll need in order to connect to an FTP site. There might be additional required information if you must go through a proxy server to get to your space on the Web server. (Your site administrator can give you the information you need for connecting through a proxy server.) Q Why would you want to make your Java source code available for download? A Many Visual J++ and Java programmers enjoy fostering an attitude of sharing with other programmers. Practically every Visual J++ programmer has at one point relied on source code found on the Web to learn how to do something for a project. Q Why do you have to use FTP to upload files to the Web? A You cant use HTTP because its a one-way transfer. Users can only get files using HTTP. To send files to a server, you must use a trusted protocol such as FTP that requires a login name and password. Other options include using programs such as PC Anywhere. Review Exercises
|
Products | Contact Us | About Us | Privacy | Ad Info | Home
Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement. |