Adobe 38000382 Getting Started Guide - Page 54

Creating servlets, JRun support for servlets

Page 54 highlights

Creating servlets JRun provides two methods for creating servlets: writing Java programs and writing JSPs. When you write Java programs, you have full access to the data-processing capabilities and benefits of Java. Typically, you use Java to write servlets that perform complex data manipulation such as database access. You can also create servlets from JSPs, which are a type of server-side scripting that combines HTML and scripting code. JSPs provide access to the full power of the Java programming language, but use a simple mechanism to embed Java code within HTML code. They are often used to implement servlets that produce HTML results returned directly to a client browser. This book describes both methods of servlet creation. JRun support for servlets One of the primary reasons to use JRun to work with servlets is that not all web servers have implemented servlet functionality. JRun extends your web server to handle servlets. Even if your web server has the capability to run servlets, the server's implementation of the servlet standard might be specific to that server or the hardware platform hosting the server. JRun offers a completely portable servlet solution. You can use any servlet that you write using JRun on any other web server that uses JRun, or any web server that supports the J2EE servlet standard. JRun supports the Java Servlet 2.3 specification, which introduces two important features: servlet event listeners and filters. JRun also provides a ready-to-use Java web server that you can use to develop servlets, even if you do not have access to an existing web server. You can create, test, and debug servlets using the built-in JRun Web Server, and then deploy them on your production server with guaranteed compatibility. JRun support for JSPs JRun support for JSPs includes all the capabilities of page compilation as defined by the Java web server and the current JSP 1.2 specification. JRun provides the following features: • Complete compatibility with JSP 1.2 specification • Full support for the JSP tag • Support for extending JSPs for true object-oriented page design • Support for recursive dependent file compiling • Support for presentation templates • Support for all Java Virtual Machines (JVMs) and Java compilers The JSP 1.2 specification includes the following additions: • Two tag types: IterationTag and TryCatchFinallyTag • An XML syntax for JSP pages (JSPX), which makes it easier to automate the authoring of JSP pages • A number of enhancements to Tag Library Descriptors (TLD) that improve portability and better support authoring tools For more information, see JRun Programmer's Guide. 40 Chapter 4 Using Servlets and JSP

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125
  • 126
  • 127
  • 128
  • 129
  • 130
  • 131
  • 132

40
Chapter 4
Using Servlets and JSP
Creating servlets
JRun provides two methods for creating servlets: writing Java programs and writing JSPs.
When you write Java programs, you have full access to the data-processing capabilities
and benefits of Java. Typically, you use Java to write servlets that perform complex data
manipulation such as database access.
You can also create servlets from JSPs, which are a type of server-side scripting that
combines HTML and scripting code. JSPs provide access to the full power of the Java
programming language, but use a simple mechanism to embed Java code within HTML
code. They are often used to implement servlets that produce HTML results returned
directly to a client browser.
This book describes both methods of servlet creation.
JRun support for servlets
One of the primary reasons to use JRun to work with servlets is that not all web servers
have implemented servlet functionality. JRun extends your web server to handle servlets.
Even if your web server has the capability to run servlets, the server’s implementation of
the servlet standard might be specific to that server or the hardware platform hosting the
server. JRun offers a completely portable servlet solution. You can use any servlet that you
write using JRun on any other web server that uses JRun, or any web server that supports
the J2EE servlet standard. JRun supports the Java Servlet 2.3 specification, which
introduces two important features: servlet event listeners and filters.
JRun also provides a ready-to-use Java web server that you can use to develop servlets,
even if you do not have access to an existing web server. You can create, test, and debug
servlets using the built-in JRun Web Server, and then deploy them on your production
server with guaranteed compatibility.
JRun support for JSPs
JRun support for JSPs includes all the capabilities of page compilation as defined by the
Java web server and the current JSP 1.2 specification. JRun provides the following
features:
Complete compatibility with JSP 1.2 specification
Full support for the JSP
<jsp:useBean>
tag
Support for extending JSPs for true object-oriented page design
Support for recursive dependent file compiling
Support for presentation templates
Support for all Java Virtual Machines (JVMs) and Java compilers
The JSP 1.2 specification includes the following additions:
Two tag types:
IterationTag
and
TryCatchFinallyTag
An XML syntax for JSP pages (JSPX), which makes it easier to automate the
authoring of JSP pages
A number of enhancements to Tag Library Descriptors (TLD) that improve
portability and better support authoring tools
For more information, see
JRun Programmer’s Guide
.