# com.bea.netuix.servlets.manager
PortalServlet Class

public class PortalServlet
extends `UIServlet`

Front door servlet to handle requests for portals and desktops. Requests that end in 'portalExtensions' are handed off to the `UIServlet`. The `UIControl` tree or content uri for a portal for a requested desktop is cached after being retrieved from the persistent store. Caches for user personalized desktops are flushed at the end of a user's session. Non-personalized desktops stay in the cache until either the cache expires them based on its ttl value or they are updated using the persistence API. ContentUris for portals are also cached and flushed using the aforementioned logic.

If a tree is obtained, it is handed over to the `UIServlet` to run lifecycle methods on it. If a content uri is obtained the request is forwarded to it.

Hierarchy
  `Object`
  `GenericServlet`
  `HttpServlet`
  `PageCompileServlet`
  `JSPServlet`
  `UIServlet`
  `PortalServlet`

All Implemented Interfaces
  `JspContextTreeLookup`, `Serializable`, `Servlet`, `ServletConfig`

## Nested Class Summary

`public static class` | `PortalServlet.UserCacheFlushSessionBindingListener` SessionBindingListener to flush the user cache at the end of a session.

## Field Summary

Fields from com.bea.netuix.servlets.manager`.`UIServlet``
`PATH_INFO, PROFILE_ON, PROFILE_OUTPUT_FREQUENCY, SERVLET_PATH, STREAM_REQUEST_FILE, STREAMING_JSPX, STREAMING_JSPX_FILE_PARAM`

Fields from weblogic.servlet`.`JSPServlet``
`DEFAULT_PACKAGE_PREFIX, DEFAULT_PAGE_NAME`

Fields from weblogic.servlet.jhtmlc`.`PageCompileServlet``
`finder, jspConfig, ourContext, servletClasspath, servlets`

## Constructor Summary

PortalServlet()

## Method Summary

`protected `CacheKey`` | `createCacheKey`(`String` _webAppName, `String` _portalPath, `String` _desktopPath, `String` _userName, `ArrayList` _locales)
`protected `UIControlTreeCacheData`` | `createControlTreeData`(byte[] controlTreeBytes)
`public void` | `doGet`(`HttpServletRequest` request, `HttpServletResponse` response)
`public void` | `doPost`(`HttpServletRequest` request, `HttpServletResponse` response) doPost method.
`protected byte[]` | `getCachedControlTreeBytes`(`CacheKey` cacheKey)
`protected `Serializable`` | `getFromTreeCache`(`CacheKey` cacheKey)
`protected `UIControlTreeCacheData`` | `getTreeFromJspx`(`String` jspx, `HttpServletRequest` request, `HttpServletResponse` response, `Locale` locale)
`public void` | `init`() Initalize this servlet.

Methods from `com.bea.netuix.servlets.manager.`UIServlet``
`createJspContext, getDefaultLifecycle, getDefaultPackage, getDefaultPageName, getTree, getTree, getTreeForUrl, getTreeForUrl, init, initControlTreeWalkerPool, processControlTree, processStream, registerCustomControlHandlers, runLifecycle, runValidationLifeCycle, service, setContentType`

Methods from `weblogic.servlet.`JSPServlet``
`getDefaultCompilerName, getDefaultPackage, getDefaultPageName, getDefaultServletName, getNewJspStub, getUseBackticks, init, service, uri2classname`

Methods from `weblogic.servlet.jhtmlc.`PageCompileServlet``
`getCompilerArgs, getDefaultCompilerName, getDefaultPackage, getDefaultPageName, getDefaultServletName, getUseBackticks, init, service, servletInfo2class`

Methods from `javax.servlet.http.`HttpServlet``
`doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service`

Methods from `javax.servlet.`GenericServlet``
`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log, service`

Methods from class `java.lang.`Object``
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods from interface `com.bea.netuix.nf.container.jsp.`JspContextTreeLookup``
`getTreeForUrl, getTreeForUrl`

Methods from interface `javax.servlet.`Servlet``
`destroy, getServletConfig, getServletInfo, init, service`

Methods from interface `javax.servlet.`ServletConfig``
`getInitParameter, getInitParameterNames, getServletContext, getServletName`

## Field Detail

## Constructor Detail

### PortalServlet

    public PortalServlet()

## Method Detail

### createCacheKey(String, String, String, String, ArrayList) Method

DEPRECATED As of 8.1 SP2, replaced by `com.bea.netuix.servlets.manager.PortalServlet.createCacheKey(java.lang.String, java.lang.String, java.lang.String, java.util.ArrayList)```

    protected CacheKey createCacheKey(String _webAppName,
                                      String _portalPath,
                                      String _desktopPath,
                                      String _userName,
                                      ArrayList _locales)

### createControlTreeData(byte[]) Method

DEPRECATED As of 8.1 SP2, replaced by methods in SingleFileProcessor``

    protected UIControlTreeCacheData createControlTreeData(byte[] controlTreeBytes)
         throws IOException, ClassNotFoundException

#### Exceptions

``IOException``
``ClassNotFoundException``

### doGet(HttpServletRequest, HttpServletResponse) Method

    public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
         throws ServletException, IOException

Overrides
  `HttpServlet.doGet(HttpServletRequest, HttpServletResponse)`

#### Exceptions

``ServletException``
``IOException``

### doPost(HttpServletRequest, HttpServletResponse) Method

    public void doPost(HttpServletRequest request,
                       HttpServletResponse response)
         throws ServletException, IOException

doPost method.

Overrides
  `HttpServlet.doPost(HttpServletRequest, HttpServletResponse)`

#### Parameters

request
  HttpServletRequest

response
  HttpServletResposne

#### Exceptions

``ServletException``
``IOException``

### getCachedControlTreeBytes(CacheKey) Method

DEPRECATED As of 8.1 SP2, replaced by methods in SingleFileProcessor``

    protected byte[] getCachedControlTreeBytes(CacheKey cacheKey)

### getFromTreeCache(CacheKey) Method

DEPRECATED As of 8.1 SP2, replaced by methods in SingleFileProcessor``

    protected Serializable getFromTreeCache(CacheKey cacheKey)

### getTreeFromJspx(String, HttpServletRequest, HttpServletResponse, Locale) Method

DEPRECATED As of 8.1 SP2, replaced by methods in SingleFileProcessor``

    protected UIControlTreeCacheData getTreeFromJspx(String jspx,
                                                     HttpServletRequest request,
                                                     HttpServletResponse response,
                                                     Locale locale)

### init() Method

    public void init()
         throws ServletException

Initalize this servlet.

Overrides
  `GenericServlet.init()`

#### Exceptions

``ServletException``