Referencing a Servlet in a Web Application URL Pattern Matching
9.12 Clustering Servlets
Clustering servlets provides failover and load balancing benefits. To deploy a servlet in a WebLogic Server cluster, deploy the Web application containing the servlet on all servers in the cluster. For information on requirements for clustering servlets, and to understand the connection and failover processes for requests that are routed to clustered servlets, see Replication and Failover for Servlets and JSPs in Using Clusters for Oracle WebLogic Server. For information on the load balancing support that a WebLogic Server cluster provides for servlets, and for related planning and configuration considerations for architects and administrators, see Load Balancing for Servlets and JSPs in Using Clusters for Oracle WebLogic Server.9.13 Referencing a Servlet in a Web Application
The URL used to reference a servlet in a Web application is constructed as follows: http:myHostName:portmyContextPathmyRequestmyRequestParameters The components of this URL are defined as follows: ■ myHostName—The DNS name mapped to the Web Server defined in the WebLogic Server Administration Console. This portion of the URL can be replaced with host:port, where host is the name of the machine running WebLogic Server and port is the port at which WebLogic Server is listening for requests. ■ port—The port at which WebLogic Server is listening for requests. The servlet can communicate with the proxy only through the listenPort on the Server MBean and the SSL MBean. ■ myContextPath—The name of the context root which is specified in the weblogic.xml file, or the URI of the Web module which is specified in the config.xml file. ■ myRequest—The name of the servlet as defined in the web.xml file. ■ myRequestParameters—Optional HTTP request parameters encoded in the URL, which can be read by an HTTP servlet.9.14 URL Pattern Matching
WebLogic Server provides the user with the ability to implement a URL matching utility which does not conform to the J2EE rules for matching. The utility must be configured in the weblogic.xml deployment descriptor rather than the web.xml deployment descriptor used for the configuration of the default implementation of URLMatchMap. To be used with WebLogic Server, the URL matching utility must implement the following interface: Note: Automatic failover for servlets requires that the servlet session state be replicated in memory. For instructions, see Configure In-Memory HTTP Replication in Using Clusters for Oracle WebLogic Server. Servlet Programming Tasks 9-19 Package weblogic.servlet.utils; public interface URLMapping { public void putString pattern, Object value; public Object getString uri; public void removeString pattern public void setDefaultObject defaultObject; public Object getDefault; public void setCaseInsensitiveboolean ci; public boolean isCaseInsensitive; public int size; public Object[] values; public String[] keys; }9.15 The SimpleApacheURLMatchMap Utility
Parts
» Oracle Fusion Middleware Online Documentation Library
» Document Scope and Audience Guide To This Document
» Servlets and Java EE What You Can Do with Servlets
» JSPs and Java EE What You Can Do with JSPs Overview of How JSP Requests Are Handled
» Related Documentation New and Changed Features In This Release Web Application Security
» Avoiding Session Fixation Attacks in Programmatic Login Avoiding Redirection Attacks
» Step One: Create the Enterprise Application Wrapper Step Two: Create the Web Application
» Servlet Mapping Configuring Servlets
» Setting Up a Default Servlet Servlet Initialization Attributes
» Writing a Simple HTTP Servlet
» Advanced Features Complete HelloWorldServlet Example
» Usage Tracking a Request Handle Footprint
» WebLogic JSP and Java EE Configuring Java Server Pages JSPs Registering a JSP as a Servlet
» Configuring JSP Tag Libraries Configuring Welcome Files
» Customizing HTTP Error Responses Determining the Encoding of an HTTP Request
» JavaServer Faces JSF JavaServer Pages Standard Tag Libraries JSTL
» Referencing External EJBs More about the ejb-ref Elements
» Referencing Application-Scoped EJBs Oracle Fusion Middleware Online Documentation Library
» Configuring WebLogic Server to Use CGI
» Web Component Classes That Support Annotations
» Initializing a Servlet when WebLogic Server Starts Overriding the init Method
» Serving Resources from the CLASSPATH with the ClasspathServlet Providing an HTTP Response
» Methods for Using the HTTP Request Example: Retrieving Input by Using Query Parameters
» Setting Cookies in an HTTP Servlet Retrieving Cookies in an HTTP Servlet
» Forwarding a Request Including a Request
» Setting Up a Proxy to a Secondary Web Server
» Sample Deployment Descriptor for the Proxy Servlet
» Using WebLogic Services from an HTTP Servlet Threading Issues in HTTP Servlets Clustering Servlets
» Referencing a Servlet in a Web Application URL Pattern Matching
» doRequest doResponse doTimeOut Abstract Asynchronous Servlet
» Future Response Servlet A Future Response Model for HTTP Servlets
» HTTP Session Properties Session Timeout Configuring WebLogic Server Session Cookies
» Configuring Application Cookies That Outlive a Session Logging Out
» Configuring JDBC-based Persistent Storage
» Caching and Database Updates for JDBC Session Persistence Using Cookie-Based Session Persistence
» Coding Guidelines for URL Rewriting URL Rewriting and Wireless Access Protocol WAP
» A History of Session Tracking Tracking a Session with an HttpSession Object
» Lifetime of a Session How Session Tracking Works
» Detecting the Start of a Session Setting and Getting Session NameValue Attributes
» Configuring Session Tracking Using URL Rewriting Instead of Cookies
» Scenarios to Avoid When Using Sessions Use Serializable Attribute Values
» How the Pub-Sub Server Works
» Channels Message Delivery and Order of Delivery Guarantee
» Creating the weblogic-pubsub.xml File
» Overview of the Main API Classes and Interfaces
» Getting a Pub-Sub Server Instance and Creating a Local Client Publishing Messages to a Channel
» Programming the Message Filter Class Configuring the Message Filter Chain
» Updating a Browser Client to Communicate with the Pub-Sub Server
» Overriding the Default Servlet Mapping of the pubsub Java EE Library
» Specify Access to Channel Operations Restricting Access to All Channel Operations
» Map Roles to Principals Configure SSL for Pub-Sub Communication
» Use AuthCookieEnabled to Access Resources Locking Down the Pub-Sub Server
» Configuring JMS as a Handler
» Configuring Persistent Channels Advanced Topic: Persisting Messages to Physical Storage
» Declarations Scriptlets Oracle Fusion Middleware Online Documentation Library
» Expressions Example of a JSP with HTML and Embedded Java
» Instantiating the JavaBean Object Doing Setup Work at JavaBean Instantiation
» Forwarding Requests Including Requests
» Expressions and Attribute Values
» JSP Expression Language Implicit Objects
» Literals Errors, Warnings, Default Values Operators Operator Precedence
» JSP Compiler Syntax JSP Compiler Options
» Using the JSPClassServlet Precompiling JSPs
» Configuring a Filter Configuring Filters
» Writing a Filter Class Filtering the Servlet Response Object Additional Resources
» Overview of WebLogic JSP Form Validation Tags Using WebLogic JSP Form Validation Tags in a JSP
» Sample JSP with Validator Tags
» Refreshing a Cache Flushing a Cache
» Repeat Tag Overview of the WebLogic EJB-to-JSP Integration Tool
» Basic Operation Interface Source Files
» Build Options Panel Troubleshooting
Show more