Red Hat NETSCAPE ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE Bedienungsanleitung

Stöbern Sie online oder laden Sie Bedienungsanleitung nach Server Red Hat NETSCAPE ENTERPRISE SERVER 6.0 - NSAPI PROGRAMMER GUIDE herunter. iPlanet Web Server 6.0, Enterprise Edition Programmer`s Guide to Benutzerhandbuch

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 124
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen

Inhaltsverzeichnis

Seite 1 - Version 6.0

Programmer’s Guide to ServletsiPlanet Web Server, Enterprise EditionVersion 6.0816-1381-01May 2001

Seite 2

Servlets10 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001ServletsJava servlets are server-side Java programs that we

Seite 3 - Contents

Differences Between JavaScript and Java100 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Java is a class-based progr

Seite 4

JavaScript to Java Class Conversions Appendix B Converting SSJS Applications 101JavaScript to Java Class ConversionsThe objects used in an SSJS applic

Seite 5 - Contents 5

Conversion Steps102 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Conversion StepsWhen converting applications, foll

Seite 6

Example Conversion Appendix B Converting SSJS Applications 103Example ConversionThe hangman example, which was a Server-Side JavaScript example in the

Seite 7 - About This Book

Example Conversion104 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 8

105Appendix CJVM ConfigurationThe Java Virtual Machine (JVM) works by default without any additional configuration if properly set up. However, if you

Seite 9 - Servlets and JavaServer Pages

Using JVM Environment Variables106 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Here is an example jvm12.conf file.

Seite 10 - JavaServer Pages

jvm12.conf Parameter Reference Appendix C JVM Configuration 107In the myprogram.java file, the following line retrieves the system property set above:

Seite 11

jvm12.conf Parameter Reference108 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001jvm.verboseMode 0 (off), 1 (on) 0 En

Seite 12

jvm12.conf Parameter Reference Appendix C JVM Configuration 109jvm.serializeAttach 0 (off), 1 (on) 0 If on, threads that attach to the JVM are seriali

Seite 13 - Web Applications

JavaServer Pages Chapter 1 Servlets and JavaServer Pages 11• by using server-side tags that include Java servletsBoth beans and servlets are Java clas

Seite 14 - Dynamic Reconfiguration

jvm12.conf Parameter Reference110 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001java.compiler Specifies the Java com

Seite 15

jvm12.conf Parameter Reference Appendix C JVM Configuration 111jvm.classpath A path with forward slashes onlySpecifies the path(s) to JAR files depend

Seite 16 - Example server.xml File

jvm12.conf Parameter Reference112 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 17

113Appendix DRemote Servlet ProfilingYou can use a profiler to perform remote profiling on the iPlanet Web Server to discover bottlenecks in server-si

Seite 18 - Example web-apps.xml File

The HPROF Profiler114 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Also, update the PATH and NSES_CLASSPATH system

Seite 19

The HPROF Profiler Appendix D Remote Servlet Profiling 115The syntax of HPROF is as follows:-Xrunhprof[:help]|[:option=value,option2=value2, ...]Using

Seite 20

The HPROF Profiler116 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001This displays the following ASCII menu in the wi

Seite 21

117IndexAabout this book 7accessTimeColumnparameter for IWSSessionManager 60parameter for JdbcSessionManager 68API clarifications 71API referenceJavaB

Seite 22 - /intl/encoding.doc.html

118 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001debuggingJSPs 50servlets remotely 49default context 16default virt

Seite 23

Index 119installingForte for Java 51JPDA 52JRE or JDK 31, 37Internationalization 22, 74, 92Intuitive Systemsweb site 113isModifiedCheckAggressive con

Seite 24

JavaServer Pages12 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 25

120 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001jvm.disableThreadRecycling parameter 108jvm.enableClassGC paramete

Seite 26

Index 121Ppackage namesfor JSPs 46parameterEncoding context property 92parameter-encoding element 22param-name element 22param-value element 22passwo

Seite 27

122 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001directives 95enabling legacy 80example of accessing 29example of a

Seite 28

Index 123parameter for JdbcSessionManager 67parameter for MMapSessionManager 63parameter for SimpleSessionManager 65timeOut attribute 21timeOutColumn

Seite 29 - Web Application Examples

124 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 30

13Chapter 2Web ApplicationsiPlanet Web Server 6.0 supports the Servlet 2.2 API specification, which allows servlets and JSPs to be included in web app

Seite 31 - Using Servlets

Dynamic Reconfiguration14 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001A special directory under the document root,

Seite 32 - Enabling Servlets

web.xml Clarifications Chapter 2 Web Applications 15If you add or remove a web application, servlet, or JSP, you must restart the server.web.xml Clari

Seite 33 - The <SERVLET> SHTML Tag

The web-apps.xml File and Virtual Servers16 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001The web-apps.xml File and

Seite 34 - Servlet Output

The web-apps.xml File and Virtual Servers Chapter 2 Web Applications 17The following server.xml file uses these variables:<?xml version="1.0&q

Seite 35 - Configuring JVM

The web-apps.xml File and Virtual Servers18 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Example web-apps.xml FileN

Seite 36

The web-apps.xml File and Virtual Servers Chapter 2 Web Applications 19<session-tracking use-cookies="true" /> <!-- Define the web

Seite 37 - Using JavaServer Pages

Copyright © 2001 Sun Microsystems, Inc. Some preexisting portions Copyright © 2001 Netscape Communications Corporation. All rights reserved. Sun, Sun

Seite 38

The web-apps.xml File and Virtual Servers20 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001class-loaderThe class load

Seite 39 - Configuring JRE/JDK Paths

The web-apps.xml File and Virtual Servers Chapter 2 Web Applications 21form-login-sessionConfigures form-based authentication for single sign-on acros

Seite 40

The web-apps.xml File and Virtual Servers22 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001param-nameThe name of a pa

Seite 41

The web-apps.xml File and Virtual Servers Chapter 2 Web Applications 23If a servlet uses the ServletRequest.getParameter method to retrieve values in

Seite 42 - Deleting Cache Version Files

The web-apps.xml File and Virtual Servers24 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001response-bufferConfigures

Seite 43 - The JSP Command-Line Compiler

The web-apps.xml File and Virtual Servers Chapter 2 Web Applications 25session-cookieSets parameters for the session cookie.Subelements: noneAttribute

Seite 44

The web-apps.xml File and Virtual Servers26 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001tempdirA temporary directo

Seite 45

Deploying a Web Application using wdeploy Chapter 2 Web Applications 27Deploying a Web Application using wdeployBefore you can deploy a web applicatio

Seite 46 - Compiler

Deploying a Web Application using wdeploy28 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001• The .WAR file gets extra

Seite 47

Web Application Examples Chapter 2 Web Applications 29For example:http://acme.com:80/hello/index.jspor:http://acme.com/hello/Web Application Examplesi

Seite 48

3ContentsAbout This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Seite 49 - Debugging Servlets and JSPs

Web Application Examples30 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 50 - JSP Debugging

31Chapter 3Using ServletsThis chapter discusses how to enable and configure servlets in iPlanet Web Server 6.0. The sections in this chapter are:• Wha

Seite 51

Using the User Interface32 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Using the User InterfaceFor information abo

Seite 52

The <SERVLET> SHTML Tag Chapter 3 Using Servlets 33The <SERVLET> SHTML TagiPlanet Web Server 6.0 supports the <SERVLET> tag as intro

Seite 53 - JPDA Options for Debugging

Servlet Output34 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001You would also need to include the following in your

Seite 54

Configuring JVM Chapter 3 Using Servlets 35Configuring JVMIf necessary, you can configure parameters for JVM either by using the Java>Configure JVM

Seite 55 - Session Managers

Maximizing Servlet Performance36 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001You can set the stack space using the

Seite 56 - Specifying a Session Manager

37Chapter 4Using JavaServer PagesThis chapter discusses how to enable and configure JavaServer Pages (JSPs) in iPlanet Web Server 6.0. The sections in

Seite 57

What Does the Server Need to Run JSP?38 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Check the iPlanet Web Server I

Seite 58 - IWSSessionManager

Configuring JRE/JDK Paths Chapter 4 Using JavaServer Pages 39When you install iPlanet Web Server 6.0, one of the dialog boxes in the installation proc

Seite 59

4 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001response-cookie . . . . . . . . . . . . . . . . . . . . . . . . . .

Seite 60

Configuring JRE/JDK Paths40 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001• JDK Runtime ClasspathThe class path incl

Seite 61 - Enabling IWSSessionManager

Using the User Interface Chapter 4 Using JavaServer Pages 41NSES_JDK should point to the installation directory for the JDK, while NSES_JRE should poi

Seite 62 - /net/dotcom.com/sessions

Enabling JSPs42 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Enabling JSPsTo enable JSPs, follow these steps:1. Ena

Seite 63 - Enabling MMapSessionManager

The JSP Command-Line Compiler Chapter 4 Using JavaServer Pages 43The cache has a Version file containing a version number that the server uses to dete

Seite 64

The JSP Command-Line Compiler44 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001-v[level] Enables verbose mode. The le

Seite 65 - Deprecated Session Managers

The JSP Command-Line Compiler Chapter 4 Using JavaServer Pages 45The -webinc and -webxml options may not be useful for JSPs in iPlanet Web Server.For

Seite 66 - JdbcSessionManager

The JSP Command-Line Compiler46 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Package Names Generated by the JSP Com

Seite 67

JSP Tag Libraries and Standard Portable Tags Chapter 4 Using JavaServer Pages 47Other JSP Initialization ParametersYou can include the following initi

Seite 68 - Enabling JdbcSessionManager

JSP Tag Libraries and Standard Portable Tags48 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 69

49Chapter 5Debugging Servlets and JSPsThis appendix gives guidelines for debugging servlets and JSPs in iPlanet Web Server 6.0. It includes the follow

Seite 70

Contents 5Chapter 6 Session Managers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55Session

Seite 71 - API Clarifications

JSP Debugging50 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 20012. Set the following parameters in jvm12.conf as appro

Seite 72 - </vs>

Generating a Stack Trace for Debugging Chapter 5 Debugging Servlets and JSPs 513. To send exceptions to the client in addition to the log file, set th

Seite 73 - ServletRequest.setAttribute

Using Forte for Java to Debug Servlets and JSPs52 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 20014. iPlanet strongly

Seite 74 - ServletRequest.getParameter

JPDA Options for Debugging Chapter 5 Debugging Servlets and JSPs 53JPDA Options for DebuggingA list of debugging options that you can include in the j

Seite 75 - Clarification

JPDA Options for Debugging54 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 76

55Chapter 6Session ManagersSession objects maintain state and user identity across multiple page requests over the normally stateless HTTP protocol. A

Seite 77 - Other Useful Information

Specifying a Session Manager56 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001iPlanet Web Server 6.0 comes with these

Seite 78

Specifying a Session Manager Chapter 6 Session Managers 57</init-param><init-param> <param-name>reapInterval</param-name><p

Seite 79 - Configuration

IWSSessionManager58 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001IWSSessionManagerThe IWSSessionManager is the defa

Seite 80 - Enabling Servlets and JSP

IWSSessionManager Chapter 6 Session Managers 59• maxLocks - the number of cross-process locks to use for synchronizing access to individual sessions a

Seite 81

6 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001contexts.properties . . . . . . . . . . . . . . . . . . . . . . .

Seite 82

IWSSessionManager60 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001• provider - the JDBC driver (the default is sun.j

Seite 83

IWSSessionManager Chapter 6 Session Managers 61• insertPool - the number of connections that perform insert operations (the default is 4 connections).

Seite 84 - Virtual Servlet Path Example

MMapSessionManager (Unix Only)62 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001• Use the Legacy Servlets>Configur

Seite 85

MMapSessionManager (Unix Only) Chapter 6 Session Managers 63ParametersMMapSessionManager takes the following parameters:•maxSessions - the maximum num

Seite 86

MMapSessionManager (Unix Only)64 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001You can also specify parameters for t

Seite 87 - Legacy Configuration Files

Deprecated Session Managers Chapter 6 Session Managers 65Deprecated Session ManagersThe SimpleSessionManager and the JdbcSessionManager are provided f

Seite 88

Deprecated Session Managers66 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Enabling SimpleSessionManagerYou may wan

Seite 89

Deprecated Session Managers Chapter 6 Session Managers 67This sample JDBC session manager is not written, tested, or intended for production use. It i

Seite 90

Deprecated Session Managers68 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001• reaperActive - tells the session manag

Seite 91

Load Balancing, Session Failover, and Session IDs Chapter 6 Session Managers 69timeOut=1200,username=mysession,password=mypassword• Edit the file serv

Seite 92

7About This BookThis book discusses how to enable and install Java servlets and JavaServer Pages (JSP) in iPlanet™ Web Server, Enterprise Edition 6.0.

Seite 93 - Legacy Examples

Load Balancing, Session Failover, and Session IDs70 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001NOTE The session I

Seite 94

71Chapter 7API ClarificationsThis appendix clarifies ways in which the Servlet 2.2 API specification is implemented in iPlanet Web Server 6.0 in the f

Seite 95 - Appendix A

Clarifications for Using Methods72 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001• Make sure that the session attrib

Seite 96 - Objects in obj.conf

Clarifications for Using Methods Chapter 7 API Clarifications 73HttpServlet.servicepublic void service(ServletRequest req, ServletResponse res) throws

Seite 97

Clarifications for Using Methods74 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001ServletRequest.getParameterpublic j

Seite 98 - JSP Directives

Clarifications for Using Methods Chapter 7 API Clarifications 75For JSPs, set the response content type using a page directive, for example: <%@ pa

Seite 99 - Converting SSJS Applications

Clarifications for Using Methods76 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001RequestDispatcher.forward and inclu

Seite 100 - JavaScript Java

Other Useful Information Chapter 7 API Clarifications 77Other Useful InformationThis section contains information about the following topics:• Databas

Seite 101

Other Useful Information78 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001

Seite 102 - Conversion Steps

79Chapter 8Legacy Servlet and JSPConfigurationThis chapter describes legacy configuration procedures and files, which are provided for backward compat

Seite 103 - Example Conversion

8 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001This chapter discusses methods in the Servlets API that behave margi

Seite 104

Enabling Servlets and JSP80 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Enabling Servlets and JSPTo enable and dis

Seite 105 - JVM Configuration

Configuring Servlets in the Default Virtual Server Chapter 8 Legacy Servlet and JSP Configuration 81In detail, to serve servlets in the default virtua

Seite 106

Configuring Servlets in the Default Virtual Server82 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001For example, if t

Seite 107

Configuring Servlets in the Default Virtual Server Chapter 8 Legacy Servlet and JSP Configuration 83Registering Individual ServletsThe iPlanet Web Ser

Seite 108

Configuring Servlets in the Default Virtual Server84 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Note that you can

Seite 109

Configuring Servlets in the Default Virtual Server Chapter 8 Legacy Servlet and JSP Configuration 85In the Legacy Servlets>Configure Servlet Attrib

Seite 110

Using the User Interface86 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001/plans/plan1=plan1AAfter this virtual servl

Seite 111

Legacy Configuration Files Chapter 8 Legacy Servlet and JSP Configuration 87Legacy Configuration FilesThis section discusses the purpose and use of th

Seite 112

Legacy Configuration Files88 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Here is a sample servlets.properties file

Seite 113 - Remote Servlet Profiling

Legacy Configuration Files Chapter 8 Legacy Servlet and JSP Configuration 89Here is an example of rules.properties. # Servlet rules properties## This

Seite 114 - The HPROF Profiler

9Chapter 1Servlets and JavaServer PagesiPlanet Web Server 6.0 supports servlets and JavaServer Pages (JSPs). This chapter gives a brief overview of se

Seite 115

Legacy Configuration Files90 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001For a way to direct files of a specific t

Seite 116

Legacy Configuration Files Chapter 8 Legacy Servlet and JSP Configuration 91# server checks for jsp and servlet files being modified (global # context

Seite 117

Legacy Configuration Files92 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001# context.global.parameterEncoding=utf8#

Seite 118

Legacy Examples Chapter 8 Legacy Servlet and JSP Configuration 93If a servlet uses the ServletRequest.getParameter method to retrieve values in form f

Seite 119 - Index 119

Maximizing Legacy Servlet Performance94 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001The legacy subdirectory contai

Seite 120

95Appendix AServlet Settings in magnus.conf andobj.confThe iPlanet Web Server 6.0 Administration Server automatically modifies the magnus.conf and obj

Seite 121 - Index 121

Objects in obj.conf96 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001for Unix, the directives are the same except for

Seite 122

Objects in obj.conf Appendix A Servlet Settings in magnus.conf and obj.conf 97For another way to direct files of a specific type to a specific servlet

Seite 123 - Index 123

Directives for Registered Servlet Directories98 iPlanet Web Server, Enterprise Edition Programmer’s Guide to Servlets • May 2001Directives for Registe

Seite 124

99Appendix BConverting SSJS ApplicationsThis appendix contains information about converting Server-Side JavaScript applications to JSPs. It has the fo

Kommentare zu diesen Handbüchern

Keine Kommentare