- java.lang.Object
-
- jakarta.faces.component.UIComponent
-
- jakarta.faces.component.UIComponentBase
-
- org.omnifaces.component.output.OutputFamily
-
- org.omnifaces.component.output.ResourceInclude
-
- All Implemented Interfaces:
PartialStateHolder
,StateHolder
,TransientStateHolder
,ComponentSystemEventListener
,FacesListener
,SystemEventListenerHolder
,EventListener
public class ResourceInclude extends OutputFamily
The
<o:resourceInclude>
component can be used to catch the output from a JSP or Servlet resource and render it as output to the Faces writer. In effect, this allows you to include both Servlets and JSP pages in e.g. Facelets.Note that this isn't recommended as a lasting solution, but it might ease a migration from legacy JSP with smelly scriptlets and all on them to a more sane and modern Facelets application.
- Author:
- Arjan Tijms, Bauke Scholtz
- See Also:
BufferedHttpServletResponse
,HttpServletResponseOutputWrapper
,ResettableBuffer
,ResettableBufferedOutputStream
,ResettableBufferedWriter
,OutputFamily
-
-
Field Summary
Fields Modifier and Type Field Description static String
COMPONENT_TYPE
The component type, which is "org.omnifaces.component.output.ResourceInclude".-
Fields inherited from class org.omnifaces.component.output.OutputFamily
COMPONENT_FAMILY
-
Fields inherited from class jakarta.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
-
-
Constructor Summary
Constructors Constructor Description ResourceInclude()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
encodeBegin(FacesContext context)
Create a dispatcher for the resource given by the component's path attribute, catch its output and write it to the Faces response writer.-
Methods inherited from class org.omnifaces.component.output.OutputFamily
getFamily, getRendersChildren
-
Methods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
-
Methods inherited from class jakarta.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getContainerClientId, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression, visitTree
-
-
-
-
Field Detail
-
COMPONENT_TYPE
public static final String COMPONENT_TYPE
The component type, which is "org.omnifaces.component.output.ResourceInclude".- See Also:
- Constant Field Values
-
-
Method Detail
-
encodeBegin
public void encodeBegin(FacesContext context) throws IOException
Create a dispatcher for the resource given by the component's path attribute, catch its output and write it to the Faces response writer.- Overrides:
encodeBegin
in classUIComponentBase
- Throws:
IOException
-
-