Special Edition Using Java Server Pages and Servlets
Home > Computing and Information Technology > Computer programming / software engineering > Web programming > Special Edition Using Java Server Pages and Servlets
Special Edition Using Java Server Pages and Servlets

Special Edition Using Java Server Pages and Servlets


     0     
5
4
3
2
1



Out of Stock


Notify me when this book is in stock
X
About the Book

Special Edition Using JSP and Servlets starts by detailing the evolution of web servers that led to the creation of ASP and JSP. It explains both the limitations of previous technologies and the benefits that JSP provides including platform independence. Includes coverage of: organizing applications with multiple files and client-side objects, generating well-formed XML using JSP, storing data in cookies and sessions, interacting with Enterprise Java Beans, displaying dynamic graphics with Java 2D, and using RMI and Corba to enhance JSP applications. The final chapters demonstrate advanced JSP & Servlet techniques, including using JSP to create wireless & XML-based applications. Appendices provide an overview of popular JSP & Servlet runtime environments, including Jrun, Tomcat and ServletExec.

Table of Contents:
Introduction. Who Should Buy This Book. How This Book Is Organized. Conventions Used in This Book. I. BASIC JAVA SERVER PAGES. 1. The Evolution of the Web Server. The Basic Web Server. CGI: The Common Gateway Interface. NSAPI, ISAPI, and Other Loadable Modules. Active Server Pages. Servlets. XML and XSL Stylesheets. Java Server Pages. 2. Getting Started with Java Server Pages. A “Hello World” Java Server Page. Using the % % Tags in a Java Server Page. Displaying a Value with %=. Inserting Comments. Declaring Methods and Variables with %!. Handling Multiple Threads in a JSP. Troubleshooting. 3. Getting Started with Servlets. A "Hello World" Servlet. Compiling the Servlet. Runtime Classpath. The HelloWorldServlet In-Depth. The Anatomy of a Servlet. The service Method. The init Method. The destroy Method. The getServletInfo and getServletConfig Methods. Sending a Response to the Browser. The HttpServlet Class. Choosing Between Java Server Pages and Servlets. The Advantages and Disadvantages of JSP. The Advantages and Disadvantages of Servlets. Troubleshooting. 4. Creating HTML Forms. A Simple HTML Form. Using the request Object. Handling Multiple Form Values. Retrieving Form Variables in a Servlet. JavaScript and Java Server Pages. Passing Data to JavaScript. Different Ways to Do Forms. A Practical HTML and JSP Combination. Setting Configuration Parameters. Locking Output Files. A JSP Input Form Calling a JSP Form Handler. Using the Same JSP for the Input Form and Form Handler. An Example Input Form and Form Handler JSP. Troubleshooting. 5. Saving Data Between Requests. Storing Data in Hidden Form Variables. Security Concerns with Hidden Variables. Storing Data in a session Object. Using the session Object in a JSP. Using the session Object in a Servlet. How Sessions Work. Forcing a New Session. Handling Session Termination. The HttpSessionBindingListener Interface. Handling Sessions Without Cookies. Disabling Cookies in Internet Explorer. Disabling Cookies in Netscape. Storing Application-Wide Data. Why Do You Need the application Object? Troubleshooting. 6. Debugging and Error Handling. Why Debugging Is Tough. Using Log Files to Debug an Application. Using System.out and System.err. Using the Servlet Logging API. Logging to a File. Using Exceptions to Trace Execution. Using a Debugger. Debugging a Servlet with Tomcat. Debugging a Java Server Page with Tomcat. Error Handling. Specifying an Error Page for a JSP. Specifying Error Handlers for Web Server Errors. Troubleshooting. 7. Organizing Your Application. Including Other Files. Including Files in a JSP at Runtime. Passing Parameters to an Included File. Including Files from a Servlet. Forwarding to Another Page. Forwarding to Another Page from a JSP. Forwarding to Another Page from a Servlet. Passing Parameters to the Forwarded Page. Passing Java Objects Between JSPs and Servlets. Making Your Application More Modular. A Reusable HTML Table Module. The Model-View-Controller Paradigm. How Does Model-View-Controller Help? An Example Controller. An Example View. Calling Multiple Controllers and Views. Using an Applet in Your Form. Troubleshooting. 8. More About Saving Data. Designing the Shopping Cart. Creating the Data Objects. Creating the ShoppingCart Class. Displaying the Contents of the Shopping Cart. Adding and Removing Items. Completing the Order. Storing Data in a Cookie. Using Cookies in Servlets and Java Server Pages. Troubleshooting. 9. Interacting with JavaBeans. The jsp:useBean Tag. Adding the Bean to the Page. Getting Bean Properties. Setting Bean Properties. Setting Properties Directly from Parameters. Initializing a New Bean. The Type of an Existing Bean. A Bean-Based Web Application. Troubleshooting. 10. Performance. Making Java Server Pages and Servlets Thread-Safe. Buffering Pages to Improve Performance. Caching Objects to Reduce Setup Time. Precompiling Java Server Pages. Simple Java Optimizations. Use the StringBuffer class. Parsing Numbers. Creating Objects. Troubleshooting. II. CORE COMPONENTS IN-DEPTH. 11. JSP and Servlet Lifecycles. Servlet Lifecycle. Servlet Loading. Servlet Initialization. Servlet Execution. Servlet Cleanup. Java Server Page Lifecycle. JSP Compilation. JSP Loading. JSP Initialization. JSP Execution. JSP Cleanup. Reloading Other Classes. Troubleshooting. 12. How the Browser Interacts with the Server. The HTTP Protocol. Viewing the Request Headers Made by a Browser. Common Request Headers. The Accept Header. The Accept-Language Header. The Accept-Charset Header. The User-Agent Header. Common Response Headers. The Content-Type Header. The Content-Length Header. The Cache-Control Header. The HTTP POST Command. GET Versus POST. HTTPS: Secure HTTP. Troubleshooting. 13. Core Servlet Components. The ServletRequest Class. Accessing Request Parameters. Accessing Request Attributes. Accessing Protocol-Related Information. Retrieving Request Data. Handling Uploaded Files. Getting Locale Information. The HttpServletRequest Class. Getting Header Values. Getting the HTTP Method. Accessing the Query String. Retrieving Cookies. Getting Session Information. The ServletContext Class. Getting the Server Version. Initialization Parameters. Saving Application-Wide Objects. Logging Messages. Calling Other Servlets and JSPs. Accessing Application Resources. The ServletResponse Class. Setting the Content Type and Length. Opening an Output Stream. Setting Locale-Specific Information. Response Buffering. The HttpServletResponse Class. Setting Header Variables. Redirecting the Browser. Returning Status. Encoding URLs. Sending Cookies. The ServletInputStream Class. The ServletOutputStream Class. The HttpSession Class. Storing and Retrieving Objects. Controlling Session Termination. Getting Session Status. The Cookie Class. Creating a New Cookie. Setting the Domain and Path. Cookie Aging. Secure Cookies. Cookie Protocol Versions. Cookie Comments. Troubleshooting. 14. Core Java Server Page Components. The Built-In JSP Objects. The request Object. The response Object. The out Object. The session Object. The application Object. The pageContext Object. The config Object. The page Object. The exception Object. The JspWriter Class. Sending Output Data. Buffer Control. Using a PrintWriter. The PageContext Class. Accessing the Built-In Objects. Accessing Attributes from the PageContext Class. Forwarding and Including. The JspEngineInfo Class. Troubleshooting. 15. JSP Directives. The page Directive. The language Option. The import Option. The session Option. The buffer and autoFlush Options. The isThreadSafe Option. The errorPage Option. The isErrorPage Option. The contentType Option. The info Option. The extends Option. The include Directive. The taglib Directive. Troubleshooting. III. JAVA WEB APPLICATION ARCHITECTURE. 16. Introduction to Application Architecture. The Three Layers of an Application. Application Tiers. Applications Come Unglued Over Time. Physical Versus Logical Tiers. How Can You Have Half a Tier? What I Mean by “Tier.” Single-Tiered Applications. Two-Tiered Applications. Three-Tiered Applications. The Trade-Offs. Application Complexity. Maintainability. Schedule Pressure. Development Team Skill. Miscellaneous Factors. Hybrid Architectures. 17. Browser-Server Interaction. Designing Your Web Screens. Redrawing the Entire Page. Organizing the Presentation into Frames. Sending Data to a Hidden Frame. Sending Data to the Browser. Handling Multiple Calls. Troubleshooting. 18. A Single-Tiered Web Application. Storing and Retrieving Data. Locking a File. Storing Data in a Text File. Storing Data with Object Serialization. Storing Data in a Random Access File. Troubleshooting. 19. Building a Two-Tiered Web Application. Creating a Connection Pool. Mapping Objects to Database Tables. A Poor-Man's Object-to-Relational Mapping. An Example Data Object. A Two-Tiered Problem Reporting System. The Login Screen. The Main Menu. Querying for Existing Problem Reports. Creating and Updating Problem Reports. Database Locking. Building a Better Connection Pool. Troubleshooting. 20. Designing a Three-Tiered Application. Stubs and Skeletons. Single-Client Versus Multi-Client Objects. Scalability. Maintainability. Striking a Balance. Optimizing Data Access. Database Locking. Three-Tiered Application with Enterprise JavaBeans. 21. Using RMI in a Web Application. Using a Single RMI Object for All Requests. Using One Object Per Browser Session. An Example RMI Application. The Database Interface. The Remote Interfaces. Implementing the ServiceRequests Interface. Implementing the RemoteServiceRequest Interface. Creating the Web Interface. Editing Service Requests. Troubleshooting. 22. Using CORBA in a Web Application. Using One CORBA Object for All Sessions. Using Separate CORBA Objects for Each Session. Using CORBA Structs. Dealing with Null Strings. Alternatives to Null. An Example CORBA Application. Troubleshooting. 23. Using Enterprise JavaBeans in a Web Application. What Is Enterprise JavaBeans? Entity and Session Beans. Containers. Persistence. Transactions. Connection Pooling. Object Pooling. How EJB, Servlets, and Java Server Pages Fit Together. Creating an Entity Bean. Creating the Entity Bean Implementation. Creating the Home Interface. Creating the Remote Interface. Creating a Session Bean. Creating a Stateless Session Bean. Accessing EJBs from Java Server Pages. Packaging a Complete EJB and JSP Application. Troubleshooting. IV. TAKING JSP AND SERVLETS BEYOND HTML. 24. Creating an XML Application. A “Hello World” XML Page. Sending XML from a Java Server Page. Sending XML from a Servlet. A Few Simple Rules for XML. Why Use XML with JSP and Servlets? Automatically Generated XML. Parsing XML with SAX and DOM. Troubleshooting. 25. Adding XSL Stylesheets to Enhance an XML Application. What Is XSL? A Simple XSL Stylesheet. Navigating an XML Document with XPath. Applying XSL Templates on the Browser. Applying XSL Templates from a Servlet. JSP or Stylesheets? Troubleshooting. 26. Creating a Wireless Web Application. A Wireless “Hello World” Page. Viewing the Wireless Hello Page. A Brief Introduction to WML. Navigating Between Cards. Creating Input Forms. Processing Form Input. Detecting Wireless Clients in a JSP or Servlet. A Wireless Score Entry and Reporting System. Deploying the Scores Application. Troubleshooting. 27. Creating On-the-Fly Graphics. Images Aren't Just Static Files. Sending Images from a Servlet. Uploading Images to a Servlet from Java. Uploading Images to a Servlet from a Browser. Performing Online Image Processing. Adding Captions to Images. Embossing Images. Edge Detection. Lighting Effects. Troubleshooting. V. ADVANCED TECHNIQUES. 28. Packaging a JSP Application. A Simple WAR File Example. Installing a WAR File Under Tomcat. Installing a WAR File Under JRun. WAR Configuration Options. General Application Options. Servlet Options. Others. Troubleshooting. 29. Extending JSP with New Tags. A “Hello World” Tag. Packaging and Installing a Tag. Conditional Includes Using Custom Tags. Accessing Tag Attributes. Processing Body Content with a Custom Tag. Adding Scripting Variables. Troubleshooting. 30. Internationalization. Detecting the Browser's Preferred Locale. Using Locale-Based Text Formatters. Creating a Locale Object. Formatting Dates. Formatting Currency. Getting a Locale for a Browser's Preferred Language. Using Resource Bundles in Web Pages. Troubleshooting. 31. Security. Role-Based Security. Basic Authentication. The security-constraint Tag. The login-config Tag. Creating a Custom Login Form. Checking Security Roles Programmatically. Using Client Certificates for Authentication. Troubleshooting. 32. XML Syntax for JSP. The XML JSP Syntax. The HelloWorld JSP in XML. Translating XML JSP Syntax. Troubleshooting. Appendix A. JSP Syntax and API Reference. JSP Syntax. Code Scriptlets. Expressions. Declarations. Comments. Directives. Built-In Objects. Actions. XML Syntax. Root Document. Code Scriptlets. Expressions. Declarations. Directives. Tag Libraries. Java Server Pages API. javax.servlet.jsp. javax.servlet.jsp.tagext. Appendix B. Servlet API Reference. The javax.servlet API. Interfaces. Classes. Exception. The javax.servlet.http API. Interfaces. Classes. Appendix C. Apache and Tomcat. Where to Get Tomcat. Installing Tomcat. Installing Tomcat on Windows. Installing Tomcat on Linux or UNIX. Running Tomcat Standalone. Running Tomcat Under Netscape Server for Windows. Running Tomcat Under IIS. Running Tomcat Under Apache. Running Tomcat with Apache for Windows. Running Tomcat with Apache for Linux. Tomcat Configuration. Working Directory. Logging. Setting the Classpath. Authentication. Special Tomcat Features. WAR File Installation. JSP Compiler. Appendix D. Jrun. Where to Find JRun. Installing JRun for Windows. Installing JRun for Linux. Starting JRun. JRun Administration. Connecting JRun to Other Web Servers. Connecting JRun to IIS or PWS. Connecting JRun to Netscape Web Server. Connecting JRun to Apache. Using JRun as a Standalone Web Server. Working Directory. Installing Web Applications. Setting the Classpath. Log Files. JRun Special Features. Appendix E. ServletExec. Where to Get ServletExec. Installing the ServletExec ISAPI Plug-In. Installing the ServletExec NSAPI Plug-In. Installing the ServletExec Standalone Server for Windows. Installing the ServletExec Standalone Server for Linux/UNIX. ServletExec Administration. Working Directory. Installing Web Applications. Log Messages. Setting the Classpath. ServletExec Special Features. Appendix F. Resin. Where to Get Resin. Installing Resin on Windows. Unpacking Resin with WinZip. Unpacking Resin from the Command Line. Testing the Installation. Installing Resin on Linux/UNIX. Running Resin Standalone. Running Resin Under Another Web Server. Running httpd or srun as Windows NT Services. Resin Administration. Working Directory. Installing Web Applications. Logging. Setting the Classpath. Adding Authentication Users. Resin Special Features. JavaScript Java Server Pages. XSL. Index.

About the Author :
Mark Wutka is the president of Wutka Consulting and specializes in helping companies get the most out of Java. He has built numerous Java, JSP and Servlet applications including several online ordering applications. In a past life he was the chief architect on a large, object-oriented distributed system providing automation for the flight operations division of a major airline and for 9 years designed and implemented numerous systems in Java, C, C++, and Smalltalk for that same airline. He previously contributed chapters to Special Edition Using Java 2 Platform and Hacking Java.


Best Sellers


Product Details
  • ISBN-13: 9780789724410
  • Publisher: Pearson Education (US)
  • Publisher Imprint: Que Corporation,U.S.
  • Height: 230 mm
  • No of Pages: 768
  • Weight: 1361 gr
  • ISBN-10: 0789724413
  • Publisher Date: 18 Oct 2000
  • Binding: Paperback
  • Language: English
  • Spine Width: 40 mm
  • Width: 186 mm


Similar Products

Add Photo
Add Photo

Customer Reviews

REVIEWS      0     
Click Here To Be The First to Review this Product
Special Edition Using Java Server Pages and Servlets
Pearson Education (US) -
Special Edition Using Java Server Pages and Servlets
Writing guidlines
We want to publish your review, so please:
  • keep your review on the product. Review's that defame author's character will be rejected.
  • Keep your review focused on the product.
  • Avoid writing about customer service. contact us instead if you have issue requiring immediate attention.
  • Refrain from mentioning competitors or the specific price you paid for the product.
  • Do not include any personally identifiable information, such as full names.

Special Edition Using Java Server Pages and Servlets

Required fields are marked with *

Review Title*
Review
    Add Photo Add up to 6 photos
    Would you recommend this product to a friend?
    Tag this Book Read more
    Does your review contain spoilers?
    What type of reader best describes you?
    I agree to the terms & conditions
    You may receive emails regarding this submission. Any emails will include the ability to opt-out of future communications.

    CUSTOMER RATINGS AND REVIEWS AND QUESTIONS AND ANSWERS TERMS OF USE

    These Terms of Use govern your conduct associated with the Customer Ratings and Reviews and/or Questions and Answers service offered by Bookswagon (the "CRR Service").


    By submitting any content to Bookswagon, you guarantee that:
    • You are the sole author and owner of the intellectual property rights in the content;
    • All "moral rights" that you may have in such content have been voluntarily waived by you;
    • All content that you post is accurate;
    • You are at least 13 years old;
    • Use of the content you supply does not violate these Terms of Use and will not cause injury to any person or entity.
    You further agree that you may not submit any content:
    • That is known by you to be false, inaccurate or misleading;
    • That infringes any third party's copyright, patent, trademark, trade secret or other proprietary rights or rights of publicity or privacy;
    • That violates any law, statute, ordinance or regulation (including, but not limited to, those governing, consumer protection, unfair competition, anti-discrimination or false advertising);
    • That is, or may reasonably be considered to be, defamatory, libelous, hateful, racially or religiously biased or offensive, unlawfully threatening or unlawfully harassing to any individual, partnership or corporation;
    • For which you were compensated or granted any consideration by any unapproved third party;
    • That includes any information that references other websites, addresses, email addresses, contact information or phone numbers;
    • That contains any computer viruses, worms or other potentially damaging computer programs or files.
    You agree to indemnify and hold Bookswagon (and its officers, directors, agents, subsidiaries, joint ventures, employees and third-party service providers, including but not limited to Bazaarvoice, Inc.), harmless from all claims, demands, and damages (actual and consequential) of every kind and nature, known and unknown including reasonable attorneys' fees, arising out of a breach of your representations and warranties set forth above, or your violation of any law or the rights of a third party.


    For any content that you submit, you grant Bookswagon a perpetual, irrevocable, royalty-free, transferable right and license to use, copy, modify, delete in its entirety, adapt, publish, translate, create derivative works from and/or sell, transfer, and/or distribute such content and/or incorporate such content into any form, medium or technology throughout the world without compensation to you. Additionally,  Bookswagon may transfer or share any personal information that you submit with its third-party service providers, including but not limited to Bazaarvoice, Inc. in accordance with  Privacy Policy


    All content that you submit may be used at Bookswagon's sole discretion. Bookswagon reserves the right to change, condense, withhold publication, remove or delete any content on Bookswagon's website that Bookswagon deems, in its sole discretion, to violate the content guidelines or any other provision of these Terms of Use.  Bookswagon does not guarantee that you will have any recourse through Bookswagon to edit or delete any content you have submitted. Ratings and written comments are generally posted within two to four business days. However, Bookswagon reserves the right to remove or to refuse to post any submission to the extent authorized by law. You acknowledge that you, not Bookswagon, are responsible for the contents of your submission. None of the content that you submit shall be subject to any obligation of confidence on the part of Bookswagon, its agents, subsidiaries, affiliates, partners or third party service providers (including but not limited to Bazaarvoice, Inc.)and their respective directors, officers and employees.

    Accept

    New Arrivals


    Inspired by your browsing history


    Your review has been submitted!

    You've already reviewed this product!