000224.html | WebReference

000224.html

(((((((((((((((( WEBREFERENCE UPDATE NEWSLETTER ))))))))))))))))) February 24, 2000

_____________________________SPONSORS_____________________________

This newsletter sponsored by: Allaire, Gartner Group and eWork Exchange __________________________________________________________________

/-------------------------------------------------------------------\

Sponsored by Allaire Corporation, Creators of ColdFusion, PC Magazine's 1999 Internet Software Product of the Year. Launching the next killer .COM? The ColdFusion 4.5 Web application server provides the speed and scalability you'll need. Download your FREE evaluation copy today at http://www.allaire.com/coldfusion.cfm?web_ID=876

\--------------------------------------------------------------adv.-/

Now with over 95200 subscribers!

http://www.webreference.com http://www.webreference.com/new/ http://www.webreference.com/new/submit.html New this week on WebReference.com and the Web:

1. CONTESTS: Submit & Win!, Subscribe & Win! 2. FEATURED ARTICLE: Building Dynamic Pages with XML, XSL and JSP 3. NET NEWS: * U.S. Lets Professor Put Encryption on Internet * Jackson Nears Ruling as Arguments Close * Lessig Skeptical About Microsoft Breakup * CIA, Experts Warn Of Russian, Chinese Cyber Threat * Business Schools to Start Offering Ecommerce Major

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1.CONTESTS: Submit & Win!, Subscribe & Win!

>Submit & Win!

The article submissions are pouring in, but it's not too late for you to submit yours! Every Thursday the Update features a new article contributed by our readers through our Open Publishing Initiative. You get fame, hits, and the respect of your peers... and now, writers published in the newsletter also get a brand new copy of Adobe System's PhotoShop 5.5!

http://www.webreference.com/new/submit.html

This week, writer Bob Rudis show us how to get started serving up dynamic Web pages by using XML, XSL, and JSP. Thanks Bob, and enjoy Photoshop 5.5!

>Subscribe & Win!

Can't write? Still want to win? Don't worry, you can! Sign up for the Webreference newsletter, and get a chance to win a super software bundle from SoftQuad Software Inc. and Ulead Systems Inc. Prizes include HoTMetaL PRO 6.0, PhotoImpact 5, and COOL 3D 2.5. Each week we'll draw new winners from our new subscribers - you could be next. Already a subscriber? Not a problem - just fill out the form, and you'll be automatically entered to win.

http://www.webreference.com/new/contest.html

This week's winners include Carnegie Johnson of Columbia, SC; Bill Hammen of Red Lion, PA; and Derek Jempson of East Sussex, England. Enjoy the software bundle everyone!

/-------------------------------------------------------------------\

GartnerGroup is a leader in IT research and consulting. Some of the most successful global companies would not make a decision in a range of IT areas - without us. Join us and what could you expect? The visibility that comes with high profile projects. And an opportunity to learn from an association with the best minds. Interested? Visit http://www.gartner.com/careers

\--------------------------------------------------------------adv.-/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2. FEATURED ARTICLE: Building Dynamic Pages with XML, XSL and JSP

>The Challenge

Web sites used to be fairly predictable beasts. Mix some HTML with some CGI and you have a basic page that responds to the user. Today, if your site isn't dynamic, it's dead or at least on the endangered species list. While older tools, such as PHP, get the job done and proprietary beasts, like Microsoft's Active Server Pages (ASP), lock you into a platform, emerging tools and standards are available to help you streamline development and serve up fresh, dynamic content to your visitors.

>The Standards

This article walks you through the creation of a simple area code lookup form that uses a Java Server Pages (JSP) to retrieve data from a database, XML to hold the result of queries and XSL to put the finishing touches on the browser presentation.

JSPs are the open answer to ASPs. Simply stated, they are mixture of markup tags and Java code on the same page. You have the full power of Java and all it's class libraries to use in your development - including built-in database connectivity with the JDBC classes.

The Extensible Markup Language (XML) provides a structured way to represent information and can be used with the Extensible Stylesheet Language (XSL) to format and present a finished document for viewing. Internet Explorer 5.x is one of the best ways (as of this writing) to directly view XML/XSL documents, but you are able to run XML/XSL documents through other utilities to generate HTML (or XHTML output) for viewing by any browser.

>The Application

The link to the full sources can be found at: "http://www.cs.moravian.edu/~brudis/webreference/". This example application is based upon an area code database with three fields: area code, location (state), and description. From it, you can display the complete database, or lookup information on any one of the three fields - all with one JSP page.

If you do not have a Web server with inherent JSP capabilities, then I suggest going over to the Apache site and grabbing "Tomcat" - which is an open JSP/Servlet implementation under the Apache Software Foundation. IBM and Sun contribute to the project and it is a great starting point. Alternatively, you could use products like ServletExec and Jrun which provide similar functionality and can be added onto most modern Web servers and platforms.

To fully appreciate the power of the technology, you'll need to have the area code information stored in a database. If you don't have one handy, or dislike ODBC as much as I do, then grab a copy of MySQL and the JDBC driver for it. It's free, and easy to get setup and running.

Once you have a database and a JSP-engine, the application is a mere two files: areacode.jsp (which contains the form and lookup code) and areacode.xsl (which contains the presentation markup instructions). If you're running Tomcat, you can start the application by calling up a URL in IE: "http://www.some.svr:8080/areacode.jsp" provided you put the file in the "webpages" directory after the server build.

/-------------------------------------------------------------------\

LOOKING FOR WORK? Try eWorking! eWork Exchange currently has over $600 Million worth of projects for freelancers, web developers, IT Contractors, and consultants! Find your ideal project for FREE and start eWorking today at http://www.ework.com/index.cfm?epin=218&

\--------------------------------------------------------------adv.-/

areacode.jsp is divided into three sections: the header, which contains the XML document tag and the JSP page directives; the HTML body, which is sent if there is no form input to process; and the JSP code that connects to the database and outputs XML tags.

The directives in the "header" tell the JSP engine about the page and give it the opportunity to import supporting class libraries (such as the JDBC classes). One important directive is 'contentType="text/xml"' which tells the server to send the appropriate MIME type to the browser so it knows to expect XML content.

JSP pages have access to the same information as CGI scripts. If a GET or POST query has been made, the JSP (or servlet) can retrieve the data by means of a "request" statement. The page can first check to see if there are any variables to process. If not, it sends out the HTML page with three query forms. For this section, it is important that the appropriate "<!DOCTYPE..." is sent before any other data in order for the HTML to be rendered by the browser. The target of the form submissions is the JSPpage.

Once a form is submitted, the third section, containing JSP code, is executed. As with the other two sections, a special XSL stylesheet tag must appear before all content. This tag references the "areacode.xsl" stylesheet that is used by the browser to produce the final page results. The JSP code connects to the database then selects the appropriate data and outputs an XML stream of area code records.

XSL stylesheets use a template matching system to find and then process XML content. All processing starts at the root document element and proceeds from there. areacode.xsl matches each area code record and puts the content into a table row. Further processing (such as sorting or hiding) can be done with XSL if necessary.

>The Result

A simple, yet useful application has been built with just two files and some information stored in a database. More extensive applications can be built with Java Server Pages that take advantage of built-in session capabilities and that work in conjunction with Java Servlets. Furthermore, we have only scratched the surface of the power of XML and XSL. These three open technologies will become essential components in your toolbox as you endeavor to build more dynamic and personalzied sites.

>Additional Resouces

Source Code & Data Files for this article http://www.cs.moravian.du/~brudis/webreference/

Java Server Pages Reference http://java.sun.com/products/jsp/

W3C XML Site http://www.w3.org/XML/

W3C XSL Site http://www.w3.org/Style/XSL/

MySQL Database Home http://www.mysql.org/

MySQL JDBC Driver http://www.worldserver.com/mm.mysql/

Jakarta/Tomcat Project Home http://jakarta.apache.org/

ServletExec Home http://www.newatlanta.com/

JRun Home http://www.allaire.com/

DocBook XSL Markup Library http://nwalsh.com/xsl/docbook/html/docbook.xsl

/-------------------------------------------------------------------\

WHO ARE THE WEB'S TOP E-TAILERS? Find out when you visit CyberAtlas.com. You'll find all the Internet market Research you need from the Web's leading resources. Every Web Marketer should have http://www.cyberatlas.com as a bookmark.

\--------------------------------------------------------------adv.-/

About the Author: Bob's been an Internet inhabitant for thirteen years (since "back in the days when folks still knew how to spell UUCP") and has been involved in various large-scale Web site development projects including "http://www.biblestudytools.net". At present, Bob is an e-Business Technology Development Sr. Consultant at Johnson & Johnson, as well as being an adjunct professor in the Computer Science deptartment of Moravian College in Bethlehem, PA.

You can contact Bob at brudis@yahoo.com.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 3. NET NEWS: U.S. Lets Professor Put Encryption on Internet, Jackson Nears Ruling as Arguments Close, Lessig Skeptical About Microsoft Breakup, CIA, Experts Warn Of Russian, Chinese Cyber Threat, Business Schools to Start Offering Ecommerce Major

>U.S. Lets Professor Put Encryption on Internet

The United States will allow a computer scientist to put instructions for writing a powerful computer data-scrambling program on his Web site, but his high-profile lawsuit challenging U.S. export restrictions on encryption may continue. http://dailynews.yahoo.com/h/nm/20000224/wr/tech_encryption_2.html Yahoo.com, 000224

>Jackson Nears Ruling as Arguments Close

With the conclusion of final oral arguments in the Microsoft anti- trust case, the task before Judge Jackson is culling a ruling from the mountains of evidence. That could come within several weeks. While he ponders Microsoft's fate, settlement talks continue in Chicago. http://news.cnet.com/news/0-1003-200-1556446.html News.com, 000223

>Lessig Skeptical About Microsoft Breakup

Harvard law professor Lawrence Lessig, whose views carry weight with the federal judge hearing the Microsoft Corp. antitrust trial, is skeptical about proposals to break up the software giant, the Washington Post reported Thursday. http://www.zdnet.com/zdnn/stories/news/0,4586,2445619,00.html ZDNet.com, 000224

>CIA, Experts Warn Of Russian, Chinese Cyber Threat

The Central Intelligence Agency (CIA) and computer security experts said on Wednesday that a growing body of evidence suggests Chinese and Russian military officials were developing tools that could be used to wage information warfare against the United States. http://www.newsbytes.com/pubNews/00/144429.html NewsBytes.com, 000224

>Business Schools to Start Offering Ecommerce Major

Job applicants with a combination of technology skills and business acumen are in such demand that several colleges are offering a new major : ecommerce. http://www.usatoday.com/life/cyber/tech/cth427.htm USAToday.com, 000223

That's it for this week, see you next time.

Andrew King Managing Editor, WebReference.com update@webreference.com

Eric Cook Assistant Editor, WebReference.com ecook@internet.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sponsoring the WebReference Update is a cost effective way to reach thousands of qualified buyers. Just ask Frank Fazio, Director of Inside Sales to find out how. Contact: (203)662-2997 or mailto:ffazio@internet.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Also on Internet.com .... http://www.Internet.com

Internet News Channel http://www.internet.com/sections/news.html Internet Stocks/VC Channel http://www.internet.com/sections/stocks.html Internet Technology Channel http://www.internet.com/sections/it.html Windows Internet Technology Channel http://www.internet.com/sections/win.html Linux/Open Source Channel http://www.internet.com/sections/linux.html Web Developer Channel http://www.internet.com/sections/webdev.html E-Commerce/Marketing http://www.internet.com/sections/marketing.html ISP Resources Channel http://www.internet.com/sections/isp.html Download Channel http://www.internet.com/sections/downloads.html Internet Resources Channel http://www.internet.com/sections/resources.html Internet List Channel http://www.internet.com/sections/lists.html International Channel http://www.internet.com/sections/international.html ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To SUBSCRIBE to the WEBREFERENCE-UPDATE: 1. subscribe@webreference.com or webreference-update-text-on@list4.internet.com

To UN-SUBSCRIBE from WEBREFERENCE-UPDATE do NOT reply to this message, instead: 1. unsubscribe@webreference.com or webreference-update-text-off@list4.internet.com

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright (c) 2000 Jupitermedia Corp. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ WEBREFERENCE-UPDATE is powered by Lyris(R) http://www.lyris.com