Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.ajax4jsf.webapp
Class WebXml

    java.lang.Object
      org.ajax4jsf.config.WebXMLParser
          org.ajax4jsf.webapp.WebXml

All Implemented Interfaces:
  java.io.Serializable

    public class WebXml

extends WebXMLParser
implements java.io.Serializable

Parse at startup application web.xml and store servlet and filter mappings. at runtime, used for convert resource key to uri, and vice versa.

Version:
  $Revision: 1.1.2.1 $ $Date: 2007/01/09 18:58:59 $
Author:
  asmirnov@exadel.com (latest modification by $Author: alexsmirnov $)
See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `CONTEXT_ATTRIBUTE`
`static java.lang.String` | `GLOBAL_RESOURCE_URI_PREFIX`
`static java.lang.String` | `GLOBAL_RESOURCE_URI_PREFIX_PARAM`
`static java.lang.String` | `GLOBAL_RESOURCE_URI_PREFIX_VERSIONED`
`protected boolean` | `prefixMapping`
`static java.lang.String` | `RESOURCE_URI_PREFIX`
`static java.lang.String` | `RESOURCE_URI_PREFIX_PARAM`
`static java.lang.String` | `RESOURCE_URI_PREFIX_VERSIONED`
`static java.lang.String` | `SESSION_RESOURCE_URI_PREFIX`
`static java.lang.String` | `SESSION_RESOURCE_URI_PREFIX_PARAM`
`static java.lang.String` | `SESSION_RESOURCE_URI_PREFIX_VERSIONED`

Fields inherited from class org.ajax4jsf.config.WebXMLParser
`WEB_XML`

Constructor Summary
`WebXml()`

Method Summary
`java.lang.String` | `getFacesResourceKey(javax.servlet.http.HttpServletRequest request)` Detect request to resource and extract key from request
`java.lang.String` | `getFacesResourceKey(java.lang.String resourcePath)`
`java.lang.String` | `getFacesResourceURL(javax.faces.context.FacesContext context, java.lang.String url)` Deprecated.
`java.lang.String` | `getFacesResourceURL(javax.faces.context.FacesContext context, java.lang.String url, boolean isGlobal)` Convert `InternetResource` key to real URL for handle by chameleon filter, depend of mapping in WEB.XML .
`java.lang.String` | `getGlobalResourcePrefix()`
`static WebXml` | `getInstance()`
`static WebXml` | `getInstance(javax.faces.context.FacesContext context)`
`java.lang.String` | `getResourcePrefix()` Deprecated.
`java.lang.String` | `getSessionResourcePrefix()`
`void` | `init(javax.servlet.ServletContext context, java.lang.String filterName)`
`boolean` | `isFacesRequest(javax.servlet.http.HttpServletRequest request)` Detect request to `FacesServlet`
`boolean` | `isPrefixMapping()`

Methods inherited from class org.ajax4jsf.config.WebXMLParser
`getFacesFilterPrefix, getFacesFilterSuffix, getFacesServletMappings, getFacesServletPrefix, getFacesServletSuffix, init`

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

Field Detail

### CONTEXT_ATTRIBUTE

    public static final java.lang.String CONTEXT_ATTRIBUTE

### GLOBAL_RESOURCE_URI_PREFIX

    public static final java.lang.String GLOBAL_RESOURCE_URI_PREFIX

See Also:
  Constant Field Values

### GLOBAL_RESOURCE_URI_PREFIX_PARAM

    public static final java.lang.String GLOBAL_RESOURCE_URI_PREFIX_PARAM

See Also:
  Constant Field Values

### RESOURCE_URI_PREFIX

    public static final java.lang.String RESOURCE_URI_PREFIX

See Also:
  Constant Field Values

### RESOURCE_URI_PREFIX_PARAM

    public static final java.lang.String RESOURCE_URI_PREFIX_PARAM

See Also:
  Constant Field Values

### SESSION_RESOURCE_URI_PREFIX

    public static final java.lang.String SESSION_RESOURCE_URI_PREFIX

See Also:
  Constant Field Values

### SESSION_RESOURCE_URI_PREFIX_PARAM

    public static final java.lang.String SESSION_RESOURCE_URI_PREFIX_PARAM

See Also:
  Constant Field Values

### GLOBAL_RESOURCE_URI_PREFIX_VERSIONED

    public static final java.lang.String GLOBAL_RESOURCE_URI_PREFIX_VERSIONED

### RESOURCE_URI_PREFIX_VERSIONED

    public static final java.lang.String RESOURCE_URI_PREFIX_VERSIONED

### SESSION_RESOURCE_URI_PREFIX_VERSIONED

    public static final java.lang.String SESSION_RESOURCE_URI_PREFIX_VERSIONED

### prefixMapping

    protected boolean prefixMapping

Constructor Detail

### WebXml

    public WebXml()

Method Detail

### getInstance

    public static WebXml getInstance()

### getInstance

    public static WebXml getInstance(javax.faces.context.FacesContext context)

### init

    public void init(javax.servlet.ServletContext context,
                     java.lang.String filterName)
              throws javax.servlet.ServletException

  Overrides:
    `init` in class `WebXMLParser`
  Throws:
    `javax.servlet.ServletException`

### getFacesResourceURL

    public java.lang.String getFacesResourceURL(javax.faces.context.FacesContext context,
                                                java.lang.String url,
                                                boolean isGlobal)

  Convert `InternetResource` key to real URL for handle by chameleon filter, depend of mapping in WEB.XML . For prefix or * mapping, prepend servlet prefix and default Resource prefix to key. For suffix mapping, prepend with resource prefix and append default faces suffix to URL ( before request param ). After conversion, call `ViewHandler.getResourceURL(javax.faces.context.FacesContext, java.lang.String)` and `ExternalContext.encodeResourceURL(java.lang.String)` .

  Parameters:
    `context` -
    `url` -
  Returns:

### getFacesResourceURL

    @Deprecated
    public java.lang.String getFacesResourceURL(javax.faces.context.FacesContext context,
                                                           java.lang.String url)

  Deprecated.

### getFacesResourceKey

    public java.lang.String getFacesResourceKey(java.lang.String resourcePath)

### getFacesResourceKey

    public java.lang.String getFacesResourceKey(javax.servlet.http.HttpServletRequest request)

  Detect request to resource and extract key from request

  Parameters:
    `request` - current http request
  Returns:
    resource key, or null for ordinary faces request.

### isFacesRequest

    public boolean isFacesRequest(javax.servlet.http.HttpServletRequest request)

  Detect request to `FacesServlet`

  Parameters:
    `request` -
  Returns:
    true if request parsed to JSF.

### getResourcePrefix

    @Deprecated
    public java.lang.String getResourcePrefix()

  Deprecated.

  Returns:
    Returns the resourcePrefix.

### getGlobalResourcePrefix

    public java.lang.String getGlobalResourcePrefix()

  Returns:
  Since:
    3.2.2

### getSessionResourcePrefix

    public java.lang.String getSessionResourcePrefix()

  Returns:
  Since:
    3.2.2

### isPrefixMapping

    public boolean isPrefixMapping()

  Returns:
    Returns the prefixMapping.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.