<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.0.4" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>Jsp, Tomcat, J2Ee, Virtual Web Hosting, Hibernate Programming Blog</title>
	<link>http://jboss.jspwebsitehosting.com</link>
	<description>Blog about Java, PHP5 &#038; MySQL5 programming techniques</description>
	<pubDate>Fri, 28 Mar 2008 15:17:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>BC99Chapter 38The  (Cool web site) Navigator and Other Environment ObjectsWhen an</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/bc99chapter-38the-cool-web-site-navigator-and-other-environment-objectswhen-an/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/bc99chapter-38the-cool-web-site-navigator-and-other-environment-objectswhen-an/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 15:17:02 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/bc99chapter-38the-cool-web-site-navigator-and-other-environment-objectswhen-an/</guid>
		<description><![CDATA[BC99Chapter 38The Navigator and Other Environment ObjectsWhen an object requires VBScriptNot all objects that load via the objectelement are scriptable through JavaScript (JScript). Occasionally, an object is designed so that its properties are exposed only to VBScript. Thishappens, for example, with the Microsoft Windows Media Rights Manager (DRM) object. Tofind out if the browser (operating [...]]]></description>
			<content:encoded><![CDATA[<p>BC99Chapter 38The Navigator and Other Environment ObjectsWhen an object requires VBScriptNot all objects that load via the objectelement are scriptable through JavaScript (JScript). Occasionally, an object is designed so that its properties are exposed only to VBScript. Thishappens, for example, with the Microsoft Windows Media Rights Manager (DRM) object. Tofind out if the browser (operating system) is equipped with DRM, your page loads the objectvia the objectelement as usual; however, a separate VBScript section must access the objectto test for the existence of one of its properties. Because script segments written in either lan- guage can access each other, this isn t a problem provided you know what the property ormethod is for the object. The following fragment from the Head section of a document demon- strates how JavaScript and VBScript can interact so that JavaScript code can branch basedon the availability of DRM: <head> <object id= drmObj  height= 1  width= 1   classid= CLSID:760C4B83-E211-11D2-BF3E-00805FBE84A6 ></object> <script type= text/vbscript >
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/bc99chapter-38the-cool-web-site-navigator-and-other-environment-objectswhen-an/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>BC98Part VIBonus Chapters11.Right-click the file and choose Properties.  (Web server info)</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/bc98part-vibonus-chapters11right-click-the-file-and-choose-properties-web-server-info/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/bc98part-vibonus-chapters11right-click-the-file-and-choose-properties-web-server-info/#comments</comments>
		<pubDate>Fri, 28 Mar 2008 00:31:04 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/bc98part-vibonus-chapters11right-click-the-file-and-choose-properties-web-server-info/</guid>
		<description><![CDATA[BC98Part VIBonus Chapters11.Right-click the file and choose Properties. 12.Click the Version tab (if present). 13.Copy the version number (generally four sets of numbers delimited by commas), andpaste it into your document for future reference. Eventually, it will be assigned to thecodebaseattribute of the objectelement. You are now ready to try loading the plug-in as an [...]]]></description>
			<content:encoded><![CDATA[<p>BC98Part VIBonus Chapters11.Right-click the file and choose Properties. 12.Click the Version tab (if present). 13.Copy the version number (generally four sets of numbers delimited by commas), andpaste it into your document for future reference. Eventually, it will be assigned to thecodebaseattribute of the objectelement. You are now ready to try loading the plug-in as an object and look for properties youcan test for. 14.Add an objecttag to The Evaluator source code. This can go inside the heador justbefore the </body>tag. For example, your tag should look something like the following: <object id= wmp  width= 1  height= 1   classid= CLSID:0A4286EA-E355-44FB-8086-AF3DF7645BD9   codebase= #Version=9,0,0,2980 > </object> Copy and paste the numbers for the guidand version. Two points to watch out for: First, be sure that the guidvalue is preceded by CLSID:in the value assigned to classid; second, be sure the version numbers are preceded by the prefix shown. 15.Load (or reload) the page in WinIE4+. At this point, the wmpobject should exist. If the associated plug-in loads successfully, the wmpobject s properties include properties exposed by the plug-in. 16.Enter wmpinto the bottom text box to inspect properties of the wmpobject. Be patient: It may take many seconds for the retrieval of all properties. In case you can t readily distinguish between the objectelement object properties andproperties of the scriptable plug-in, scroll down to the wmp.innerHTMLproperty and itsvalues. When an object loads successfully, any parameters that it accepts are reflectedin the innerHTMLfor the objectelement. Each paramelement has a name the nameof one of the scriptable properties of the plug-in. 17.Look for one of the properties that has some kind of value by default (in other words, other than an empty string or false). In Windows Media Player, this can be CreationDate. Use this property as an object detection condition in scripts that need to accessthe Windows Media Player properties or methods: if (wmp &#038;&#038; wmp.CreationDate) { // statements that  talk to  plug-in} Setting a minimum version numberThe four numbers that you grab in step 13 in the previous section represent the version of theplug-in as installed on your computer. Unless you have a way of verifying that your externalcontent runs on earlier versions of the plug-in (if there are earlier versions), you can safelyspecify yourversion as the minimum. Specificity rankings for the four numbers of a version decrease as you move from left to right. For example, version 9,0,25,2 is later than 9,0,0,0; version 10,0,0,0 is later than both of them. Ifyou specify 9,0,25,2, and the user has 9,0,24,0 installed, the plug-in does not load and the objectisn t available for scripting. On the other hand, a user with 9,0,26,0 has the object presentbecause the codebaseattribute for the version specifies a minimum allowable version to load.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/bc98part-vibonus-chapters11right-click-the-file-and-choose-properties-web-server-info/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>BC97Chapter 38The Navigator and Other Environment ObjectsThe idea  (Web hosting)</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/bc97chapter-38the-navigator-and-other-environment-objectsthe-idea-web-hosting/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/bc97chapter-38the-navigator-and-other-environment-objectsthe-idea-web-hosting/#comments</comments>
		<pubDate>Thu, 27 Mar 2008 00:08:27 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/bc97chapter-38the-navigator-and-other-environment-objectsthe-idea-web-hosting/</guid>
		<description><![CDATA[BC97Chapter 38The Navigator and Other Environment ObjectsThe idea of using the tag instead of the tag is that the tag loadsa specific plug-in, whereas the mimetype of the data referenced by the tag lets thebrowser determine which plug-in to use for that mimetype. It s not uncommon, therefore, tosee an tag definition surround an tag [...]]]></description>
			<content:encoded><![CDATA[<p>BC97Chapter 38The Navigator and Other Environment ObjectsThe idea of using the <object>tag instead of the <embed>tag is that the <object>tag loadsa specific plug-in, whereas the mimetype of the data referenced by the <embed>tag lets thebrowser determine which plug-in to use for that mimetype. It s not uncommon, therefore, tosee an <object>tag definition surround an <embed>tag both referencing the same exter- nal data file. If the optimum plug-in fails to load, the <embed>tag is observed, and thebrowser tries to find any plug-in for the file s mimetype. With an objectelement as part of the HTML page, the element itself is a valid object evenif the plug-in fails to load. Therefore, you must do more to validate the existence of the loadedplug-in than simply test for the existence of the objectelement. To that end, you need toknow at least one scriptable property of the plug-in. Unfortunately, not all scriptable plug-insare fully documented, so you occasionally must perform some detective work to determinewhich scriptable properties are available. While you re on the search for clues, you can alsodetermine the version of the plug-in and make it a minimum version that your objectele- ment allows to load. Tracking down plug-in detailsNot everyone has access to the Microsoft programming development environments (for exam- ple, Visual Studio) through which you can find out all kinds of information about an installedActiveX control. If you don t have access, you can still dig deep to get most (if not all) of theinformation you need. The tools you can use include the Windows Registry Editor (regedit), The Evaluator (Chapter 13), and, of course, your text editor and WinIE4+ browser. The followingsteps take you through finding out everything you need to know about the Windows MediaPlayer control: 1.If you don t know the guidfor the Media Player (most people get it by copying some- one else s code that employs it), you can use the Registry Editor (regedit.exe) to findit. Open the Registry Editor (in Win95/98/NT/XP, choose Run from the Start menu andenter regedit; if that option is not available in your Windows version, search for thefile named regedit). 2.Expand the HKEY_CLASSES_ROOTfolder. 3.Scroll down to the nested folder named CLSID, and click that folder. 4.Choose Edit/Find, and enter Windows Media Player. If you were searching for a differ- ent plug-in, you would enter an identifying name (usually the product name) in this place. 5.Keep pressing F3 (Find Next) until the editor lands upon a folder whose default value(in the right side of the Registry Editor window) shows Windows Media Player. 6.The number inside curly braces next to the highlighted folder is the plug-in s guid. Right- click the number and choose Copy Key Name. Paste the number into your documentsomewhere for future reference. Eventually, it will be part of the value assigned to theclassidattribute of the objectelement. 7.Expand the highlighted folder. 8.Click the folder named InprocServer32. The default value should show a pathname  to the actual ActiveX control for the Windows Media Player plug-in. 9.Right-click the (Default) name for the path and choose Modify. The full pathname isvisible in an editable field. 10.Armed with this pathname information, open My Computer and locate the actual fileinside a directory listing.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/bc97chapter-38the-navigator-and-other-environment-objectsthe-idea-web-hosting/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web hosting services - BC96Part VIBonus ChaptersThis function starts by calling the</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/web-hosting-services-bc96part-vibonus-chaptersthis-function-starts-by-calling-the/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/web-hosting-services-bc96part-vibonus-chaptersthis-function-starts-by-calling-the/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 08:01:05 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/web-hosting-services-bc96part-vibonus-chaptersthis-function-starts-by-calling-the/</guid>
		<description><![CDATA[BC96Part VIBonus ChaptersThis function starts by calling the mimeIsReady()function from Listing 38-3a. After that, thefunction resembles the one in Listing 38-3b until you reach the most nested statements. Here, instead of looking for any old mimetype, you insist on the existence of an explicit matchbetween the mimetype passed as a parameter and an enabled mimetype [...]]]></description>
			<content:encoded><![CDATA[<p>BC96Part VIBonus ChaptersThis function starts by calling the mimeIsReady()function from Listing 38-3a. After that, thefunction resembles the one in Listing 38-3b until you reach the most nested statements. Here, instead of looking for any old mimetype, you insist on the existence of an explicit matchbetween the mimetype passed as a parameter and an enabled mimetype associated with theplug-in. To see how these functions work on your NN3+, MacIE5, or Safari browser, open thecomplete file (lst38-03.htm) from this CD-ROM. The actual listing also includes code thatbranches around IE for Windows and other browsers that don t support this way of inspect- ing mimetypes and plug-ins. Managing manual plug-in installationIf your scripts determine that a visitor does not have the plug-in your data expects, you maywant to consider providing an electronic guide to installing the plug-in. One way to do this isto open a new frameset (in the main window). One frame can contain step-by-step instructionswith links to the plug-in s download site. The download site s page can appear in the otherframe of this temporary window. The steps must take into account all installation requirementsfor every platform, or, alternatively, you can create a separate installation document for eachunique class of platform. For instance, you must decode Macintosh files frequently from binhexformat and then uncompress them before you move them into the plug-ins folder. Other plug- ins have their own, separate installation program. The final step should include a call tonavigator.plugins.refresh() to make sure that the browser updates its internal listings. After that, the script can return tothe document.referrer, which should be the page that sends the visitor to the installationpages. All in all, the process is cumbersome it s not like downloading a Java applet. But ifyou provide some guidance, you stand a better chance of the user returning to play your coolmedia. Also consider letting the browser s own updating facilities handle the job (albeit notas smoothly in many cases) by simply loading the data into the page, ready or not.  Plug-in  detection in WinIEWinIE4+ provides some built-in facilities that may take the place of plug-in detection in somecircumstances. First of all, it s important to recognize that WinIE does not use the term  plug- in  in the same way that Netscape and other browsers use it. Due to the integration betweenIE and the Windows operating system, WinIE employs system-wide ActiveX controls to handlethe job of rendering external content. Some of these controls are designed to be accessedfrom outside their walls, thus allowing client-side scripts to get and set properties or invokemethods built into the controls. These controls behave a lot like plug-ins, so you frequentlysee them referenced as  plug-ins,  as they are in this book. WinIE prefers the <object>tag for both loading the plug-in (ActiveX control) and assigningexternal content to it. One of the attributes of the objectelement is classid, which pointsto a monstrously long string of hexadecimal numbers known as the guid(Globally UniqueIdentifier). When the browser encounters one of these guids, it looks into the WindowsRegistry to get the path to the actual plug-in file. If the plug-in is not installed on the user smachine, the object doesn t load and any other HTML nested inside the <object> tag rendersinstead. Thus, you can display a static image placeholder or HTML message about the lack ofthe plug-in. But plug-in detection comes in most handy when your scripts need to communi- cate with the plug-in, such as directing an embedded Windows Media Player plug-in to changesound files or to play. When you build code around a scriptable plug-in, your scripts shouldmake sure that the plug-in object is indeed present so they don t generate errors.
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/web-hosting-services-bc96part-vibonus-chaptersthis-function-starts-by-calling-the/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>BC95Chapter 38The Navigator and Other Environment Objects} return  (Web design course)</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/bc95chapter-38the-navigator-and-other-environment-objects-return-web-design-course/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/bc95chapter-38the-navigator-and-other-environment-objects-return-web-design-course/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 16:24:49 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/bc95chapter-38the-navigator-and-other-environment-objects-return-web-design-course/</guid>
		<description><![CDATA[BC95Chapter 38The Navigator and Other Environment Objects} return false; } The parameter for the pluginIsReady()function is a string consisting of the plug-in s name. As discussed earlier, the precise name may vary from OS to OS or from version to version. Thefunction here assumes that you aren t concerned about plug-in versioning. It also assumes(with [...]]]></description>
			<content:encoded><![CDATA[<p>BC95Chapter 38The Navigator and Other Environment Objects} return false; } The parameter for the pluginIsReady()function is a string consisting of the plug-in s name. As discussed earlier, the precise name may vary from OS to OS or from version to version. Thefunction here assumes that you aren t concerned about plug-in versioning. It also assumes(with reasonably good experience behind the assumption) that a brand-name plug-in con- tainsa string with the brand in it. Thus, the pluginIsRead()function simply looks for theexistenceof the passed name within the pluginobject s nameproperty. For example, thisfunction accepts  QuickTime as a parameter and agrees that there is a match with the plug- in named  QuickTime Plug-in 6.0.2 . The script loops through all registered plug-ins fora substring comparison (converting both strings to all lowercase to help overcome discrep- ancies in capitalization). Next comes a second repeat loop, which looks through the mimetypes associated with a plug- in (in this case, only a plug-in whose name contains the parameter string). Notice the use ofthe strange, double-array syntax for the most nested ifstatement: For a given plug-in (denotedby the iindex), you have to loop through all items in the mimetypes array (j) connected tothat plug-in. The conditional phrase for the last ifstatement has an implied comparisonagainst null(see another way of explicitly showing the nullcomparison in Listing 38-3a). The conditional statement evaluates to either an object or null, which JavaScript can acceptas trueor false, respectively. The point is that if an enabled plug-in is found for the givenmimetype of the given plug-in, this function returns true. Verifying both plug-in and mime typeThe last utility function (Listing 38-3c) is the safest way of determining whether a visitor sbrowser is equipped with the  right stuff  to play your media. This function requires both aMIME type and plug-in name as parameters and also makes sure that both items are supportedand enabled in the browser before returning true. Listing 38-3c: Verifying Plug-in and mime Type// Pass  <type>/<subtype>  and plug-in name strings for this// function to see if both the MIME type and plug-in are// registered with this browser, and that the plug-in is// enabled for the desired MIME type. function mimeAndPluginReady(mime_type,plug_in) { if (mimeIsReady(mime_type)) { var plugInOfRecord = navigator.mimeTypes[mime_type].enabledPlugin; plug_in = plug_in.toLowerCase(); for (var i = 0; i < navigator.plugins.length; i++) { if (navigator.plugins[i].name.toLowerCase().indexOf(plug_in) != -1) { if (navigator.plugins[i] == plugInOfRecord) { return true; } } } } return false; }
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/bc95chapter-38the-navigator-and-other-environment-objects-return-web-design-course/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Bulletproof web design - BC94Part VIBonus Chapterslocated in its entirety among the</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/bulletproof-web-design-bc94part-vibonus-chapterslocated-in-its-entirety-among-the/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/bulletproof-web-design-bc94part-vibonus-chapterslocated-in-its-entirety-among-the/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 23:18:34 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/bulletproof-web-design-bc94part-vibonus-chapterslocated-in-its-entirety-among-the/</guid>
		<description><![CDATA[BC94Part VIBonus Chapterslocated in its entirety among the Chapter 38 listing files on this CD-ROM. The pieces not shownhere are merely user interface elements that enable you to experiment with these functions. Verifying a mime typeListing 38-3a is a function whose narrow purpose is to determine if the browser currently hasplug-in support enabled for a [...]]]></description>
			<content:encoded><![CDATA[<p>BC94Part VIBonus Chapterslocated in its entirety among the Chapter 38 listing files on this CD-ROM. The pieces not shownhere are merely user interface elements that enable you to experiment with these functions. Verifying a mime typeListing 38-3a is a function whose narrow purpose is to determine if the browser currently hasplug-in support enabled for a given mimetype (in the type/subtypeformat as a string). The firstifconstruction verifies that there is a mimeTypeobject for the supplied mimetype string. Ifsuch an object exists, the next ifconstruction determines whether the enabledPluginprop- erty of the mimeTypeobject returns a valid object. If so, the function returns true meaningthat the mimetype has a plug-in (of unknown supplier) available to play the external media. Listing 38-3a:Verifying a MIME Type// Pass  <type>/<subtype>  string to this function to find// out if the MIME type is registered with this browser// and that at least some plug-in is enabled for that type. function mimeIsReady(mime_type) { if (navigator.mimeTypes[mime_type]) { if (navigator.mimeTypes[mime_type].enabledPlugin) { return true; } } return false; } Verifying a plug-inIn Listing 38-3b, you let JavaScript see if the browser has a specific plug-in registered in thenavigator.pluginsarray. This method approaches the installation question from a differentangle. Instead of querying the browser about a known mimetype, the function inquires aboutthe presence of a known plug-in. But because more than one registered plug-in can support agiven mimetype, this function explores one step further to see whether at least one of theplug-in s mimetypes (of any kind) is enabled in the browser. Listing 38-3b:Verifying a Plug-In// Pass the name of a plug-in for this function to see// if the plug-in is registered with this browser and// that it is enabled for at least one MIME type of any kind. function pluginIsReady(plug_in) { plug_in = plug_in.toLowerCase(); for (var i = 0; i < navigator.plugins.length; i++) { if (navigator.plugins[i].name.toLowerCase().indexOf(plug_in) != -1) { for (var j = 0; j < navigator.plugins[i].length; j++) { if (navigator.plugins[i][j].enabledPlugin) { return true; } } return false; }
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/bulletproof-web-design-bc94part-vibonus-chapterslocated-in-its-entirety-among-the/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Vps web hosting - BC93Chapter 38The Navigator and Other Environment ObjectsInterestingly, this</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/vps-web-hosting-bc93chapter-38the-navigator-and-other-environment-objectsinterestingly-this/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/vps-web-hosting-bc93chapter-38the-navigator-and-other-environment-objectsinterestingly-this/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 05:08:06 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/vps-web-hosting-bc93chapter-38the-navigator-and-other-environment-objectsinterestingly-this/</guid>
		<description><![CDATA[BC93Chapter 38The Navigator and Other Environment ObjectsInterestingly, this command works only for adding a plug-in to the existing collection. If the userremoves a plug-in and invokes this method, the removed one stays in the navigator.pluginsarray although it may not be available for use. Only the act of quitting and relaunching thebrowser makes a plug-in removal [...]]]></description>
			<content:encoded><![CDATA[<p>BC93Chapter 38The Navigator and Other Environment ObjectsInterestingly, this command works only for adding a plug-in to the existing collection. If the userremoves a plug-in and invokes this method, the removed one stays in the navigator.pluginsarray although it may not be available for use. Only the act of quitting and relaunching thebrowser makes a plug-in removal take full effect. Looking for mime Types and Plug-InsIf you go to great lengths to add new media and data types to your Web pages, you certainlywant your visitors to reap the benefits of those additions. But you cannot guarantee that theyhave the requisite plug-ins installed to accommodate that fancy data. Most modern browserversions provide a bit of internal  smarts  by noticing when data requiring an uninstalled plug- in is about to load and trying to help the user install a missing plug-in. You may wish, however, to take more control over the process by examining the user s browser plug-in functionalityprior to loading the external data file.  The best source of information, when available, is the software developer of the plug-in. Macromedia, for example, provides numerous technical notes on its Web site (www. macromedia.com) about plug-in detection for its various plug-ins and versions. Unfortunately, that kind of assistance is not always easy to find from other vendors. A lot of the discussion thus far in this chapter addresses the objects that make plug-in andmimetype support detection possible in some browsers. Netscape for NN3 initially introducedthese objects. Since then, they have been adopted by MacIE5 and Safari. Microsoft makes itpossible but not easy to determine whether a particular plug-in is available for WinIE. The approach for WinIE is entirely different from what I have covered so far; if you wish toperform cross-browser detection, you have to branch your code accordingly. I outline eachapproach next in its own section, starting with the NN3+/MacIE5/Safari way. Overview: Using mimeType and plugin objectsThe value of performing your own inspection of plug-in support is that you can maintain bet- ter control of your site visitors who don t have the necessary plug-in yet. Rather than merelyproviding a link to the plug-in s download site, you can build a more complete interface aroundthe download and installation of the plug-in without losing your visitor. I have some suggestionsabout such an interface at the end of this discussion. How you go about inspecting a visitor s plug-in library depends on what information you haveabout the data file or stream and how precise you must be in locating a particular plug-in. Some plug-ins may override mimetype settings that you normally expect to find in a browser. Another issue that complicates matters is that the same plug-in may have a different name(navigator.plugins[i].nameproperty), depending on the operating system. Therefore, searching your script for the presence of a plug-in by name is not good enough if the namediffers from the Macintosh version to the Windows version. Fortunately, this is less of anissue today than it was in earlier plug-in generations. One other point that can help you decide the precise approach to take is which informationabout the plug-in support for the data mimetype or the presence of a particular plug-in isimportant to your page and scripts. If your scripts rely on the existence of a plug-in that youcan script via LiveConnect, be sure that the plug-in is present and enabled for the desired mimetype (so that the plug-in is ensured of loading when it encounters a reference to the URL ofthe external data). But if you care only that a plug-in of any kind supports your data s mimetype, you can simply make sure that any plug-in is enabled for your MIME type.  To help you jump-start the process in your scripts, I discuss three utility functions you can usein your own scripts. These functions are excerpts from a long listing (Listing 38-3), which is
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/vps-web-hosting-bc93chapter-38the-navigator-and-other-environment-objectsinterestingly-this/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>BC92Part VIBonus ChaptersPropertiesnamefilenamedescriptionlengthValue:String.Read-OnlyCompatibility:WinIE-, MacIE5, NN3+, Moz1+, Safari1+ The  (Web server setup)</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/bc92part-vibonus-chapterspropertiesnamefilenamedescriptionlengthvaluestringread-onlycompatibilitywinie-macie5-nn3-moz1-safari1-the-web-server-setup/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/bc92part-vibonus-chapterspropertiesnamefilenamedescriptionlengthvaluestringread-onlycompatibilitywinie-macie5-nn3-moz1-safari1-the-web-server-setup/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 14:09:12 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/bc92part-vibonus-chapterspropertiesnamefilenamedescriptionlengthvaluestringread-onlycompatibilitywinie-macie5-nn3-moz1-safari1-the-web-server-setup/</guid>
		<description><![CDATA[BC92Part VIBonus ChaptersPropertiesnamefilenamedescriptionlengthValue:String.Read-OnlyCompatibility:WinIE-, MacIE5, NN3+, Moz1+, Safari1+ The first three properties of the pluginobject provide descriptive information about theplug-in file. The plug-in developer supplies the name and description. It s unclear whetherfuture versions of plug-ins will differentiate themselves from earlier ones via either of thesefields. Thus, while there is no explicit property that defines a [...]]]></description>
			<content:encoded><![CDATA[<p>BC92Part VIBonus ChaptersPropertiesnamefilenamedescriptionlengthValue:String.Read-OnlyCompatibility:WinIE-, MacIE5, NN3+, Moz1+, Safari1+ The first three properties of the pluginobject provide descriptive information about theplug-in file. The plug-in developer supplies the name and description. It s unclear whetherfuture versions of plug-ins will differentiate themselves from earlier ones via either of thesefields. Thus, while there is no explicit property that defines a plug-in s version number, thatinformation may be part of the string returned by the nameor descriptionproperties. Be aware that plug-in authors may not assign the same name to every OS platform version ofa plug-in. Be prepared for discrepancies across platforms. You should hope that the plug-inthat you re interested in has a uniform name across platforms because the value of the nameproperty can function as an index to the navigator.pluginsarray to access a particularpluginobject directly. Another piece of information available from a script is the plug-in s filename. On some plat- forms, such as Windows, this data comes in the form of a complete pathname to the plug-inDLL file; on other OS platforms, only the plug-in filename appears. Finally, the lengthproperty of a pluginobject counts the number of mimetypes that theplug-in recognizes (but is not enabled for necessarily). Although you can use this informationto loop through all possible mimetypes for a plug-in, a more instructive way is to have yourscripts approach the issue via the mimetype (as discussed later in this chapter). ExampleSee the section  Looking for mimeTypes and Plug-ins  later in this chapter. Related Item:mimeType.description property. Methodsrefresh() Returns:Nothing. Compatibility:WinIE-, MacIE5, NN3+, Moz1+, Safari1+ You may have guessed that many browsers determine their lists of installed plug-ins whilethey launch. If you drop a new plug-in file into the plug-ins directory/folder, you have to quitthe browser and relaunch it before the browser sees the new plug-in file. But that isn t a veryfriendly approach if you take pains to guide a user through downloading and installing a newplug-in file. The minute the user quits the browser, you have a slim chance of getting that per- son right back. That s where the refresh()method comes in. The refresh()method is directed primarily at the browser, but the syntax of the call remindsthe browser to refresh just the plug-ins: navigator.plugins.refresh() pluginObject.name()
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/bc92part-vibonus-chapterspropertiesnamefilenamedescriptionlengthvaluestringread-onlycompatibilitywinie-macie5-nn3-moz1-safari1-the-web-server-setup/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Web design service - BC91Chapter 38The Navigator and Other Environment ObjectsSyntaxAccessing pluginobject</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/web-design-service-bc91chapter-38the-navigator-and-other-environment-objectssyntaxaccessing-pluginobject/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/web-design-service-bc91chapter-38the-navigator-and-other-environment-objectssyntaxaccessing-pluginobject/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 23:02:32 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/web-design-service-bc91chapter-38the-navigator-and-other-environment-objectssyntaxaccessing-pluginobject/</guid>
		<description><![CDATA[BC91Chapter 38The Navigator and Other Environment ObjectsSyntaxAccessing pluginobject properties or method: navigator.plugins[i].property &#124; method() navigator.plugins[ plugInName ].property &#124; method() Compatibility:WinIE-, MacIE5, NN3+, Moz1+, Safari1+ About this objectThe pluginobject offers a view of the plug-in mechanism from the browser s perspective: Thesoftware items registered with the browser at launch time stand ready for any matching mimetype [...]]]></description>
			<content:encoded><![CDATA[<p>BC91Chapter 38The Navigator and Other Environment ObjectsSyntaxAccessing pluginobject properties or method: navigator.plugins[i].property | method() navigator.plugins[ plugInName ].property | method() Compatibility:WinIE-, MacIE5, NN3+, Moz1+, Safari1+ About this objectThe pluginobject offers a view of the plug-in mechanism from the browser s perspective: Thesoftware items registered with the browser at launch time stand ready for any matching mimetype that comes from the Net. One of the main purposes of having these objects scriptable isto let your scripts determine whether a desired plug-in is currently registered with thebrowser and to help with installing a plug-in. The close association between the pluginand mimeTypeobjects, demonstrated by themimeType.enabledPluginproperty, is equally visible coming from the direction of the plug- in. A pluginobject evaluates to an array of mimetypes that the plug-in interprets. Use TheEvaluator (Chapter 13) to experiment with mimetypes from the point of view of a plug-in. Beginby finding the name of the plug-in that your browser uses for a common animation mimetype: 1.Enter the following statement into the top text box:  navigator.mimeTypes[ application/x-shockwave-flash ].enabledPlugin.nameIf you use NN7+, MacIE5, or Safari, the value returned is probably  Shockwave Flash . Copy the name into the clipboard so that you can use it in subsequent statements. Theremaining examples show  LiveAudio where you should paste in your plug-in s name. 2.Enter the following statement into the top text box: navigator.plugins[ Shockwave Flash ].lengthInstead of the typical index value for the array notation, use the actual name of theplug-in. This expression evaluates to a number indicating the total number of differentmimetypes that the plug-in recognizes. 3.Look at the first mimetype specified for the plug-in by entering the following statementinto the top text box: navigator.plugins[ Shockwave Flash ][0].typeThe two successive pairs of square brackets is not a typo: Because the entry in the pluginsarray evaluates to an array itself, the second set of square brackets describes the index of thearray returned by plugins[ Shockwave Flash ] a period does not separate the sets ofbrackets. In other words, this statement evaluates to the typeproperty of the first mimeTypeobject contained by the Shockwave/Flash plug-in. I doubt that you will have to use this kind of construction much; if you know the name of thedesired plug-in, you know what mimetypes it already supports. In most cases, you come atthe search from the mimetype direction and look for a specific, enabled plug-in. See the sec- tion  Looking for mimeTypes and Plug-ins  later in this chapter for details on how to use thepluginobject in a production setting. pluginObject
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/web-design-service-bc91chapter-38the-navigator-and-other-environment-objectssyntaxaccessing-pluginobject/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>BC90Part VIBonus ChaptersThis string prompts a  (Geocities web hosting) browser to</title>
		<link>http://jboss.jspwebsitehosting.com/jboss/bc90part-vibonus-chaptersthis-string-prompts-a-geocities-web-hosting-browser-to/</link>
		<comments>http://jboss.jspwebsitehosting.com/jboss/bc90part-vibonus-chaptersthis-string-prompts-a-geocities-web-hosting-browser-to/#comments</comments>
		<pubDate>Sat, 22 Mar 2008 06:14:51 +0000</pubDate>
		<dc:creator>humphreyblogart</dc:creator>
		
	<category>JBOSS</category>
		<guid isPermaLink="false">http://jboss.jspwebsitehosting.com/jboss/bc90part-vibonus-chaptersthis-string-prompts-a-geocities-web-hosting-browser-to/</guid>
		<description><![CDATA[BC90Part VIBonus ChaptersThis string prompts a browser to look up how to treat an incoming data stream of this kind. Asyou see later in this chapter, knowing whether a particular mimetype is listed in the  navigator.mimeTypesarray is not enough. A good script must dig deeper to uncover addi- tional information about what is truly [...]]]></description>
			<content:encoded><![CDATA[<p>BC90Part VIBonus ChaptersThis string prompts a browser to look up how to treat an incoming data stream of this kind. Asyou see later in this chapter, knowing whether a particular mimetype is listed in the  navigator.mimeTypesarray is not enough. A good script must dig deeper to uncover addi- tional information about what is truly available for your data. The typeproperty has a special place in the mimeTypeobject in that its string value can actas the index to the navigator.mimeTypesarray. Therefore, to get straight to the mimeTypeobject for, say, the audio/wavmimetype, your script can reference it directly through themimeTypesarray: navigator.mimeTypes[ audio/wav ] This same reference can then get you straight to the enabled plug-in (if any) for the mime type: navigator.mimeTypes[ audio/wav ].enabledPluginExampleSee the section  Looking for mimeTypes and Plug-ins  later in this chapter. Related Item:description property. suffixesValue:String.Read-OnlyCompatibility:WinIE-, MacIE5, NN3+, Moz1+, Safari1+ Every mimetype has one or more filename extensions, or suffixes, associated with it. You canread this information for any mimeTypeobject via the suffixesproperty. The value of thisproperty is a string. If the mimetype has more than one suffix associated with it, the stringcontains a comma-delimited listing as inmpg, mpeg, mpeMultiple versions of a suffix have no distinction among them. Those mimetypes that are bestdescribed in four or more characters (derived from a meaningful acronym, such as mpeg) havethree-character versions to accommodate the  8-dot-3  filename conventions of MS-DOS andits derivatives. ExampleSee the section  Looking for mimeTypes and Plug-ins  later in this chapter. plugin ObjectPropertiesMethodsEvent Handlersnamerefresh() filenamedescriptionlengthmimeTypeObject.type
</p>
]]></content:encoded>
			<wfw:commentRSS>http://jboss.jspwebsitehosting.com/jboss/bc90part-vibonus-chaptersthis-string-prompts-a-geocities-web-hosting-browser-to/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
