uCosminexus Application Server, Web Service Development Guide
![[Contents]](FIGURE/CONTENT.GIF)
![[Glossary]](FIGURE/GLOSS.GIF)
![[Index]](FIGURE/INDEX.GIF)
![[Back]](FIGURE/FRONT.GIF)
setFollowRedirects(Boolean redirect) method
Description
This method specifies whether to automatically follow the HTTP redirector.
This method functions in the same manner as when you set the ClientConfig.PROPERTY_FOLLOW_REDIRECTS property in the property map acquired by using the getProperties() method.
Syntax
public void setFollowRedirects(Boolean redirect)
Parameter
- redirect
- If true, the client is automatically redirected to the coded URI of the HTTP response with the status code 300.
Return value
Notes
- The client operation based on the value specified in the redirect parameter is the same as that for the setInstanceFollowRedirects() method of the HttpURLConnection class. For details, see the JDK documentation.
- The JAX-RS engine does not validate the value specified in the redirect parameter. Prior to the HTTP communication, the value will be copied as is to HttpURLConnection. To specify a value in the redirect parameter, follow the description of the setInstanceFollowRedirects() method of the HttpURLConnection class of Java SE.
- If the client property map already contains the value specified in ClientConfig.PROPERTY_FOLLOW_REDIRECTS, the value specified in the redirect parameter is overwritten.
- If an exception is thrown during the processing of an HTTP request or an HTTP response due to the value specified in the redirect parameter, an error (KDJJ18888-E) occurs and the ClientHandlerException exception that wraps this exception is thrown.
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.