Showing posts with label JSP. Show all posts
Showing posts with label JSP. Show all posts

Apr 20, 2008

JSP Tutorial



This is a tutorial to help a developer understand what is meant by JavaServer Pages (JSP). The reader will learn the main concepts, setup the JSP environment on their computer and write a few JSP programs.

JavaServer Pages (JSP) is a technology based on the Java language and enables the development of dynamic web sites. JSP was developed by Sun Microsystems to allow server side development. JSP files are HTML files with special Tags containing Java source code that provide the dynamic content. The following shows the Typical Web server, different clients connecting via the Internet to a Web server. In this example, the Web server is running on Unix and is the very popular Apache Web server.

First static web pages were displayed. Typically these were people’s first experience with making web pages so consisted of My Home Page sites and company marketing information. Afterwards Perl and C were languages used on the web server to provide dynamic content. Soon most languages including Visualbasic, Delphi, C++ and Java could be used to write applications that provided dynamic content using data from text files or database requests. These were known as CGI server side applications. ASP was developed by Microsoft to allow HTML developers to easily provide dynamic content supported as standard by Microsoft’s free Web Server, Internet Information Server (IIS). JSP is the equivalent from Sun Microsystems, a comparison of ASP and JSP will be presented in the following section.

Why use JSP?
JSP is easy to learn and allows developers to quickly produce web sites and applications in an open and standard way. JSP is based on Java, an object- oriented language. JSP offers a robust platform for web development.

Main reasons to use JSP:

1. Multi platform
2. Component reuse by using Javabeans and EJB.
3. Advantages of Java.
You can take one JSP file and move it to another platform, web server or JSP Servlet engine.

Download

JavaServer Pages (JSP) Tutorials


This is a tutorial to help a developer understand what is meant by JavaServer Pages (JSP). The reader will learn the main concepts, setup the JSP environment on their computer and write a few JSP programs.

JavaServer Pages (JSP) is a technology based on the Java language and enables the development of dynamic web sites. JSP was developed by Sun Microsystems to allow server side development. JSP files are HTML files with special Tags containing Java source code that provide the dynamic content. The following shows the Typical Web server, different clients connecting via the Internet to a Web server. In this example, the Web server is running on Unix and is the very popular Apache Web server.

First static web pages were displayed. Typically these were people’s first experience with making web pages so consisted of My Home Page sites and company marketing information. Afterwards Perl and C were languages used on the web server to provide dynamic content. Soon most languages including Visualbasic, Delphi, C++ and Java could be used to write applications that provided dynamic content using data from text files or database requests. These were known as CGI server side applications. ASP was developed by Microsoft to allow HTML developers to easily provide dynamic content supported as standard by Microsoft’s free Web Server, Internet Information Server (IIS). JSP is the equivalent from Sun Microsystems, a comparison of ASP and JSP will be presented in the following section.

Why use JSP?
JSP is easy to learn and allows developers to quickly produce web sites and applications in an open and standard way. JSP is based on Java, an object- oriented language. JSP offers a robust platform for web development.
Main reasons to use JSP:
1. Multi platform
2. Component reuse by using Javabeans and EJB.
3. Advantages of Java.
You can take one JSP file and move it to another platform, web server or JSP Servlet engine

Download


Apr 9, 2008

JSP and XML Integrating XML and Web Services in Your JSP Application

Download XML Tutorial, About JSP and XML Integrating XML and Web Services in Your JSP Application:
The purpose of this book is to teach you how to implement XML and Web services within a JSP Web application or site. The book will start very simply and then work its way up in complexity. This will make the book accessible to a wide range of readers.

The target audience includes new and intermediate JSP programmers. However, this book will be useful for any JSP programmer who wants to expand his or her XML or Web service implementation knowledge. The book is also geared towards helping a JSP programmer think in terms of the combination of JSP, XML, and Web services. The goal is to show how to usefully integrate these technologies into your projects and share the lessons we have learned in building Web applications.

We are programmers who spend quite a bit of time building Web applications. Over the past few years, we have been implementing XML in our projects. However, implementing XML is easier said than done at times. Even worse, many times XML is implemented in ways that can be harmful to a project. You should never use XML for XML's sake. This book is a reflection of our ordeals in learning the various tools and the methods of incorporating XML in a useful way into a Web site.

The problem for developers hasn't been about finding information on java XML api, but about using XML successfully within Web applications. While there are plenty of solid XML titles, no title really focuses on how to integrate XML into your JSP project. This book is written with the JSP developer in mind. We want to help teach XML, XSL, XPath, and the entire alphabet soup that goes along with XML. By showing how to use XML within a JSP framework, we intend to help make implementing XML both easy and advantageous for the JSP developer.

Filetype : chm
By Casey Kochmer, Erica Frandsen
Publisher: Addison Wesley
Pub Date: March 19, 2002
ISBN : 0-672-32354-0
Pages : 592
Publisher: O'Reilly
Pub Date: January 2004
ISBN : 0-596-00572-5
Pages : 746

Download this Books

Apr 8, 2008

Java Server Pages (JSP) Tutorial


Java Server Pages (JSP) is a new technology for web application development that has received a great deal of attention since it was first announced.

Why is Java Server Pages (JSP) so exciting?
One reason is that JSP is Java-based, and Java is well-suited for enterprise computing. In fact, JSP is a key part of the Java™ 2 Enterprise Edition (J2EE) platform and can take advantage of the many Java Enterprise libraries, such as JDBC, JNDI, and Enterprise JavaBeans™. Another reason is that JSP supports a powerful model for developing web applications that separates presentation from processing. Understanding why this is so important requires a bit of a history lesson.

In the early days of the Web, the only tool for developing dynamic web content was the Common Gateway Interface (CGI). CGI outlined how a web server made user input available to a program, as well as how the program provided the web server with dynamically generated content to send back. CGI scripts were typically written in Perl. (In fact, CGI Perl scripts still drive numerous dynamic web sites.) However, CGI is not an efficient solution. For every request, the web server has to create a new operating-system process, load a Perl interpreter and the Perl script, execute the script, and then dispose of the entire process when it's done. To provide a more efficient solution, various alternatives to CGI have been added to programmers' toolboxes over the last few years: FastCGI, for example, runs each CGI program in an external permanent process (or a pool of processes). In addition, mod_perl for Apache, NSAPI for Netscape, and ISAPI for Microsoft's IIS all run server-side programs in the same process as the web server itself. While these solutions offer betterperformance and scalability, each one is supported by only a subset of the popular web servers. The Java Servlet API, introduced in early 1997, provides a solution to the portability issue.

However, all these technologies suffer from a common problem : HTML code embedded inside programs. If you've ever looked at the code for a servlet, you've probably seen endless calls to out.println( ) that contain scores of HTML tags. For the individual developer working on a simple web site this approach may work fine, but it makes it very difficult for people with different skills to work together to develop a web application. This is becoming a significant problem.
As web sites become increasingly complex and are more and more critical to the success of an organization, the appearance and usability of the web interface becomes paramount. New client technologies, such as client-side scripts and DHTML, can develop more responsive and interactive user interfaces, stylesheets can make it easier to globally change fonts and colors, and images can make the interface more appealing.

At the same time, server-side code is getting more complex, and demands for reliability, performance, and fault tolerance are increasing. The growing complexity of web applications requires a development model that allows people with different skills to cooperate efficiently. JavaServer Pages provides just such a development model, allowing web page authors with skills in graphics, layout, and usability to work in tandem with programmers who are experienced in server-side technologies such as multithreading, resource pooling, databases, and caching. While there are other technologies, such as ASP, PHP, and ColdFusion, that support similar development models, none of them offers all the advantages of JSP.

Download Java Server Pages (JSP) Tutorial

Filetype : pdf
Size : 2,328 KB
First Edition, December 2000
Page : 572 pages

Mar 4, 2008

Java for the Web with Servlets, JSP, and EJB: A Developer's Guide to J2EE Solutions


Java for the Web with Servlets, JSP and EJB is the one book you need to master Java web programming. It covers all the technologies needed to program web applications in Java using Servlets 2.3, JSP 1.2, EJB 2.0 and client-side programming with JavaScript. These technologies are explained in the context of real-world projects, such as an e-commerce application, a document management program, file upload and programmable file download, and an XML-based online book project.

In addition to excellent content, this book includes licenses to two Java web components from BrainySoftware.com. You receive a full license of the Programmable File Download component for commercial and non-commercial deployment. You are also granted to a license to deploy the author's popular File Upload bean for non-commercial use, which has been licensed by the Fortune 500 company Commerce One and purchased by major corporations such as Saudi Business Machine, Ltd. and Baxter Healthcare Corporation.

Overview of Parts and Chapters
This book consists of four parts, including the appendixes.
Part I: Building Java Web Applications
This part is comprised of 20 chapters on servlets and JavaServer Pages (JSP)
Chapter 1, The Servlet Technology
Chapter 2, Inside Servlets
Chapter 3, Writing Servlet Applications
Chapter 4, Accessing Databases with JDBC
Chapter 5, Session Management
Chapter 6, Application and Session Events
Chapter 7, Servlet Filtering
Chapter 8, JSP Basics
Chapter 9, JSP Syntax
Chapter 10, Developing JSP Beans
Chapter 11, Using JSP Custom Tags
Chapter 12, Programmable File Download
Chapter 13, File Upload
Chapter 14, Security Configuration
Chapter 15, Caching
Chapter 16, Application Deployment
Chapter 17, Architecting Java Web Applications
Chapter 18, Developing E-Commerce Applications
Chapter 19, XML-Based E-Books
Chapter 20, Web-Based Document

Part II: Client-Side Programming with JavaScript
Chapter 21, JavaScript Basics
Chapter 22, Client-Side Programming Basics
Chapter 23, Redirection
Chapter 24, Client-Side Input Validation
Chapter 25, Working with Client-Side Cookies
Chapter 26, Working with Object Trees
Chapter 27, Controlling Applets

Part III: Developing Scalable Applications with EJB
Chapter 28, Enterprise JavaBeans
Chapter 29, The Session Bean
Chapter 30, Entity Beans
Chapter 31, EJB Query Language
Chapter 32, Java Message Service
Chapter 33, Message-Driven Beans

Filetype : pdf
Page 359
Download Java for the Web with Servlets, JSP and EJB

Feb 10, 2008

Java Servlet & JSP Cookbook


What's in the Book :
Java Servlet & JSP Cookbook
?
In creating the recipes for this book and tutorial, This book to cover as many common and advanced web developer tasks as Java Servlet & JSP Cookbook could practically fit into one book. This amounts to about 230 different recipes. Each recipe shows how to implement a particular task using servlets, JSPs, and, in many cases, one or more supporting Java classes.

The recipes show how to:

•Authenticate web clients
•Interact with databases
•Send email
•Handle submitted data from a web form
•Read and set "cookies"

•Upload files from the client
•Integrate JavaScript with servlets and JSPs

•Embed multimedia files like digital movies and music in JSPs and servlets •Handle web clients whose users speak different languages (internationalization) •Log messages from servlets and JSPs
•Dynamically include chunks of content, as in traditional server-side include (SSI) code
•Interact with Enterprise JavaBeans (EJBs) from a JSP and servlet

•Use Amazon.com's and Google.com's Web Services APIs from a servlet or JSP

Java Servlet & JSP Cookbook also included numerous technology-specific recipes, such as:
•Using "sessions" in your Java web applications (a concept that represents the tracking of a user's progress through a web site)
•Working with "filters"

•Using the open source ANT tool to build web applications
•Binding Java objects to a session or web application so they can be used as information or data containers
•Creating your own custom tags for JSPs
•Using the JavaServer Pages Standard Tag Library (JSTL), which is a large set of prebuilt tags you can use in JSPs

In short, the book is designed to help guide Java web developers in their everyday tasks, and to provide quick solutions to typical web-related problems.

BEA WebLogic Recipes :
Because Java web developers tend to work with both Tomcat and a proprietary application server, Java Servlet & JSP Cookbook included a number of different recipes to show how to implement common tasks with BEA WebLogic. As a practical matter, This book could not cover the several other application servers that are available, such as IBM's WebSphere, JBoss, Jetty, Oracle 9i application server, or commercial servlet engines such as New Atlanta ServletExec and Caucho Resin. But this book wanted to include recipes covering "how the other half lives" in terms of using various vendor tools for managing everyday web-application tasks. Solutions involving the deployment or revision of web components and deployment descriptors using visual interfaces such as WebLogic's Administration Console or WebLogic Builder can be quite different from those used with Tomcat.

Downloads Java Servlet & JSP Cookbook
Java Servlet & JSP Cookbook
Pub Date : January 2004
Pages : 746

Filetype : pdf


Feb 9, 2008

Core Servlets and Java Server Pages

Free download vtc java 2: jsp and servlets
Ebooks and tutorial Core Servlets and Java Server Pages (JSP) is divided into three parts: Servlets, JavaServer Pages, and Supporting Technologies.

Part I: Servlets
Part I covers servlet development with the 2.1 and 2.2 specifications.
Although version 2.2 (along with JSP 1.1) is mandated by the Java 2 Platform, Enterprise Edition (J2EE), many commercial products are still at the earlier releases, so it is important to understand the differences.
Also, although servlet code is portable across a huge variety of servers and operating systems, server setup and configuration details are not standardized.
So, I include specific details for Apache Tomcat, Sun’s JavaServer Web Development Kit (JSWDK), and the Java Web Server.

Servlet topics include:
• When and why you would use servlets
• Obtaining and configuring the servlet and JSP software
• The basic structure of servlets
• The process of compiling, installing, and invoking servlets
• Generating HTML from servlets
• The servlet life cycle
• Page modification dates and browser caches
• Servlet debugging strategies
• Reading form data from servlets
• Handling both GET and POST requests with a single servlet
• An on-line resume posting service
• Reading HTTP request headers from servlets
• The purpose of each of the HTTP 1.1 request headers
• Reducing download times by compressing pages
• Restricting access with password-protected servlets
• The servlet equivalent of each standard CGI variable
• Using HTTP status codes
• The meaning of each of the HTTP 1.1 status code values
• A search engine front end
• Setting response headers from servlets
• The purpose of each of the HTTP 1.1 response headers
• Common MIME types
• A servlet that uses the Refresh header to repeatedly access ongoing computations
• Servlets that exploit persistent (keep-alive) HTTP connections
• Generating GIF images from servlets
• Cookie purposes and problems
• The Cookie API
• Some utilities that simplify cookie handling
• A customized search engine front end
• The purposes of session tracking
• The servlet session tracking API
• Using sessions to show per-client access counts
• An on-line store that uses session tracking, shopping carts, and pages automatically built from catalog entries

Part II: JavaServer Pages
JSP provides a convenient alternative to servlets for pages that mostly consist of fixed content.
Part II covers the use of JavaServer Pages version 1.0 and 1.1.
JSP topics include:
• When and why you would use JavaServer Pages
• How JSP pages are invoked
• Using JSP expressions, scriptlets, and declarations
• Predefined variables that can be used within expressions and scriptlets
• The page directive
• Designating which classes are imported
• Specifying the MIME type of the page
• Generating Excel spreadsheets
• Controlling threading behavior
• Participating in sessions
• Setting the size and behavior of the output buffer
• Designating pages to process JSP errors
• XML-compatible syntax for directives
• Including JSP files at the time the main page is translated into a servlet
• Including HTML or plain text files at the time the client requests the page
• Including applets that use the Java Plug-In
• Using JavaBeans with JSP
• Creating and accessing beans
• Setting bean properties explicitly
• Associating bean properties with input parameters
• Automatic conversion of bean property types
• Sharing beans among multiple JSP pages and servlets
• Creating JSP tag libraries
• Tag handler classes
• Tag library descriptor files
• The JSP taglib directive
• Simple tags
• Tags that use attributes
• Tags that use the body content between their start and end tags
• Tags that modify their body content
• Looping tags
• Nested tags
• Integrating servlets and JSP
• Forwarding requests from servlets to static and dynamic resources
• Using servlets to set up beans for use by JSP pages
• An on-line travel agency combining servlets and JSP
• Including JSP output in servlets
• Forwarding requests from JSP pages

Part III: Supporting Technologies
Part III covers three topics that are commonly used in conjunction with servlets and JSP: HTML forms, applets talking to servlets, and JDBC.
Topics include:
• Sending data from forms
• Text controls
• Push buttons
• Check boxes and radio buttons
• Combo boxes and list boxes
• File upload controls
• Server-side image maps
• Hidden fields
• Grouping controls
• Tab ordering
• A Web server for debugging forms
• Sending GET data from an applet and having the browser display the results
• Having applets send GET data and process the results themselves (HTTP tunneling)
• Using object serialization to exchange high-level data structures between applets and servlets
• Having applets send POST data and process the results themselves
• Applets bypassing the HTTP server altogether

Download Core Servlets and Java Server Pages
Filetype : pdf
Page : 617
Size : 6.684 KB

Jan 26, 2008

JavaServer Pages™, Second Edition


JavaServer Pages™ , Second Edition is a book and tutorial about how to use an exciting and powerful technology, JavaServer Pages, (JSP Tutorial) to create dynamic, interactive Web sites. As the name implies, this technology is based on the Java programming language and inherits many of the language's features and benefits. Most notably, Java makes JSPs available on almost every kind of computer and operating system and certainly all those in common use.

Java Server Pages are now a mature and stable technology, already in use in thousands of companies. But maturity has certainly not led to stagnation! Recently, a new version of the JSP specification was released, bringing new capabilities and possibilities. In addition, several companion technologies have been developed to augment the fundamental specification. The new specification, as well as the most important of these associated technologies, are all covered in this book. Throughout this book, effort has been made to show the capabilities of all these tools and to discuss how they can best be used.

One of the most important features of Java Server Pages is how easy they are to use. Anyone who is reasonably comfortable with HTML (Hypertext Markup Language) can learn to write Java Server Pages by using a few simple tags that may do very sophisticated things behind the scenes, along with small packages of code called JavaBeans. This allows for a very productive working relationship between HTML experts who build pages and Java programmers who build beans and new tags.

Chapter 1 :
Gives a brief history of the Web, setting JSPs in context and clarifying what they are, how they work, and why they work that way.

Chapter 2 :
Introduces some of the simpler features of JSPs and shows just how easy the transition from HTML to JSP. The next two chapters introduce the two vital technologies that give JSPs their enormous power and flexibility: JavaBeans in Chapter 3 and custom tags in Chapter 4. These tags are presented as page authors will use them: components that hide all the complexities of Java behind simple interfaces that can be combined and used in limitless ways.

Chapter 5 :
Uses beans and tags to build a fully functional Web site. One of the great benefits of JSPs is that they make it possible for pages to interact with complex systems. A very common such system is a database.

Chapter 6 :
Introduces database concepts and discusses easy ways in which a page author can access data.

Chapter 7 :
Uses this information to expand the utility of the site built in Chapter 5. XML (Extensible Markup Language) is an increasingly important technology, and JSPs are already well equipped to work with XML.

Chapter 8.

The first eight chapters comprise a logical first half of the book, dealing with the myriad things page authors can do with JSPs without knowing anything about Java. The remainder of the book delves under the hood to explain how all this is accomplished and how Java programmers can extend the capabilities of JSPs. For readers who are not yet familiar with Java,

Chapter 9 :
Introduces the language.
Chapter 10 :
Overs the process of creating new beans.

Chapter 11 :
Covers a technology, called servlets, that underlies JSPs.

Chapter 12 :
To talk about controllers, Java code that helps pieces of a Web site work together simply and cleanly.

Chapter 13 :
Discusses how to use Java to create new tags.

Chapter 14 :
Covers a few remaining advanced topics.
Readers who are not interested in programming will get the most out of this book by reading Chapters 1 through 9, which comprise a complete course on how to use JSPs, beans, tags, and related technologies to build just about any Web site imaginable.
At thatpoint, such readers may wish to learn a little Java from Chapter 9 and then proceed on through the rest of the book in order to understand better how everything works.
On the other hand, readers who already know Java but who may not be familiar with JSPs, the new features added as part of the latest specification, or related technologies will want to move quickly through Chapter 2 to get a feel for JSP syntax and then go through Chapters 3 and 4 to see how JSPs interface with Java via tags and beans.
Programmers may then wish to proceed to Chapter 10 to see how new beans are created, and from there through the second half of the book in order to understand servlets and tags.

Download JavaServer Pages™, Second Edition
Pub Date : August 15, 2003
Pages : 368
Filetype : pdf
Size : 1,226 KB