com.ibm.wbi.protocol.http.beans
Class NewUrlRequestEditor
com.ibm.wbi.Meg
|
+--com.ibm.wbi.RequestEditor
|
+--com.ibm.wbi.protocol.http.HttpRequestEditor
|
+--com.ibm.wbi.protocol.http.beans.NewUrlRequestEditor
- public class NewUrlRequestEditor
- extends HttpRequestEditor
A basic Request Editor which forwards to a new URL, replacing the
requested URL with the new one. (It does not change anything else in
the request, e.g. any posted data). It has one property that can be
set: NewURL. This property is used to specify the URL from which to
get the document.
Note the difference between this class and PageMovedGenerator. A
PageMovedGenerator sends a response back to the client, redirecting
it to a new URL. In this case, the client knows that it has been
sent elsewhere. So, for example, relative links in the document will be
interpreted from the new URL. If the NewURLRequestEditor is used,
the client simply receives the content from the new URL, but does not know
where the document came from.
- See Also:
PageMovedGenerator
|
Field Summary |
static java.lang.String |
COPYRIGHT
IBM copyright information |
|
Method Summary |
java.lang.String |
getNewUrl()
Access the NewURL property. |
void |
handleRequest(RequestEvent e)
The method used by the proxy to edit the request to point to the new URL. |
void |
setNewUrl(java.lang.String nu)
Set the New URL property. |
| Methods inherited from class com.ibm.wbi.Meg |
forwardRequest, getCondition, getEnabled, getMegProperty, getMegProperty, getMegPropertyKeys, getName, getPlugin, getPriority, getSystemContext, initialize, initialize, isEnabled, isMegApplicable, loadMegResources, run, setCondition, setEnabled, setMegProperty, setName, setPriority, setSystemContext, setup, setup, setup, setup |
COPYRIGHT
public static final java.lang.String COPYRIGHT
- IBM copyright information
NewUrlRequestEditor
public NewUrlRequestEditor()
- The default constructor. The NewURL property is set to null.
getNewUrl
public java.lang.String getNewUrl()
- Access the NewURL property.
- Returns:
- The NewURL
setNewUrl
public void setNewUrl(java.lang.String nu)
- Set the New URL property.
- Parameters:
nu - The NewURL
handleRequest
public void handleRequest(RequestEvent e)
throws RequestRejectedException
- The method used by the proxy to edit the request to point to the new URL.
- Overrides:
handleRequest in class HttpRequestEditor
- Parameters:
e - The request event.- Throws:
RequestRejectedException - To reject request.