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.apache.struts2.components
Class ServletUrlRenderer

    java.lang.Object
      org.apache.struts2.components.ServletUrlRenderer

All Implemented Interfaces:
  UrlRenderer

    public class ServletUrlRenderer

extends java.lang.Object
implements UrlRenderer

Implementation of the `UrlRenderer` interface that creates URLs suitable in a servlet environment.

Constructor Summary
`ServletUrlRenderer()`

Method Summary
`void` | `beforeRenderUrl(UrlProvider urlComponent)` Preprocessing step
`protected void` | `mergeRequestParameters(java.lang.String value, java.util.Map parameters, java.util.Map contextParameters)` Merge request parameters into current parameters.
`void` | `renderFormUrl(Form formComponent)` Render a Form URL.
`void` | `renderUrl(java.io.Writer writer, UrlProvider urlComponent)` Render a URL.
`void` | `setActionMapper(ActionMapper mapper)`

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

Constructor Detail

### ServletUrlRenderer

    public ServletUrlRenderer()

Method Detail

### setActionMapper

    public void setActionMapper(ActionMapper mapper)

  Specified by:
    `setActionMapper` in interface `UrlRenderer`

### renderUrl

    public void renderUrl(java.io.Writer writer,
                          UrlProvider urlComponent)

  Render a URL.

  Specified by:
    `renderUrl` in interface `UrlRenderer`
  Parameters:
    `writer` - A writer that the implementation can use to write the result to.

### renderFormUrl

    public void renderFormUrl(Form formComponent)

  Render a Form URL.

  Specified by:
    `renderFormUrl` in interface `UrlRenderer`
  Parameters:
    `formComponent` - The `Form` component that "owns" this renderer.

### beforeRenderUrl

    public void beforeRenderUrl(UrlProvider urlComponent)

  Description copied from interface: `UrlRenderer`
  Preprocessing step

  Specified by:
    `beforeRenderUrl` in interface `UrlRenderer`

### mergeRequestParameters

    protected void mergeRequestParameters(java.lang.String value,
                                          java.util.Map parameters,
                                          java.util.Map contextParameters)

  Merge request parameters into current parameters. If a parameter is already present, than the request parameter in the current request and value atrribute will not override its value. The priority is as follows:-
  - parameter from the current request (least priority)
  - parameter form the value attribute (more priority)
  - parameter from the param tag (most priority)

  Parameters:
    `value` - the value attribute (url to be generated by this component)
    `parameters` - component parameters
    `contextParameters` - request parameters

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 © 2000-2011 Apache Software Foundation. All Rights Reserved.