=============================================== SEARCH400.COM WEBSPHERE STRATEGIES TIP June 14, 2001 More WebSphere Strategies tips at http://search400.techtarget.com/tipsIndex/0,289482,sid3_tax2f9,00.html =============================================== SPONSORED BY: Postmaster Direct =============================================== Get free offers from reputable merchants for products that you are interested in. Pick from over 50 categories of interest, modify your profile at any time to suit your needs, and receive only the e-mail that interests you when you subscribe today. Just click on the link below and get your account up and running. http://search400.techtarget.com/postmasterDirect/ =============================================== Getting your arms around JSPs By Bob Cancilla, special to search400 Java Server Pages (JSPs) are the glue that ties Java programs (usually servlets) to HTML for presentation on a browser. A JSP file is fundamentally a text file that contains a mixture of HTML and JSP directives. JSPs introduce a method of defining variables that, when executed, will substitute a value for the variable. You might want to code an HTML containing something such as this: NAME: name_from_database When processed, it would appear as: NAME: Bob Cancilla That could be represented in a JSP file as: <P>NAME: <%= username() %> A JSP file requires that you have an application server such as WebSphere or Tomcat configured to support JSP processing. A JSP file may be invoked directly from the URL or a hyperlink embedded in an HTML page. When the HTTP server sees the "jsp" extension, the request is passed to the application server for processing. The application server compiles a temporary Java servlet from the contents of the JSP file, executes the INIT method, and writes results to STDOUT and an HTML page transmitted back to the client. IBM's model, view, controller approach to developing applications for a Java application server strongly recommends that you link to Servlets that invoke JSPs for formatting and presenting output. Sun Microsystem's specification for JSPs allows much greater flexibility. You may embed Java processing logic within a JSP file, invoke Java beans, and call servlets or other JSPs from within a JSP file. IBM's WebSphere Development Studio creates servlets that invoke JSPs to handle the presentation and provide an editor that enables you to customize your JSP file with HTML. Macromedia Inc. sells an inexpensive product called UltraDev that is integrated with its DreamWeaver HTML editor. UltraDev enables you to use a completely GUI- based environment to develop extremely sophisticated JSP- based applications. Additional resources about JSPs may be found at http://java.sun.com/products/jsp/index.html You may also want to check out chapter 5 of Java Server Pages of the IBM Redbook Servlet and JSP Programming with IBM WebSphere Studio and VisualAge for Java, SG24-5755- 00, located on the Web at http://www.redbooks.ibm.com/pubs/pdfs/redbooks/sg245755.pdf ------------------------------------ About the author: Bob Cancilla is managing director of IGNITe/400 (http://www.ignite400.org), an electronic iSeries 400 Internet users group. He is also author of the book Getting Down to e-business with AS/400 (http://www.digitalguru.com/dgstore/product.asp?isbn=1583470107&ac_id=55) --------------------------------------------------------- ADVICE ON WEBSPHERE AND WEB DEVELOPMENT --------------------------------------------------------- Do you have questions about WebSphere and Web development? Post it in our new WebSphere/Web Development Discussion Forum. Here you'll get advice from our site experts who monitor the forum, as well as ideas and suggestions from your peers. Post it now at http://search400.discussions.techtarget.com/WebX?[EMAIL PROTECTED]^[email protected] You may also read the Web development advice our experts have given in our Ask the Expert section. http://search400.techtarget.com/ateAnswers/0,289620,sid3_tax285218,00.html ------------------------------------- FEATURED BOOK ------------------------------------- Title: JSP -- The Complete Reference Author: Phillip Hanna Description: Combine JavaServer Pages with other server- side Web components to create and deploy effective, reliable and robust Web enterprises. JSP: The Complete Reference provides in-depth coverage of everything you'll need to program and develop powerful and efficient Web sites and applications. Control the content and appearance of Web pages using tools like JSP, servlets, JavaBeans, and Java 2 platform servlets to create reusable components and simplify application development. Regardless of your skill level, this resourceful volume will help you tap all the advantages of JSP coding and developing techniques. http://www.digitalguru.com/dgstore/product.asp?isbn=0072127686&ac_id=55 ======================================================== If you would like to sponsor this or any TechTarget newsletter, please contact Gabrielle DeRussy at mailto:[EMAIL PROTECTED]. ======================================================== If you no longer wish to receive this newsletter simply reply to this message with "REMOVE" in the subject line. Or, visit http://search400.techtarget.com/register and adjust your subscriptions accordingly. If you choose to unsubscribe using our automated processing, you must send the "REMOVE" request from the email account to which this newsletter was delivered. Please allow 24 hours for your "REMOVE" request to be processed.
